Merge branch 'bugfix/wifi_mac_sleep_issue' into 'master'

fix wifi mac sleep bug when wifi is initialized multiple times

Closes WIFI-3678

See merge request espressif/esp-idf!13591
This commit is contained in:
Jiang Jiang Jian 2021-05-25 14:31:20 +00:00
commit 4c0ed8844d

View File

@ -191,7 +191,7 @@ esp_err_t esp_register_mac_bb_pd_callback(mac_bb_power_down_cb_t cb)
int index = MAC_BB_POWER_DOWN_CB_NO;
for (int i = MAC_BB_POWER_DOWN_CB_NO - 1; i >= 0; i--) {
if (s_mac_bb_power_down_cb[i] == cb) {
return ESP_ERR_INVALID_STATE;
return ESP_OK;
}
if (s_mac_bb_power_down_cb[i] == NULL) {
@ -232,7 +232,7 @@ esp_err_t esp_register_mac_bb_pu_callback(mac_bb_power_up_cb_t cb)
int index = MAC_BB_POWER_UP_CB_NO;
for (int i = MAC_BB_POWER_UP_CB_NO - 1; i >= 0; i--) {
if (s_mac_bb_power_up_cb[i] == cb) {
return ESP_ERR_INVALID_STATE;
return ESP_OK;
}
if (s_mac_bb_power_up_cb[i] == NULL) {