mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/wifi_stop_crash' into 'master'
esp_wifi: fix the crash when wifi stop after deinit Closes WIFI-2647 and WIFI-2646 See merge request espressif/esp-idf!9931
This commit is contained in:
commit
4d4dee8a52
@ -35,6 +35,7 @@
|
||||
|
||||
ESP_EVENT_DEFINE_BASE(WIFI_EVENT);
|
||||
|
||||
extern uint8_t esp_wifi_get_user_init_flag_internal(void);
|
||||
#ifdef CONFIG_PM_ENABLE
|
||||
static esp_pm_lock_handle_t s_wifi_modem_sleep_lock;
|
||||
#endif
|
||||
@ -114,6 +115,11 @@ esp_err_t esp_wifi_deinit(void)
|
||||
{
|
||||
esp_err_t err = ESP_OK;
|
||||
|
||||
if (esp_wifi_get_user_init_flag_internal()) {
|
||||
ESP_LOGE(TAG, "Wi-Fi not stop");
|
||||
return ESP_FAIL;
|
||||
}
|
||||
|
||||
esp_supplicant_deinit();
|
||||
err = esp_wifi_deinit_internal();
|
||||
if (err != ESP_OK) {
|
||||
|
Loading…
Reference in New Issue
Block a user