esp_wifi: Move wpa_supplicant WIFI_EVENT_STA_CONNECTED and WIFI_EVENT_STA_DISCONNECTED event handlers into callbacks

Executing supplicant WIFI_EVENT_STA_CONNECTED and WIFI_EVENT_STA_DISCONNECTED handlers in event-handler context can lead to concurrency issues.
Moving the functionality into 'wpa_sta_connected_cb' and 'wpa_sta_disconnected_cb' callbacks and execute in ppTask context.
This commit is contained in:
Sarvesh Bodakhe
2023-03-31 12:32:01 +05:30
parent 7fb6f3b9e3
commit b89a851645
5 changed files with 49 additions and 54 deletions

View File

@@ -118,6 +118,7 @@ struct wpa_funcs {
bool (*wpa_sta_init)(void);
bool (*wpa_sta_deinit)(void);
int (*wpa_sta_connect)(uint8_t *bssid);
void (*wpa_sta_connected_cb)(uint8_t *bssid);
void (*wpa_sta_disconnected_cb)(uint8_t reason_code);
int (*wpa_sta_rx_eapol)(u8 *src_addr, u8 *buf, u32 len);
bool (*wpa_sta_in_4way_handshake)(void);