Skip to content

Commit

Permalink
Merge branch 'bugfix/btm_scan_done_crash' into 'master'
Browse files Browse the repository at this point in the history
wpa_supplicant : Fix race condition in BTM scan

Closes WIFI-5838

See merge request espressif/esp-idf!23775
  • Loading branch information
jack0c committed Jul 4, 2023
2 parents 0298e6f + 98e3360 commit 12306ef
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion components/wpa_supplicant/esp_supplicant/src/esp_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "esp_scan_i.h"
#include "common/wnm_sta.h"
#include "esp_scan_i.h"
#include "esp_common_i.h"

extern struct wpa_supplicant g_wpa_supp;

Expand All @@ -34,7 +35,13 @@ static void scan_done_event_handler(void *arg, ETS_STATUS status)
wpa_s->type &= ~(1 << WLAN_FC_STYPE_BEACON) & ~(1 << WLAN_FC_STYPE_PROBE_RESP);
esp_wifi_register_mgmt_frame_internal(wpa_s->type, wpa_s->subtype);
}
esp_supplicant_handle_scan_done_evt();
#ifdef CONFIG_SUPPLICANT_TASK
if (esp_supplicant_post_evt(SIG_SUPPLICANT_SCAN_DONE, 0) != 0) {
wpa_printf(MSG_ERROR, "Posting of scan done failed!");
}
#else
esp_supplicant_handle_scan_done_evt();
#endif /*CONFIG_SUPPLICANT_TASK*/
}

#if defined(CONFIG_IEEE80211KV)
Expand Down

0 comments on commit 12306ef

Please sign in to comment.