From e3338a3103acb9d12d101789f2d7a1eee3799455 Mon Sep 17 00:00:00 2001 From: Shreyas Sheth Date: Mon, 8 Apr 2024 15:01:26 +0530 Subject: [PATCH] fix(wpa_supplicant): Compile error when CONFIG_SAE is disabled Closes https://github.com/espressif/esp-idf/issues/13553 --- .../wpa_supplicant/esp_supplicant/src/esp_wpa_main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 483bd7cc84..d0a742467e 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c @@ -365,9 +365,12 @@ static bool hostap_sta_join(void **sta, u8 *bssid, u8 *wpa_ie, u8 wpa_ie_len,u8 } return false; } +#endif /* CONFIG_SAE */ if (!esp_wifi_ap_is_sta_sae_reauth_node(bssid)) { ap_free_sta(hapd, old_sta); - } else if (old_sta && old_sta->lock) { + } +#ifdef CONFIG_SAE + else if (old_sta && old_sta->lock) { sta_info = old_sta; goto process_old_sta; } @@ -390,9 +393,10 @@ static bool hostap_sta_join(void **sta, u8 *bssid, u8 *wpa_ie, u8 wpa_ie_len,u8 } return false; } -#endif /* CONFIG_SAE */ process_old_sta: +#endif /* CONFIG_SAE */ + #ifdef CONFIG_WPS_REGISTRAR if (check_n_add_wps_sta(hapd, sta_info, wpa_ie, wpa_ie_len, pmf_enable, subtype) == 0) {