From 615d928aa59315f81f052b34f59db7eb502e8199 Mon Sep 17 00:00:00 2001 From: Sarvesh Bodakhe Date: Wed, 10 Jan 2024 15:19:53 +0530 Subject: [PATCH] fix(esp_wifi): Add support for WPA3 + WPA3_EXT_PSK mixed mode and minor bugfixes - Add support for WPA3 + WPA3_EXT_PSK mixed mode - Improvements in scan and connect path as per specifications along with minor bugfixes - When AP advertises all PSK modes (WPA, WPA2 and WPA3), make sure that station treats it as WPA2_WPA3_PSK mixed mode. Closes https://github.com/espressif/esp-idf/issues/12517 --- components/esp_wifi/include/esp_wifi_types.h | 3 ++- components/esp_wifi/lib | 2 +- examples/wifi/scan/main/scan.c | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/esp_wifi/include/esp_wifi_types.h b/components/esp_wifi/include/esp_wifi_types.h index b5d9affc5b..62aca03a4e 100644 --- a/components/esp_wifi/include/esp_wifi_types.h +++ b/components/esp_wifi/include/esp_wifi_types.h @@ -56,7 +56,7 @@ 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 < WPA3_EXT_PSK */ +/* OPEN < WEP < WPA_PSK < OWE < WPA2_PSK = WPA_WPA2_PSK < WAPI_PSK < WPA3_PSK = WPA2_WPA3_PSK < WPA3_EXT_PSK = WPA3_EXT_PSK_MIXED_MODE */ typedef enum { WIFI_AUTH_OPEN = 0, /**< authenticate mode : open */ WIFI_AUTH_WEP, /**< authenticate mode : WEP */ @@ -71,6 +71,7 @@ typedef enum { WIFI_AUTH_OWE, /**< authenticate mode : OWE */ WIFI_AUTH_WPA3_ENT_192, /**< authenticate mode : WPA3_ENT_SUITE_B_192_BIT */ WIFI_AUTH_WPA3_EXT_PSK, /**< authenticate mode : WPA3_PSK_EXT_KEY */ + WIFI_AUTH_WPA3_EXT_PSK_MIXED_MODE, /**< authenticate mode: WPA3_PSK + WPA3_PSK_EXT_KEY */ WIFI_AUTH_MAX } wifi_auth_mode_t; diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 6f6e34ba09..b4991a9d22 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 6f6e34ba09ee39817276e4886bc868705f8062d8 +Subproject commit b4991a9d2216f2cab9d7dfa1ed666be478f1aee0 diff --git a/examples/wifi/scan/main/scan.c b/examples/wifi/scan/main/scan.c index 9bd3ab271d..14b6935b5d 100644 --- a/examples/wifi/scan/main/scan.c +++ b/examples/wifi/scan/main/scan.c @@ -58,6 +58,9 @@ static void print_auth_mode(int authmode) case WIFI_AUTH_WPA3_EXT_PSK: ESP_LOGI(TAG, "Authmode \tWIFI_AUTH_WPA3_EXT_PSK"); break; + case WIFI_AUTH_WPA3_EXT_PSK_MIXED_MODE: + ESP_LOGI(TAG, "Authmode \tWIFI_AUTH_WPA3_EXT_PSK_MIXED_MODE"); + break; default: ESP_LOGI(TAG, "Authmode \tWIFI_AUTH_UNKNOWN"); break;