From 9e0e7bf5ba7d3e223924b93feda2e933071623ac Mon Sep 17 00:00:00 2001 From: Kapil Gupta Date: Thu, 1 Dec 2022 09:24:06 +0530 Subject: [PATCH] esp_wifi: STA set extra IEs for open AP Fixed regression caused by !21292 --- components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c | 4 ++-- 1 file changed, 2 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 01174f99d5..13e83d4677 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_wpa_main.c @@ -88,8 +88,6 @@ int wpa_config_profile(uint8_t *bssid) wpa_set_profile(WPA_PROTO_RSN, esp_wifi_sta_get_prof_authmode_internal()); } else if (esp_wifi_sta_prof_is_wapi_internal()) { wpa_set_profile(WPA_PROTO_WAPI, esp_wifi_sta_get_prof_authmode_internal()); - } else if (esp_wifi_sta_get_prof_authmode_internal() == NONE_AUTH) { - esp_set_assoc_ie((uint8_t *)bssid, NULL, 0, false); } else { ret = -1; } @@ -198,6 +196,8 @@ int wpa_sta_connect(uint8_t *bssid) wpa_printf(MSG_DEBUG, "Rejecting bss, validation failed"); return ret; } + } else if (esp_wifi_sta_get_prof_authmode_internal() == NONE_AUTH) { + esp_set_assoc_ie((uint8_t *)bssid, NULL, 0, false); } return 0;