From 61a13d7e3b7d6aae480ef8f440e92a8ccf0b1534 Mon Sep 17 00:00:00 2001 From: Sarvesh Bodakhe Date: Thu, 17 Oct 2024 09:44:22 +0530 Subject: [PATCH] fix(wifi): Add support to recongize different WPA3 Authentication modes from specs Add support to recognize APs supporting 'WPA3-Enterprise-Only Mode' and 'WPA3-Enterprise-Transition Mode' using authmodes WIFI_AUTH_WPA3_ENTERPRISE and WIFI_AUTH_WPA2_WPA3_ENTERPRISE, respectively. --- components/esp_wifi/include/esp_wifi_types_generic.h | 5 ++++- components/esp_wifi/lib | 2 +- examples/wifi/scan/main/scan.c | 6 ++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/components/esp_wifi/include/esp_wifi_types_generic.h b/components/esp_wifi/include/esp_wifi_types_generic.h index 3e49682df5..74e2a4fb7c 100644 --- a/components/esp_wifi/include/esp_wifi_types_generic.h +++ b/components/esp_wifi/include/esp_wifi_types_generic.h @@ -62,7 +62,8 @@ typedef struct { } wifi_country_t; /* Strength of authmodes */ -/* OPEN < WEP < WPA_PSK < OWE < WPA2_PSK = WPA_WPA2_PSK < WAPI_PSK < WPA3_PSK = WPA2_WPA3_PSK = DPP */ +/* 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 */ typedef enum { WIFI_AUTH_OPEN = 0, /**< authenticate mode : open */ WIFI_AUTH_WEP, /**< authenticate mode : WEP */ @@ -79,6 +80,8 @@ typedef enum { WIFI_AUTH_WPA3_EXT_PSK, /**< this authentication mode will yield same result as WIFI_AUTH_WPA3_PSK and not recommended to be used. It will be deprecated in future, please use WIFI_AUTH_WPA3_PSK instead. */ WIFI_AUTH_WPA3_EXT_PSK_MIXED_MODE, /**< this authentication mode will yield same result as WIFI_AUTH_WPA3_PSK and not recommended to be used. It will be deprecated in future, please use WIFI_AUTH_WPA3_PSK instead.*/ 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_MAX } wifi_auth_mode_t; diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 5dca4edbc4..41b2e6890d 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 5dca4edbc4c5e20406878926fb24e9bbfcb67e88 +Subproject commit 41b2e6890dec98eef2756b6fccd2d4f1417ec9d6 diff --git a/examples/wifi/scan/main/scan.c b/examples/wifi/scan/main/scan.c index 1f4be36b22..2dd34ff907 100644 --- a/examples/wifi/scan/main/scan.c +++ b/examples/wifi/scan/main/scan.c @@ -59,6 +59,12 @@ static void print_auth_mode(int authmode) case WIFI_AUTH_WPA2_WPA3_PSK: ESP_LOGI(TAG, "Authmode \tWIFI_AUTH_WPA2_WPA3_PSK"); break; + case WIFI_AUTH_WPA3_ENTERPRISE: + ESP_LOGI(TAG, "Authmode \tWIFI_AUTH_WPA3_ENTERPRISE"); + break; + case WIFI_AUTH_WPA2_WPA3_ENTERPRISE: + ESP_LOGI(TAG, "Authmode \tWIFI_AUTH_WPA2_WPA3_ENTERPRISE"); + break; case WIFI_AUTH_WPA3_ENT_192: ESP_LOGI(TAG, "Authmode \tWIFI_AUTH_WPA3_ENT_192"); break;