mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
wpa_supplicant: Remove scan done event in task
This commit is contained in:
parent
fee9509d5d
commit
2231a3bcbe
@ -214,11 +214,16 @@ static void supplicant_sta_disconn_handler(void* arg, esp_event_base_t event_bas
|
|||||||
int32_t event_id, void* event_data)
|
int32_t event_id, void* event_data)
|
||||||
{
|
{
|
||||||
struct wpa_supplicant *wpa_s = &g_wpa_supp;
|
struct wpa_supplicant *wpa_s = &g_wpa_supp;
|
||||||
|
wifi_event_sta_disconnected_t *disconn = event_data;
|
||||||
|
|
||||||
wpas_rrm_reset(wpa_s);
|
wpas_rrm_reset(wpa_s);
|
||||||
if (wpa_s->current_bss) {
|
if (wpa_s->current_bss) {
|
||||||
wpa_s->current_bss = NULL;
|
wpa_s->current_bss = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (disconn->reason != WIFI_REASON_ROAMING) {
|
||||||
clear_bssid_flag(wpa_s);
|
clear_bssid_flag(wpa_s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ieee80211_handle_rx_frm(u8 type, u8 *frame, size_t len, u8 *sender,
|
static int ieee80211_handle_rx_frm(u8 type, u8 *frame, size_t len, u8 *sender,
|
||||||
@ -295,7 +300,6 @@ int esp_supplicant_common_init(struct wpa_funcs *wpa_cb)
|
|||||||
|
|
||||||
wpa_s->type = 0;
|
wpa_s->type = 0;
|
||||||
wpa_s->subtype = 0;
|
wpa_s->subtype = 0;
|
||||||
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_wifi_register_mgmt_frame_internal(wpa_s->type, wpa_s->subtype);
|
||||||
wpa_cb->wpa_sta_rx_mgmt = ieee80211_handle_rx_frm;
|
wpa_cb->wpa_sta_rx_mgmt = ieee80211_handle_rx_frm;
|
||||||
/* Matching is done only for MBO at the moment, this can be extended for other features*/
|
/* Matching is done only for MBO at the moment, this can be extended for other features*/
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include "common/ieee802_11_common.h"
|
#include "common/ieee802_11_common.h"
|
||||||
#include "esp_common_i.h"
|
#include "esp_common_i.h"
|
||||||
#include "common/wnm_sta.h"
|
#include "common/wnm_sta.h"
|
||||||
|
#include "esp_scan_i.h"
|
||||||
|
|
||||||
extern struct wpa_supplicant g_wpa_supp;
|
extern struct wpa_supplicant g_wpa_supp;
|
||||||
|
|
||||||
@ -28,11 +29,11 @@ static void scan_done_event_handler(void *arg, STATUS status)
|
|||||||
|
|
||||||
/* update last scan time */
|
/* update last scan time */
|
||||||
wpa_s->scan_start_tsf = esp_wifi_get_tsf_time(WIFI_IF_STA);
|
wpa_s->scan_start_tsf = esp_wifi_get_tsf_time(WIFI_IF_STA);
|
||||||
if (!wpa_s->scanning) {
|
if (wpa_s->scanning) {
|
||||||
wpa_s->type &= ~(1 << WLAN_FC_STYPE_BEACON) & ~(1 << WLAN_FC_STYPE_PROBE_RESP);
|
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_wifi_register_mgmt_frame_internal(wpa_s->type, wpa_s->subtype);
|
||||||
}
|
}
|
||||||
esp_supplicant_post_evt(SIG_SUPPLICANT_SCAN_DONE, 0);
|
esp_supplicant_handle_scan_done_evt();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_wnm_scan_done(struct wpa_supplicant *wpa_s)
|
static void handle_wnm_scan_done(struct wpa_supplicant *wpa_s)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user