diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_common.c b/components/wpa_supplicant/esp_supplicant/src/esp_common.c index 949350c0e6..d1203f1292 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_common.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_common.c @@ -160,8 +160,10 @@ static void clear_bssid_flag(struct wpa_supplicant *wpa_s) } esp_wifi_get_config(WIFI_IF_STA, config); - config->sta.bssid_set = 0; - esp_wifi_set_config(WIFI_IF_STA, config); + if (config->sta.bssid_set) { + config->sta.bssid_set = 0; + esp_wifi_set_config(WIFI_IF_STA, config); + } os_free(config); wpa_printf(MSG_DEBUG, "cleared bssid flag"); } diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_scan.c b/components/wpa_supplicant/esp_supplicant/src/esp_scan.c index 7a3a0d6f24..38537d58cd 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_scan.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_scan.c @@ -90,6 +90,7 @@ void esp_scan_init(struct wpa_supplicant *wpa_s) wpa_s->scanning = 0; wpa_bss_init(wpa_s); wpa_s->last_scan_res = NULL; + wpa_s->last_scan_res_used = 0; } void esp_scan_deinit(struct wpa_supplicant *wpa_s) @@ -97,6 +98,7 @@ void esp_scan_deinit(struct wpa_supplicant *wpa_s) wpa_bss_deinit(wpa_s); os_free(wpa_s->last_scan_res); wpa_s->last_scan_res = NULL; + wpa_s->last_scan_res_used = 0; } int esp_handle_beacon_probe(u8 type, u8 *frame, size_t len, u8 *sender, diff --git a/components/wpa_supplicant/src/common/wpa_common.c b/components/wpa_supplicant/src/common/wpa_common.c index bbcfcaeeae..ba31029b4b 100644 --- a/components/wpa_supplicant/src/common/wpa_common.c +++ b/components/wpa_supplicant/src/common/wpa_common.c @@ -63,7 +63,7 @@ static int rsn_selector_to_bitfield(const u8 *s) return WPA_CIPHER_CCMP; if (RSN_SELECTOR_GET(s) == RSN_CIPHER_SUITE_WEP104) return WPA_CIPHER_WEP104; -#ifdef COFIG_GCMP +#ifdef CONFIG_GCMP if (RSN_SELECTOR_GET(s) == RSN_CIPHER_SUITE_GCMP) return WPA_CIPHER_GCMP; if (RSN_SELECTOR_GET(s) == RSN_CIPHER_SUITE_GCMP_256) @@ -72,7 +72,7 @@ static int rsn_selector_to_bitfield(const u8 *s) #ifdef CONFIG_IEEE80211W if (RSN_SELECTOR_GET(s) == RSN_CIPHER_SUITE_AES_128_CMAC) return WPA_CIPHER_AES_128_CMAC; -#ifdef COFIG_GMAC +#ifdef CONFIG_GMAC if (RSN_SELECTOR_GET(s) == RSN_CIPHER_SUITE_BIP_GMAC_128) return WPA_CIPHER_BIP_GMAC_128; if (RSN_SELECTOR_GET(s) == RSN_CIPHER_SUITE_BIP_GMAC_256)