From ab99551f8ccc715777eb99c34c1ae8c5209f77c8 Mon Sep 17 00:00:00 2001 From: Kapil Gupta Date: Mon, 7 Oct 2024 10:53:28 +0530 Subject: [PATCH] fix(esp_wifi): Deinit WPS registrar during hostapd deinit --- components/wpa_supplicant/esp_supplicant/src/esp_hostap.c | 3 ++- components/wpa_supplicant/esp_supplicant/src/esp_wps_i.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/components/wpa_supplicant/esp_supplicant/src/esp_hostap.c b/components/wpa_supplicant/esp_supplicant/src/esp_hostap.c index 5cbedd6dc4..2b78fbf24d 100644 --- a/components/wpa_supplicant/esp_supplicant/src/esp_hostap.c +++ b/components/wpa_supplicant/esp_supplicant/src/esp_hostap.c @@ -18,6 +18,7 @@ #include "esp_wifi_driver.h" #include "esp_wifi_types.h" #include "esp_wps.h" +#include "esp_wps_i.h" struct hostapd_data *global_hapd; @@ -152,7 +153,7 @@ bool hostap_deinit(void *data) #ifdef CONFIG_WPS_REGISTRAR if (esp_wifi_get_wps_type_internal () != WPS_TYPE_DISABLE || esp_wifi_get_wps_status_internal() != WPS_STATUS_DISABLE) { - esp_wifi_ap_wps_disable(); + wifi_ap_wps_disable_internal(); } #endif /* CONFIG_WPS_REGISTRAR */ 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);