diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_hostap.c b/components/wpa_supplicant/esp_supplicant/src/esp_hostap.c index 3beb7590da..faf643b75c 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 @@ -238,6 +239,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 3aa198994f..f0d8959b9e 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_wpa3.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_wpa3.c @@ -364,16 +364,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; } @@ -381,6 +384,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 e7d030f37a..f7868df895 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_wps_i.h +++ b/components/wpa_supplicant/esp_supplicant/src/esp_wps_i.h @@ -147,3 +147,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);