From 913999b8c3714ce6f3f2b5d97e3cb70d7e0a445c Mon Sep 17 00:00:00 2001 From: Shreyas Sheth Date: Tue, 10 Sep 2024 13:50:20 +0530 Subject: [PATCH] fix(wifi): Resolve comments on feature/softap_fixes_for_ceritification --- .../wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h | 2 ++ components/wpa_supplicant/src/ap/ieee802_11.c | 4 ++-- components/wpa_supplicant/src/common/wpa_common.c | 3 --- components/wpa_supplicant/src/rsn_supp/wpa_ie.c | 4 ---- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h b/components/wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h index 006083b433..b9dc1eba43 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h +++ b/components/wpa_supplicant/esp_supplicant/src/esp_wifi_driver.h @@ -304,5 +304,7 @@ uint8_t* esp_wifi_sta_get_rsnxe(u8 *bssid); esp_err_t esp_wifi_sta_connect_internal(const uint8_t *bssid); void esp_wifi_enable_sae_pk_only_mode_internal(void); uint8_t esp_wifi_ap_get_transition_disable_internal(void); +int esp_wifi_softap_set_obss_overlap(bool overlap); +void esp_wifi_set_sigma_internal(bool flag); #endif /* _ESP_WIFI_DRIVER_H_ */ diff --git a/components/wpa_supplicant/src/ap/ieee802_11.c b/components/wpa_supplicant/src/ap/ieee802_11.c index 7f73b1e386..aa4e602cfd 100644 --- a/components/wpa_supplicant/src/ap/ieee802_11.c +++ b/components/wpa_supplicant/src/ap/ieee802_11.c @@ -181,7 +181,7 @@ static int auth_sae_send_confirm(struct hostapd_data *hapd, reply_res = -1; } else { if (sta->sae_data) - wpabuf_free(data); + wpabuf_free(sta->sae_data); sta->sae_data = data; reply_res = 0; /* confirm is sent in later stage when all the required processing for a sta is done*/ @@ -679,7 +679,7 @@ int auth_sae_queue(struct hostapd_data *hapd, unsigned int queue_len; queue_len = dl_list_len(&hapd->sae_commit_queue); - if (queue_len >= 5) { + if (queue_len >= hapd->conf->max_num_sta) { wpa_printf(MSG_DEBUG, "SAE: No more room in message queue - drop the new frame from " MACSTR, MAC2STR(bssid)); diff --git a/components/wpa_supplicant/src/common/wpa_common.c b/components/wpa_supplicant/src/common/wpa_common.c index faa0be573c..33ddbe8bea 100644 --- a/components/wpa_supplicant/src/common/wpa_common.c +++ b/components/wpa_supplicant/src/common/wpa_common.c @@ -5,7 +5,6 @@ * This software may be distributed under the terms of the BSD license. * See README for more details. */ - #ifdef ESP_SUPPLICANT #include "utils/includes.h" #include "utils/common.h" @@ -1577,5 +1576,3 @@ int wpa_cipher_put_suites(u8 *pos, int ciphers) return num_suites; } - -#endif // ESP_SUPPLICANT diff --git a/components/wpa_supplicant/src/rsn_supp/wpa_ie.c b/components/wpa_supplicant/src/rsn_supp/wpa_ie.c index 789c0958c6..68a0b42a46 100644 --- a/components/wpa_supplicant/src/rsn_supp/wpa_ie.c +++ b/components/wpa_supplicant/src/rsn_supp/wpa_ie.c @@ -11,7 +11,6 @@ * * See README and COPYING for more details. */ - #ifdef ESP_SUPPLICANT #include "utils/includes.h" @@ -456,6 +455,3 @@ int wpa_supplicant_parse_ies(const u8 *buf, size_t len, return ret; } - - -#endif // ESP_SUPPLICANT