From 68d8b1e7ca40fb5e8d8ae4c169157e409b12dbaa Mon Sep 17 00:00:00 2001 From: "tarun.kumar" Date: Sun, 1 Dec 2024 15:54:11 +0530 Subject: [PATCH] fix(softAP): Adjusted authentication mode for wpa-eap version 1 --- components/esp_wifi/include/esp_wifi_types_generic.h | 7 ++++--- components/esp_wifi/lib | 2 +- components/wpa_supplicant/src/rsn_supp/wpa.c | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/components/esp_wifi/include/esp_wifi_types_generic.h b/components/esp_wifi/include/esp_wifi_types_generic.h index 3204661dc2..18f936540e 100644 --- a/components/esp_wifi/include/esp_wifi_types_generic.h +++ b/components/esp_wifi/include/esp_wifi_types_generic.h @@ -76,7 +76,7 @@ typedef struct { * @brief Wi-Fi authmode type * Strength of authmodes * Personal Networks : OPEN < WEP < WPA_PSK < OWE < WPA2_PSK = WPA_WPA2_PSK < WAPI_PSK < WPA3_PSK = WPA2_WPA3_PSK = DPP - * Enterprise Networks : WIFI_AUTH_WPA2_ENTERPRISE < WIFI_AUTH_WPA3_ENTERPRISE = WIFI_AUTH_WPA2_WPA3_ENTERPRISE < WIFI_AUTH_WPA3_ENT_192 + * Enterprise Networks : WIFI_AUTH_WPA_ENTERPRISE < WIFI_AUTH_WPA2_ENTERPRISE < WIFI_AUTH_WPA3_ENTERPRISE = WIFI_AUTH_WPA2_WPA3_ENTERPRISE < WIFI_AUTH_WPA3_ENT_192 */ typedef enum { WIFI_AUTH_OPEN = 0, /**< Authenticate mode : open */ @@ -84,8 +84,8 @@ typedef enum { WIFI_AUTH_WPA_PSK, /**< Authenticate mode : WPA_PSK */ WIFI_AUTH_WPA2_PSK, /**< Authenticate mode : WPA2_PSK */ WIFI_AUTH_WPA_WPA2_PSK, /**< Authenticate mode : WPA_WPA2_PSK */ - WIFI_AUTH_ENTERPRISE, /**< Authenticate mode : Wi-Fi EAP security */ - WIFI_AUTH_WPA2_ENTERPRISE = WIFI_AUTH_ENTERPRISE, /**< Authenticate mode : Wi-Fi EAP security */ + WIFI_AUTH_ENTERPRISE, /**< Authenticate mode : Wi-Fi EAP security, treated the same as WIFI_AUTH_WPA2_ENTERPRISE */ + WIFI_AUTH_WPA2_ENTERPRISE = WIFI_AUTH_ENTERPRISE, /**< Authenticate mode : WPA2-Enterprise security */ WIFI_AUTH_WPA3_PSK, /**< Authenticate mode : WPA3_PSK */ WIFI_AUTH_WPA2_WPA3_PSK, /**< Authenticate mode : WPA2_WPA3_PSK */ WIFI_AUTH_WAPI_PSK, /**< Authenticate mode : WAPI_PSK */ @@ -96,6 +96,7 @@ typedef enum { WIFI_AUTH_DPP, /**< Authenticate mode : DPP */ WIFI_AUTH_WPA3_ENTERPRISE, /**< Authenticate mode : WPA3-Enterprise Only Mode */ WIFI_AUTH_WPA2_WPA3_ENTERPRISE, /**< Authenticate mode : WPA3-Enterprise Transition Mode */ + WIFI_AUTH_WPA_ENTERPRISE, /**< Authenticate mode : WPA-Enterprise security */ WIFI_AUTH_MAX } wifi_auth_mode_t; diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 2b5492b9f1..4cf46685bf 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 2b5492b9f1b940d06f9d2636fa29279a9db4702d +Subproject commit 4cf46685bfe468a866eb38a52ad45a0aecad028b diff --git a/components/wpa_supplicant/src/rsn_supp/wpa.c b/components/wpa_supplicant/src/rsn_supp/wpa.c index 020e555cb1..788b05e42b 100644 --- a/components/wpa_supplicant/src/rsn_supp/wpa.c +++ b/components/wpa_supplicant/src/rsn_supp/wpa.c @@ -2261,7 +2261,7 @@ void wpa_set_profile(u32 wpa_proto, u8 auth_mode) struct wpa_sm *sm = &gWpaSm; sm->proto = wpa_proto; - if (auth_mode == WPA2_AUTH_ENT) { + if (auth_mode == WPA2_AUTH_ENT || (auth_mode == WPA_AUTH_UNSPEC)) { sm->key_mgmt = WPA_KEY_MGMT_IEEE8021X; /* for wpa2 enterprise */ } else if (auth_mode == WPA2_AUTH_ENT_SHA256) { sm->key_mgmt = WPA_KEY_MGMT_IEEE8021X_SHA256; /* for wpa2 enterprise sha256 */