mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
wpa_supplicant: Remove generic scan done event for rrm/btm scans
This commit is contained in:
parent
a1d836d659
commit
267fcd97ea
@ -32,8 +32,7 @@
|
||||
|
||||
extern struct wpa_supplicant g_wpa_supp;
|
||||
|
||||
static void esp_scan_done_event_handler(void* arg, esp_event_base_t event_base,
|
||||
int event_id, void* event_data)
|
||||
static void esp_scan_done_event_handler(void *arg, STATUS status)
|
||||
{
|
||||
struct wpa_supplicant *wpa_s = &g_wpa_supp;
|
||||
|
||||
@ -100,8 +99,6 @@ void esp_scan_init(struct wpa_supplicant *wpa_s)
|
||||
wpa_s->scanning = 0;
|
||||
wpa_bss_init(wpa_s);
|
||||
wpa_s->last_scan_res = NULL;
|
||||
esp_event_handler_register(WIFI_EVENT, WIFI_EVENT_SCAN_DONE,
|
||||
&esp_scan_done_event_handler, NULL);
|
||||
}
|
||||
|
||||
void esp_scan_deinit(struct wpa_supplicant *wpa_s)
|
||||
@ -109,8 +106,6 @@ void esp_scan_deinit(struct wpa_supplicant *wpa_s)
|
||||
wpa_bss_deinit(wpa_s);
|
||||
os_free(wpa_s->last_scan_res);
|
||||
wpa_s->last_scan_res = NULL;
|
||||
esp_event_handler_unregister(WIFI_EVENT, WIFI_EVENT_SCAN_DONE,
|
||||
&esp_scan_done_event_handler);
|
||||
}
|
||||
|
||||
int esp_handle_beacon_probe(u8 type, u8 *frame, size_t len, u8 *sender,
|
||||
@ -232,8 +227,10 @@ static int esp_issue_scan(struct wpa_supplicant *wpa_s,
|
||||
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);
|
||||
|
||||
typedef void (* scan_done_cb_t)(void *arg, STATUS status);
|
||||
extern int esp_wifi_promiscuous_scan_start(wifi_scan_config_t *config, scan_done_cb_t cb);
|
||||
/* issue scan */
|
||||
if (esp_wifi_scan_start(params, false) < 0) {
|
||||
if (esp_wifi_promiscuous_scan_start(params, esp_scan_done_event_handler) < 0) {
|
||||
ret = -1;
|
||||
goto cleanup;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user