From 33aff4c5a032333b701ea6c1d83bc7b2916eb532 Mon Sep 17 00:00:00 2001 From: aditi_lonkar Date: Sun, 11 Jun 2023 22:43:24 +0530 Subject: [PATCH] Fix for sending deauth before Eap-Failure in WPS --- components/wpa_supplicant/src/ap/sta_info.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/components/wpa_supplicant/src/ap/sta_info.c b/components/wpa_supplicant/src/ap/sta_info.c index 810125691ea..66e856ebeed 100644 --- a/components/wpa_supplicant/src/ap/sta_info.c +++ b/components/wpa_supplicant/src/ap/sta_info.c @@ -198,15 +198,6 @@ static void ap_sta_delayed_1x_auth_fail_cb(void *eloop_ctx, void *timeout_ctx) void ap_sta_delayed_1x_auth_fail_disconnect(struct hostapd_data *hapd, struct sta_info *sta) { -#ifdef ESP_SUPPLICANT - wpa_dbg(hapd->msg_ctx, MSG_DEBUG, - "IEEE 802.1X: Scheduled disconnection of " MACSTR - " after EAP-Failure", MAC2STR(sta->addr)); - - esp_wifi_ap_deauth_internal(sta->addr, WLAN_REASON_IEEE_802_1X_AUTH_FAILED); - if (wps_get_status() == WPS_STATUS_PENDING) - wps_set_status(WPS_STATUS_DISABLE); -#else wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "IEEE 802.1X: Force disconnection of " MACSTR " after EAP-Failure in 10 ms", MAC2STR(sta->addr)); @@ -219,7 +210,8 @@ void ap_sta_delayed_1x_auth_fail_disconnect(struct hostapd_data *hapd, eloop_cancel_timeout(ap_sta_delayed_1x_auth_fail_cb, hapd, sta); eloop_register_timeout(0, 10000, ap_sta_delayed_1x_auth_fail_cb, hapd, sta); -#endif + if (wps_get_status() == WPS_STATUS_PENDING) + wps_set_status(WPS_STATUS_SUCCESS); }