From 24fed6d3c24adff64840eb6a28334a133fd1f395 Mon Sep 17 00:00:00 2001 From: Kapil Gupta Date: Mon, 17 Mar 2025 23:16:04 +0530 Subject: [PATCH 1/2] fix(wifi): Fixed compilation error when 11R is enabled without 11KV --- .../wpa_supplicant/esp_supplicant/src/esp_common.c | 12 +++++++----- 1 file changed, 7 insertions(+), 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 47a20d5954..ce2a17cb37 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_common.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_common.c @@ -88,9 +88,9 @@ static int mgmt_rx_action(u8 *frame, size_t len, u8 *sender, int8_t rssi, u8 cha return 0; } +#if defined(CONFIG_WNM) static void clear_bssid_flag_and_channel(struct wpa_supplicant *wpa_s) { -#if defined(CONFIG_WNM) wifi_config_t *config; /* Reset only if btm is enabled */ @@ -113,8 +113,8 @@ static void clear_bssid_flag_and_channel(struct wpa_supplicant *wpa_s) } os_free(config); wpa_printf(MSG_DEBUG, "cleared bssid flag"); -#endif /* CONFIG_WNM */ } +#endif /* CONFIG_WNM */ #endif /* CONFIG_IEEE80211KV */ #if defined(CONFIG_IEEE80211KV) || defined(CONFIG_IEEE80211R) @@ -316,8 +316,6 @@ void esp_supplicant_common_deinit(void) wpa_s->type = 0; esp_wifi_register_mgmt_frame_internal(wpa_s->type, wpa_s->subtype); } -#if defined(CONFIG_IEEE80211KV) || defined(CONFIG_IEEE80211R) -#endif /* defined(CONFIG_IEEE80211KV) || defined(CONFIG_IEEE80211R) */ } void supplicant_sta_conn_handler(uint8_t *bssid) @@ -337,8 +335,10 @@ void supplicant_sta_conn_handler(uint8_t *bssid) wpa_bss_flush(wpa_s); /* Register for mgmt frames */ register_mgmt_frames(wpa_s); +#if defined(CONFIG_WNM) /* clear set bssid flag */ clear_bssid_flag_and_channel(wpa_s); +#endif /* CONFIG_WNM */ #endif /* defined(CONFIG_IEEE80211KV) || defined(CONFIG_IEEE80211R) */ } @@ -350,13 +350,15 @@ void supplicant_sta_disconn_handler(uint8_t reason_code) #if defined(CONFIG_RRM) wpas_rrm_reset(wpa_s); wpas_clear_beacon_rep_data(wpa_s); +#endif /* defined(CONFIG_RRM) */ +#if defined(CONFIG_WNM) /* Not clearing in case of roaming disconnect as BTM induced connection * itself sets a specific bssid and channel to connect to before disconnection. * Subsequent connections or disconnections will clear this flag */ if (reason_code != WIFI_REASON_ROAMING) { clear_bssid_flag_and_channel(wpa_s); } -#endif /* defined(CONFIG_RRM) */ +#endif /* CONFIG_WNM */ if (wpa_s->current_bss) { wpa_s->current_bss = NULL; } From a2d0171a172b2fe417fc2138a311f628804ce9d0 Mon Sep 17 00:00:00 2001 From: Kapil Gupta Date: Mon, 17 Mar 2025 23:20:22 +0530 Subject: [PATCH 2/2] ci(wifi): Add builds for FT, RRM and WNM configs --- examples/wifi/getting_started/station/sdkconfig.ci.ft | 1 + examples/wifi/getting_started/station/sdkconfig.ci.rrm | 2 ++ examples/wifi/getting_started/station/sdkconfig.ci.wnm | 2 ++ 3 files changed, 5 insertions(+) create mode 100644 examples/wifi/getting_started/station/sdkconfig.ci.ft create mode 100644 examples/wifi/getting_started/station/sdkconfig.ci.rrm create mode 100644 examples/wifi/getting_started/station/sdkconfig.ci.wnm diff --git a/examples/wifi/getting_started/station/sdkconfig.ci.ft b/examples/wifi/getting_started/station/sdkconfig.ci.ft new file mode 100644 index 0000000000..10169bbff2 --- /dev/null +++ b/examples/wifi/getting_started/station/sdkconfig.ci.ft @@ -0,0 +1 @@ +CONFIG_ESP_WIFI_11R_SUPPORT=y diff --git a/examples/wifi/getting_started/station/sdkconfig.ci.rrm b/examples/wifi/getting_started/station/sdkconfig.ci.rrm new file mode 100644 index 0000000000..61c172f523 --- /dev/null +++ b/examples/wifi/getting_started/station/sdkconfig.ci.rrm @@ -0,0 +1,2 @@ +CONFIG_ESP_WIFI_11KV_SUPPORT=y +CONFIG_ESP_WIFI_RRM_SUPPORT=y diff --git a/examples/wifi/getting_started/station/sdkconfig.ci.wnm b/examples/wifi/getting_started/station/sdkconfig.ci.wnm new file mode 100644 index 0000000000..9f87bf640e --- /dev/null +++ b/examples/wifi/getting_started/station/sdkconfig.ci.wnm @@ -0,0 +1,2 @@ +CONFIG_ESP_WIFI_11KV_SUPPORT=y +CONFIG_ESP_WIFI_WNM_SUPPORT=y