mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(esp_wifi): Deinit WPS registrar during hostapd deinit
This commit is contained in:
parent
13d4235d73
commit
28f12bfb47
@ -19,6 +19,7 @@
|
||||
#include "esp_wifi_types.h"
|
||||
#include "esp_wpa3_i.h"
|
||||
#include "esp_wps.h"
|
||||
#include "esp_wps_i.h"
|
||||
|
||||
#define WIFI_PASSWORD_LEN_MAX 65
|
||||
|
||||
@ -236,6 +237,9 @@ bool hostap_deinit(void *data)
|
||||
esp_wifi_unset_appie_internal(WIFI_APPIE_WPA);
|
||||
esp_wifi_unset_appie_internal(WIFI_APPIE_ASSOC_RESP);
|
||||
|
||||
#ifdef CONFIG_WPS_REGISTRAR
|
||||
wifi_ap_wps_disable_internal();
|
||||
#endif
|
||||
#ifdef CONFIG_SAE
|
||||
wpa3_hostap_auth_deinit();
|
||||
/* Wait till lock is released by wpa3 task */
|
||||
|
@ -367,16 +367,19 @@ int wpa3_hostap_post_evt(uint32_t evt_id, uint32_t data)
|
||||
if (g_wpa3_hostap_evt_queue == NULL) {
|
||||
WPA3_HOSTAP_AUTH_API_UNLOCK();
|
||||
os_free(evt);
|
||||
wpa_printf(MSG_DEBUG, "hostap evt queue NULL");
|
||||
return ESP_FAIL;
|
||||
}
|
||||
} else {
|
||||
os_free(evt);
|
||||
wpa_printf(MSG_DEBUG, "g_wpa3_hostap_auth_api_lock not found");
|
||||
return ESP_FAIL;
|
||||
}
|
||||
if (evt->id == SIG_WPA3_RX_CONFIRM || evt->id == SIG_TASK_DEL) {
|
||||
/* prioritising confirm for completing handshake for committed sta */
|
||||
if (os_queue_send_to_front(g_wpa3_hostap_evt_queue, &evt, 0) != pdPASS) {
|
||||
WPA3_HOSTAP_AUTH_API_UNLOCK();
|
||||
wpa_printf(MSG_DEBUG, "failed to add msg to queue front");
|
||||
os_free(evt);
|
||||
return ESP_FAIL;
|
||||
}
|
||||
@ -384,6 +387,7 @@ int wpa3_hostap_post_evt(uint32_t evt_id, uint32_t data)
|
||||
if (os_queue_send(g_wpa3_hostap_evt_queue, &evt, 0) != pdPASS) {
|
||||
WPA3_HOSTAP_AUTH_API_UNLOCK();
|
||||
os_free(evt);
|
||||
wpa_printf(MSG_DEBUG, "failed to send msg to queue");
|
||||
return ESP_FAIL;
|
||||
}
|
||||
}
|
||||
|
@ -148,3 +148,4 @@ static inline int wps_set_status(uint32_t status)
|
||||
bool is_wps_enabled(void);
|
||||
int wps_init_cfg_pin(struct wps_config *cfg);
|
||||
void wifi_station_wps_eapol_start_handle(void *data, void *user_ctx);
|
||||
int wifi_ap_wps_disable_internal(void);
|
||||
|
Loading…
Reference in New Issue
Block a user