From nobody Mon May 6 15:28:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+90746+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+90746+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1656057591470122.5071578731081; Fri, 24 Jun 2022 00:59:51 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id b74fYY1788612xVUDDLMatyK; Fri, 24 Jun 2022 00:59:51 -0700 X-Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web09.5113.1656057590344765947 for ; Fri, 24 Jun 2022 00:59:50 -0700 X-IronPort-AV: E=McAfee;i="6400,9594,10387"; a="261374999" X-IronPort-AV: E=Sophos;i="5.92,218,1650956400"; d="scan'208";a="261374999" X-Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2022 00:59:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,218,1650956400"; d="scan'208";a="645164913" X-Received: from hengluo-dev.ccr.corp.intel.com ([10.239.153.141]) by fmsmga008.fm.intel.com with ESMTP; 24 Jun 2022 00:59:48 -0700 From: "Heng Luo" To: devel@edk2.groups.io Cc: Maciej Rabeda , Fu Siyuan , Wu Jiaxin Subject: [edk2-devel] [PATCH] NetworkPkg: Add Wi-Fi Wpa3 support in WifiConnectManager Date: Fri, 24 Jun 2022 15:59:44 +0800 Message-Id: <20220624075944.2374-1-heng.luo@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,heng.luo@intel.com X-Gm-Message-State: mTpcLkv7hsdryDkgew122pHjx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1656057591; bh=ksmRp3pgdq+tLdIPwebwmaTW4XoPL23+gZUpgVQCK7I=; h=Cc:Date:From:Reply-To:Subject:To; b=IUWvnK2oC4YjahY7MIUjksMEO5Sv5bW8o2XMtwVFn+hsm+Qf4F5k0rCJxsg1Lv4laT0 cSymg94PzBP+9b5gglJJogfK6AN9Xnj1zOptZ2Uw4oVMw2+rIW90mPjk9TTuP+RPXW2tN 28xt/xeVt4mVPzRRKPYF+xlfbQhpBHxUPUs= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1656057592318100001 Content-Type: text/plain; charset="utf-8" https://bugzilla.tianocore.org/show_bug.cgi?id=3D3961 Add below Wpa3 support: WPA3-Personal: Ieee80211AkmSuiteSAE =3D 8 WPA3-Enterprise: Ieee80211AkmSuite8021XSuiteB =3D 11 Ieee80211AkmSuite8021XSuiteB192 =3D 12 Wi-Fi CERTIFIED Enhanced Open: Ieee80211AkmSuiteOWE =3D 18 Cc: Maciej Rabeda Cc: Fu Siyuan Cc: Wu Jiaxin Signed-off-by: Heng Luo Reviewed-by: Maciej Rabeda --- .../WifiConnectionManagerDxe.vfr | 8 +- .../WifiConnectionMgrConfigNVDataStruct.h | 8 +- .../WifiConnectionMgrDxe.h | 18 ++++- .../WifiConnectionMgrHiiConfigAccess.c | 37 ++++++--- .../WifiConnectionMgrImpl.c | 4 +- .../WifiConnectionMgrMisc.c | 77 ++++++++++++++++--- 6 files changed, 119 insertions(+), 33 deletions(-) diff --git a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionManagerDxe.v= fr b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionManagerDxe.vfr index b0ef187535..704f2b6a54 100644 --- a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionManagerDxe.vfr +++ b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionManagerDxe.vfr @@ -1,7 +1,7 @@ /** @file Vfr files used in WiFi Connection Manager. =20 - Copyright (c) 2019, Intel Corporation. All rights reserved.
+ Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -121,7 +121,8 @@ formset text =3D STRING_TOKEN(STR_SECURITY_TYPE); // TextTwo =20 =20 - suppressif NOT ideqval WIFI_MANAGER_IFR_NVDATA.SecurityType =3D=3D SEC= URITY_TYPE_WPA2_PERSONAL; + suppressif NOT ideqval WIFI_MANAGER_IFR_NVDATA.SecurityType =3D=3D SEC= URITY_TYPE_WPA2_PERSONAL + AND NOT ideqval WIFI_MANAGER_IFR_NVDATA.SecurityType =3D=3D SECURITY= _TYPE_WPA3_PERSONAL; password varid =3D WIFI_MANAGER_IFR_NVDATA.Password, prompt =3D STRING_TOKEN(STR_PASSWORD), help =3D STRING_TOKEN(STR_PASSWORD_HELP), @@ -132,7 +133,8 @@ formset endpassword; endif; =20 - suppressif NOT ideqval WIFI_MANAGER_IFR_NVDATA.SecurityType =3D=3D SEC= URITY_TYPE_WPA2_ENTERPRISE; + suppressif NOT ideqval WIFI_MANAGER_IFR_NVDATA.SecurityType =3D=3D SEC= URITY_TYPE_WPA2_ENTERPRISE + AND NOT ideqval WIFI_MANAGER_IFR_NVDATA.SecurityType =3D=3D SECURITY= _TYPE_WPA3_ENTERPRISE; =20 oneof varid =3D WIFI_MANAGER_IFR_NVDATA.EapAuthMethod, questionid =3D KEY_EAP_AUTH_METHOD_CONNECT_NETWORK, diff --git a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrConfigNVD= ataStruct.h b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrConfigNV= DataStruct.h index 69878bc457..b5518a74d8 100644 --- a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrConfigNVDataStru= ct.h +++ b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrConfigNVDataStru= ct.h @@ -1,7 +1,7 @@ /** @file Define IFR NVData structures used by the WiFi Connection Manager. =20 - Copyright (c) 2019, Intel Corporation. All rights reserved.
+ Copyright (c) 2019 - 2022, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -119,8 +119,10 @@ #define SECURITY_TYPE_WPA_PERSONAL 3 #define SECURITY_TYPE_WPA2_PERSONAL 4 #define SECURITY_TYPE_WEP 5 -#define SECURITY_TYPE_UNKNOWN 6 -#define SECURITY_TYPE_MAX 7 +#define SECURITY_TYPE_WPA3_PERSONAL 6 +#define SECURITY_TYPE_WPA3_ENTERPRISE 7 +#define SECURITY_TYPE_UNKNOWN 8 +#define SECURITY_TYPE_MAX 9 =20 #define EAP_AUTH_METHOD_TTLS 0 #define EAP_AUTH_METHOD_PEAP 1 diff --git a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrDxe.h b/N= etworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrDxe.h index c3c70b2752..7b2e41e155 100644 --- a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrDxe.h +++ b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrDxe.h @@ -1,7 +1,7 @@ /** @file The miscellaneous structure definitions for WiFi connection driver. =20 - Copyright (c) 2019, Intel Corporation. All rights reserved.
+ Copyright (c) 2019 - 2022, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -82,6 +82,8 @@ typedef enum { Ieee80211PairwiseCipherSuiteCCMP =3D 4, Ieee80211PairwiseCipherSuiteWEP104 =3D 5, Ieee80211PairwiseCipherSuiteBIP =3D 6, + Ieee80211PairwiseCipherSuiteGCMP =3D 8, + Ieee80211PairwiseCipherSuiteGCMP256 =3D 9, // ... } IEEE_80211_PAIRWISE_CIPHER_SUITE; =20 @@ -91,19 +93,29 @@ typedef enum { #define IEEE_80211_PAIRWISE_CIPHER_SUITE_CCMP (OUI_IEEE_80211I | (Ie= ee80211PairwiseCipherSuiteCCMP << 24)) #define IEEE_80211_PAIRWISE_CIPHER_SUITE_WEP104 (OUI_IEEE_80211I | (Ie= ee80211PairwiseCipherSuiteWEP104 << 24)) #define IEEE_80211_PAIRWISE_CIPHER_SUITE_BIP (OUI_IEEE_80211I | (Ie= ee80211PairwiseCipherSuiteBIP << 24)) +#define IEEE_80211_PAIRWISE_CIPHER_SUITE_GCMP (OUI_IEEE_80211I | (Ie= ee80211PairwiseCipherSuiteGCMP << 24)) +#define IEEE_80211_PAIRWISE_CIPHER_SUITE_GCMP256 (OUI_IEEE_80211I | (Ie= ee80211PairwiseCipherSuiteGCMP256 << 24)) =20 typedef enum { Ieee80211AkmSuite8021XOrPMKSA =3D 1, Ieee80211AkmSuitePSK =3D 2, Ieee80211AkmSuite8021XOrPMKSASHA256 =3D 5, - Ieee80211AkmSuitePSKSHA256 =3D 6 - // ... + Ieee80211AkmSuitePSKSHA256 =3D 6, + Ieee80211AkmSuiteSAE =3D 8, + Ieee80211AkmSuite8021XSuiteB =3D 11, + Ieee80211AkmSuite8021XSuiteB192 =3D 12, + Ieee80211AkmSuiteOWE =3D 18, + // ... } IEEE_80211_AKM_SUITE; =20 #define IEEE_80211_AKM_SUITE_8021X_OR_PMKSA (OUI_IEEE_80211I | (Ie= ee80211AkmSuite8021XOrPMKSA << 24)) #define IEEE_80211_AKM_SUITE_PSK (OUI_IEEE_80211I | (Ie= ee80211AkmSuitePSK << 24)) #define IEEE_80211_AKM_SUITE_8021X_OR_PMKSA_SHA256 (OUI_IEEE_80211I | (Ie= ee80211AkmSuite8021XOrPMKSASHA256 << 24)) #define IEEE_80211_AKM_SUITE_PSK_SHA256 (OUI_IEEE_80211I | (Ie= ee80211AkmSuitePSKSHA256 << 24)) +#define IEEE_80211_AKM_SUITE_SAE (OUI_IEEE_80211I | (Ie= ee80211AkmSuiteSAE << 24)) +#define IEEE_80211_AKM_SUITE_8021X_SUITE_B (OUI_IEEE_80211I | (Ie= ee80211AkmSuite8021XSuiteB << 24)) +#define IEEE_80211_AKM_SUITE_8021X_SUITE_B192 (OUI_IEEE_80211I | (Ie= ee80211AkmSuite8021XSuiteB192 << 24)) +#define IEEE_80211_AKM_SUITE_OWE (OUI_IEEE_80211I | (Ie= ee80211AkmSuiteOWE << 24)) =20 // // Protocol instances diff --git a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfig= Access.c b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAc= cess.c index 7cb2bfc281..431fcbb33a 100644 --- a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess.c +++ b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess.c @@ -1,7 +1,7 @@ /** @file The Hii functions for WiFi Connection Manager. =20 - Copyright (c) 2019, Intel Corporation. All rights reserved.
+ Copyright (c) 2019 - 2022, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -50,6 +50,8 @@ CHAR16 *mSecurityType[] =3D { L"WPA-Personal ", L"WPA2-Personal ", L"WEP ", + L"WPA3-Personal ", + L"WPA3-Enterprise", L"UnKnown " }; =20 @@ -269,6 +271,7 @@ WifiMgrGetStrAKMList ( UINT8 Index; UINT16 AKMSuiteCount; CHAR16 *AKMListDisplay; + UINTN Length; =20 AKMListDisplay =3D NULL; if ((Profile =3D=3D NULL) || (Profile->Network.AKMSuite =3D=3D NULL)) { @@ -278,23 +281,24 @@ WifiMgrGetStrAKMList ( AKMSuiteCount =3D Profile->Network.AKMSuite->AKMSuiteCount; if (AKMSuiteCount !=3D 0) { // - // Current AKM Suite is between 1-9 + // Current AKM Suite is between 1-18 // - AKMListDisplay =3D (CHAR16 *)AllocateZeroPool (sizeof (CHAR16) * (AKMS= uiteCount * 2 + 1)); + AKMListDisplay =3D (CHAR16 *)AllocateZeroPool (sizeof (CHAR16) * (AKMS= uiteCount * 3 + 1)); + Length =3D 0; if (AKMListDisplay !=3D NULL) { for (Index =3D 0; Index < AKMSuiteCount; Index++) { // - // The size of buffer should be 3 CHAR16 for Null-terminated Unico= de string. - // The first char is the AKM Suite number, the second char is ' ',= the third char is '\0'. + // The size of buffer should be 4 CHAR16 for Null-terminated Unico= de string. // UnicodeSPrint ( - AKMListDisplay + (Index * 2), - sizeof (CHAR16) * 3, + AKMListDisplay + Length, + sizeof (CHAR16) * 4, L"%d ", Profile->Network.AKMSuite->AKMSuiteList[Index].SuiteType ); + Length =3D StrLen (AKMListDisplay + Length) + Length; if (Index =3D=3D AKMSuiteCount - 1) { - *(AKMListDisplay + (Index * 2 + 1)) =3D L'\0'; + *(AKMListDisplay + (Length - 1)) =3D L'\0'; } } } @@ -1461,7 +1465,9 @@ WifiMgrDxeHiiConfigAccessCallback ( return EFI_OUT_OF_RESOURCES; } =20 - if (IfrNvData->SecurityType =3D=3D SECURITY_TYPE_WPA2_ENTERPRISE) { + if ((IfrNvData->SecurityType =3D=3D SECURITY_TYPE_WPA2_ENTERPRISE)= || + (IfrNvData->SecurityType =3D=3D SECURITY_TYPE_WPA3_ENTERPRISE)) + { IfrNvData->EapAuthMethod =3D Profile->EapAuthMethod; IfrNvData->EapSecondAuthMethod =3D Profile->EapSecondAuthMethod; StrCpyS (IfrNvData->EapIdentity, EAP_IDENTITY_SIZE, Profile->Eap= Identity); @@ -1529,7 +1535,9 @@ WifiMgrDxeHiiConfigAccessCallback ( // // Restore User Config Data for Page recovery // - if (IfrNvData->SecurityType =3D=3D SECURITY_TYPE_WPA2_ENTERPRISE) { + if ((IfrNvData->SecurityType =3D=3D SECURITY_TYPE_WPA2_ENTERPRISE)= || + (IfrNvData->SecurityType =3D=3D SECURITY_TYPE_WPA3_ENTERPRISE)) + { Profile->EapAuthMethod =3D IfrNvData->EapAuthMethod; Profile->EapSecondAuthMethod =3D IfrNvData->EapSecondAuthMethod; StrCpyS (Profile->EapIdentity, EAP_IDENTITY_SIZE, IfrNvData->Eap= Identity); @@ -1598,12 +1606,17 @@ WifiMgrDxeHiiConfigAccessCallback ( // When this network is not currently connected, pend it to conn= ect. // if (Profile->AKMSuiteSupported && Profile->CipherSuiteSupported)= { - if ((Profile->SecurityType =3D=3D SECURITY_TYPE_NONE) || (Prof= ile->SecurityType =3D=3D SECURITY_TYPE_WPA2_PERSONAL)) { + if ((Profile->SecurityType =3D=3D SECURITY_TYPE_NONE) || + (Profile->SecurityType =3D=3D SECURITY_TYPE_WPA2_PERSONAL)= || + (Profile->SecurityType =3D=3D SECURITY_TYPE_WPA3_PERSONAL)) + { // // For Open network, connect directly. // ProfileToConnect =3D Profile; - } else if (Profile->SecurityType =3D=3D SECURITY_TYPE_WPA2_ENT= ERPRISE) { + } else if ((Profile->SecurityType =3D=3D SECURITY_TYPE_WPA2_EN= TERPRISE) || + (Profile->SecurityType =3D=3D SECURITY_TYPE_WPA3_EN= TERPRISE)) + { // // For WPA/WPA2-Enterprise network, conduct eap configuratio= n first. // Only EAP-TLS, TTLS and PEAP is supported now! diff --git a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.c b/= NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.c index 7630c0695c..59bac48c42 100644 --- a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.c +++ b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.c @@ -1,7 +1,7 @@ /** @file The Mac Connection2 Protocol adapter functions for WiFi Connection Manag= er. =20 - Copyright (c) 2019, Intel Corporation. All rights reserved.
+ Copyright (c) 2019 - 2022, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -848,6 +848,7 @@ WifiMgrPrepareConnection ( if (AKMSuiteSupported && CipherSuiteSupported) { switch (SecurityType) { case SECURITY_TYPE_WPA2_PERSONAL: + case SECURITY_TYPE_WPA3_PERSONAL: =20 Status =3D WifiMgrConfigPassword (Nic, Profile); if (EFI_ERROR (Status)) { @@ -863,6 +864,7 @@ WifiMgrPrepareConnection ( break; =20 case SECURITY_TYPE_WPA2_ENTERPRISE: + case SECURITY_TYPE_WPA3_ENTERPRISE: =20 Status =3D WifiMgrConfigEap (Nic, Profile); if (EFI_ERROR (Status)) { diff --git a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrMisc.c b/= NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrMisc.c index 4e7c241718..4ad5643c24 100644 --- a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrMisc.c +++ b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrMisc.c @@ -1,7 +1,7 @@ /** @file The Miscellaneous Routines for WiFi Connection Manager. =20 - Copyright (c) 2019, Intel Corporation. All rights reserved.
+ Copyright (c) 2019 - 2022, Intel Corporation. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -9,6 +9,24 @@ =20 #include "WifiConnectionMgrDxe.h" =20 +// +// STA AKM preference order +// REF: https://www.wi-fi.org/file/wpa3-specification +// +STATIC UINT32 mAKMSuitePreference[] =3D { + IEEE_80211_AKM_SUITE_8021X_SUITE_B192, // AKM Suite 12 + IEEE_80211_AKM_SUITE_8021X_SUITE_B, // AKM Suite 11 + IEEE_80211_AKM_SUITE_8021X_OR_PMKSA_SHA256, // AKM Suite 5 + IEEE_80211_AKM_SUITE_8021X_OR_PMKSA, // AKM Suite 1 + + IEEE_80211_AKM_SUITE_SAE, // AKM Suite 8 + IEEE_80211_AKM_SUITE_PSK_SHA256, // AKM Suite 6 + IEEE_80211_AKM_SUITE_PSK, // AKM Suite 2 + + IEEE_80211_AKM_SUITE_OWE // AKM Suite 18 +}; +#define AKM_SUITE_PREFERENCE_COUNT (sizeof (mAKMSuitePreference) / sizeo= f (UINT32)) + /** Empty function for event process function. =20 @@ -340,7 +358,7 @@ WifiMgrCheckRSN ( EFI_80211_AKM_SUITE_SELECTOR *SupportedAKMSuites; EFI_80211_CIPHER_SUITE_SELECTOR *SupportedSwCipherSuites; EFI_80211_CIPHER_SUITE_SELECTOR *SupportedHwCipherSuites; - EFI_80211_SUITE_SELECTOR *AKMSuite; + UINT32 *AKMSuite; EFI_80211_SUITE_SELECTOR *CipherSuite; UINT16 AKMIndex; UINT16 CipherIndex; @@ -371,18 +389,29 @@ WifiMgrCheckRSN ( return EFI_SUCCESS; } =20 - for (AKMIndex =3D 0; AKMIndex < AKMList->AKMSuiteCount; AKMIndex++) { - AKMSuite =3D AKMList->AKMSuiteList + AKMIndex; - if (WifiMgrSupportAKMSuite ( - SupportedAKMSuites->AKMSuiteCount, - (UINT32 *)SupportedAKMSuites->AKMSuiteList, - (UINT32 *)AKMSuite - )) + for (AKMIndex =3D 0; AKMIndex < AKM_SUITE_PREFERENCE_COUNT; AKMIndex++) { + AKMSuite =3D mAKMSuitePreference + AKMIndex; + if (WifiMgrSupportAKMSuite (AKMList->AKMSuiteCount, (UINT32 *)AKMList-= >AKMSuiteList, AKMSuite) && + WifiMgrSupportAKMSuite (SupportedAKMSuites->AKMSuiteCount, (UINT32= *)SupportedAKMSuites->AKMSuiteList, AKMSuite)) { if ((AKMSuiteSupported !=3D NULL) && (CipherSuiteSupported !=3D NULL= )) { *AKMSuiteSupported =3D TRUE; } =20 + // + // OWE transition mode allow CipherSuiteCount is 0 + // + if (CipherList->CipherSuiteCount =3D=3D 0) { + *SecurityType =3D WifiMgrGetSecurityType ((UINT32 *)AKMSuite, NULL= ); + if (*SecurityType !=3D SECURITY_TYPE_UNKNOWN) { + if ((AKMSuiteSupported !=3D NULL) && (CipherSuiteSupported !=3D = NULL)) { + *CipherSuiteSupported =3D TRUE; + } + + return EFI_SUCCESS; + } + } + for (CipherIndex =3D 0; CipherIndex < CipherList->CipherSuiteCount; = CipherIndex++) { CipherSuite =3D CipherList->CipherSuiteList + CipherIndex; =20 @@ -450,6 +479,10 @@ WifiMgrGetSecurityType ( IN UINT32 *CipherSuite ) { + if ((AKMSuite !=3D NULL) && (*AKMSuite =3D=3D IEEE_80211_AKM_SUITE_OWE))= { + return SECURITY_TYPE_NONE; + } + if (CipherSuite =3D=3D NULL) { if (AKMSuite =3D=3D NULL) { return SECURITY_TYPE_NONE; @@ -471,8 +504,10 @@ WifiMgrGetSecurityType ( return SECURITY_TYPE_UNKNOWN; } =20 - if ((*AKMSuite =3D=3D IEEE_80211_AKM_SUITE_8021X_OR_PMKSA) || - (*AKMSuite =3D=3D IEEE_80211_AKM_SUITE_8021X_OR_PMKSA_SHA256)) + if (*AKMSuite =3D=3D IEEE_80211_AKM_SUITE_SAE) { + return SECURITY_TYPE_WPA3_PERSONAL; + } else if ((*AKMSuite =3D=3D IEEE_80211_AKM_SUITE_8021X_OR_PMKSA) || + (*AKMSuite =3D=3D IEEE_80211_AKM_SUITE_8021X_OR_PMKSA_SHA25= 6)) { return SECURITY_TYPE_WPA2_ENTERPRISE; } else if ((*AKMSuite =3D=3D IEEE_80211_AKM_SUITE_PSK) || @@ -498,6 +533,26 @@ WifiMgrGetSecurityType ( } else { return SECURITY_TYPE_UNKNOWN; } + } else if (*CipherSuite =3D=3D IEEE_80211_PAIRWISE_CIPHER_SUITE_GCMP) { + if (AKMSuite =3D=3D NULL) { + return SECURITY_TYPE_UNKNOWN; + } + + if (*AKMSuite =3D=3D IEEE_80211_AKM_SUITE_8021X_SUITE_B) { + return SECURITY_TYPE_WPA3_ENTERPRISE; + } else { + return SECURITY_TYPE_UNKNOWN; + } + } else if (*CipherSuite =3D=3D IEEE_80211_PAIRWISE_CIPHER_SUITE_GCMP256)= { + if (AKMSuite =3D=3D NULL) { + return SECURITY_TYPE_UNKNOWN; + } + + if (*AKMSuite =3D=3D IEEE_80211_AKM_SUITE_8021X_SUITE_B192) { + return SECURITY_TYPE_WPA3_ENTERPRISE; + } else { + return SECURITY_TYPE_UNKNOWN; + } } else { return SECURITY_TYPE_UNKNOWN; } --=20 2.31.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#90746): https://edk2.groups.io/g/devel/message/90746 Mute This Topic: https://groups.io/mt/91960521/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-