diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_hostap.c b/components/wpa_supplicant/esp_supplicant/src/esp_hostap.c index 4469e6d8e4..45c256bf93 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_hostap.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_hostap.c @@ -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 */ diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_wpa3.c b/components/wpa_supplicant/esp_supplicant/src/esp_wpa3.c index 0365062780..27b0f05b16 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_wpa3.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_wpa3.c @@ -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; } } diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_wps_i.h b/components/wpa_supplicant/esp_supplicant/src/esp_wps_i.h index b6882f1852..94bbf17f0e 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_wps_i.h +++ b/components/wpa_supplicant/esp_supplicant/src/esp_wps_i.h @@ -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);