From e2b8ebe804ce894e067052c64131bfecdda67d4c Mon Sep 17 00:00:00 2001 From: Kapil Gupta Date: Mon, 26 Sep 2022 15:09:48 +0530 Subject: [PATCH 1/2] wpa_supplicant: Prevent pmk flush for unspecified reasoncode --- components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c b/components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c index 8c3e4e9efd..478aca2cad 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c @@ -228,7 +228,6 @@ int wpa_parse_wpa_ie_wrapper(const u8 *wpa_ie, size_t wpa_ie_len, wifi_wpa_ie_t static void wpa_sta_disconnected_cb(uint8_t reason_code) { switch (reason_code) { - case WIFI_REASON_UNSPECIFIED: case WIFI_REASON_AUTH_EXPIRE: case WIFI_REASON_NOT_AUTHED: case WIFI_REASON_NOT_ASSOCED: From f11cc8ca9d6ccadad016b5c23a19b5224aa6fa83 Mon Sep 17 00:00:00 2001 From: Kapil Gupta Date: Mon, 26 Sep 2022 15:11:40 +0530 Subject: [PATCH 2/2] Remove unnecessary code from disconnect handler --- components/wpa_supplicant/esp_supplicant/src/esp_common.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_common.c b/components/wpa_supplicant/esp_supplicant/src/esp_common.c index d25dc0fa24..0488f378ba 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_common.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_common.c @@ -235,7 +235,6 @@ static void supplicant_sta_disconn_handler(void* arg, esp_event_base_t event_bas int32_t event_id, void* event_data) { struct wpa_supplicant *wpa_s = &g_wpa_supp; - wifi_event_sta_disconnected_t *disconn = event_data; #ifdef CONFIG_WPA_11KV_SUPPORT wpas_rrm_reset(wpa_s); @@ -244,10 +243,6 @@ static void supplicant_sta_disconn_handler(void* arg, esp_event_base_t event_bas if (wpa_s->current_bss) { wpa_s->current_bss = NULL; } - - if (disconn->reason != WIFI_REASON_ROAMING) { - clear_bssid_flag(wpa_s); - } } #ifdef CONFIG_IEEE80211R