Merge branch 'bugfix/11r_compile_error_v5.3' into 'release/v5.3'

fix(wifi): Fixed compilation error when 11KV is disabled and 11R is enabled (v5.3)

See merge request espressif/esp-idf!37866
This commit is contained in:
Jiang Jiang Jian
2025-03-20 13:57:35 +08:00
4 changed files with 12 additions and 5 deletions

View File

@ -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;
}

View File

@ -0,0 +1 @@
CONFIG_ESP_WIFI_11R_SUPPORT=y

View File

@ -0,0 +1,2 @@
CONFIG_ESP_WIFI_11KV_SUPPORT=y
CONFIG_ESP_WIFI_RRM_SUPPORT=y

View File

@ -0,0 +1,2 @@
CONFIG_ESP_WIFI_11KV_SUPPORT=y
CONFIG_ESP_WIFI_WNM_SUPPORT=y