Skip to content

Commit 708e703

Browse files
author
Jiang Jiang Jian
committed
Merge branch 'bugfix/11r_compile_error' into 'master'
fix(wifi): Fixed compilation error when 11KV is disabled and 11R is enabled Closes IDFGH-14807 See merge request espressif/esp-idf!37804
2 parents 34b69e8 + ac0eaa0 commit 708e703

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

components/wpa_supplicant/esp_supplicant/src/esp_common.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ static int mgmt_rx_action(u8 *frame, size_t len, u8 *sender, int8_t rssi, u8 cha
8585
return 0;
8686
}
8787

88+
#if defined(CONFIG_WNM)
8889
static void clear_bssid_flag_and_channel(struct wpa_supplicant *wpa_s)
8990
{
90-
#if defined(CONFIG_WNM)
9191
wifi_config_t *config;
9292

9393
/* Reset only if btm is enabled */
@@ -110,8 +110,8 @@ static void clear_bssid_flag_and_channel(struct wpa_supplicant *wpa_s)
110110
}
111111
os_free(config);
112112
wpa_printf(MSG_DEBUG, "cleared bssid flag");
113-
#endif /* CONFIG_WNM */
114113
}
114+
#endif /* CONFIG_WNM */
115115
#endif /* CONFIG_IEEE80211KV */
116116

117117
#if defined(CONFIG_IEEE80211KV) || defined(CONFIG_IEEE80211R)
@@ -313,8 +313,6 @@ void esp_supplicant_common_deinit(void)
313313
wpa_s->type = 0;
314314
esp_wifi_register_mgmt_frame_internal(wpa_s->type, wpa_s->subtype);
315315
}
316-
#if defined(CONFIG_IEEE80211KV) || defined(CONFIG_IEEE80211R)
317-
#endif /* defined(CONFIG_IEEE80211KV) || defined(CONFIG_IEEE80211R) */
318316
}
319317

320318
void supplicant_sta_conn_handler(uint8_t *bssid)
@@ -334,8 +332,10 @@ void supplicant_sta_conn_handler(uint8_t *bssid)
334332
wpa_bss_flush(wpa_s);
335333
/* Register for mgmt frames */
336334
register_mgmt_frames(wpa_s);
335+
#if defined(CONFIG_WNM)
337336
/* clear set bssid flag */
338337
clear_bssid_flag_and_channel(wpa_s);
338+
#endif /* CONFIG_WNM */
339339
#endif /* defined(CONFIG_IEEE80211KV) || defined(CONFIG_IEEE80211R) */
340340
}
341341

@@ -347,13 +347,15 @@ void supplicant_sta_disconn_handler(uint8_t reason_code)
347347
#if defined(CONFIG_RRM)
348348
wpas_rrm_reset(wpa_s);
349349
wpas_clear_beacon_rep_data(wpa_s);
350+
#endif /* defined(CONFIG_RRM) */
351+
#if defined(CONFIG_WNM)
350352
/* Not clearing in case of roaming disconnect as BTM induced connection
351353
* itself sets a specific bssid and channel to connect to before disconnection.
352354
* Subsequent connections or disconnections will clear this flag */
353355
if (reason_code != WIFI_REASON_ROAMING) {
354356
clear_bssid_flag_and_channel(wpa_s);
355357
}
356-
#endif /* defined(CONFIG_RRM) */
358+
#endif /* CONFIG_WNM */
357359
if (wpa_s->current_bss) {
358360
wpa_s->current_bss = NULL;
359361
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_ESP_WIFI_11R_SUPPORT=y
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CONFIG_ESP_WIFI_11KV_SUPPORT=y
2+
CONFIG_ESP_WIFI_RRM_SUPPORT=y
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CONFIG_ESP_WIFI_11KV_SUPPORT=y
2+
CONFIG_ESP_WIFI_WNM_SUPPORT=y

0 commit comments

Comments
 (0)