mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix wifi mac sleep bug when wifi is initialized multiple times
This commit is contained in:
parent
5b5e46971a
commit
139afb094e
@ -190,7 +190,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) {
|
||||
@ -231,7 +231,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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user