From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id AA35B940E76 for ; Fri, 22 Mar 2024 01:22:31 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=+C7TgFW7xhTH/jc5sTlib6czWLqmEeAlp/FXSBYf4F4=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20240206; t=1711070550; v=1; b=mk1hORc83P9af8xDVNBq3oO9VRm9tCHer0k7gXR6/CGZ7k/Bb2h/q1cl2QZWNoShQhnJZTMF tuDa/pfKUpuQ2SQitq2SZylXK/KDHB6wbToZXL/Zb8E7A4/Cw1tTeLRfxUHtE5Djuld17wHQkJM xEw1djgj5Ue+lEiCoG6aItshTsorYPj+We6Nvw24GqE8LHZ5iDNwFfYmBz/lTlaMfxpSYi7HloS ApkqiVjZuGC45z9NsusOd1wyBLT1I9/AyUWhtIOYMJaeSjzoSgq0M7q/kIKzeY3Af0bxZ99K4/L A50HNOagYLd32qZbcTwEy0FYwsV3anJs13XWjQJdSGKfA== X-Received: by 127.0.0.2 with SMTP id PmZDYY7687511xA5ooqlyLlW; Thu, 21 Mar 2024 18:22:30 -0700 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by mx.groups.io with SMTP id smtpd.web10.2948.1711070549618058556 for ; Thu, 21 Mar 2024 18:22:29 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,11020"; a="28574284" X-IronPort-AV: E=Sophos;i="6.07,144,1708416000"; d="scan'208";a="28574284" X-Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Mar 2024 18:22:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,144,1708416000"; d="scan'208";a="45835307" X-Received: from mingtan1-desk1.ccr.corp.intel.com ([10.239.133.46]) by fmviesa001.fm.intel.com with ESMTP; 21 Mar 2024 18:16:23 -0700 From: "Tan, Ming" To: devel@edk2.groups.io Cc: Saloni Kasbekar , Zachary Clark-williams , Dandan Bi , Felix Polyudov , Liqi Liu Subject: [edk2-devel] [PATCH] NetworkPkg/WifiConnectionManagerDxe: Update UI according to UEFI spec Date: Fri, 22 Mar 2024 09:16:11 +0800 Message-Id: <20240322011611.7297-1-ming.tan@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Thu, 21 Mar 2024 18:22:29 -0700 Reply-To: devel@edk2.groups.io,ming.tan@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 13s1U5hLcs0e69ZN6tvxzJX0x7686176AA= Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=mk1hORc8; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4736 In UEFI_Spec_2_10_Aug29.pdf page 1694 section 35.5.4 for EFI_BROWSER_ACTION_FORM_OPEN: NOTE: EFI_FORM_BROWSER2_PROTOCOL.BrowserCallback() cannot be used with this browser action because question values have not been retrieved yet. So should not call HiiGetBrowserData() and HiiSetBrowserData() in FORM_OPEN call back function. Now use wifi list key and enroll cert key instead of the connect action key, move wifi info display from open action to close action. Cc: Saloni Kasbekar Cc: Zachary Clark-williams Cc: Dandan Bi Cc: Felix Polyudov Signed-off-by: Liqi Liu Signed-off-by: Ming Tan --- PR: https://github.com/tianocore/edk2/pull/5487 .../WifiConnectionMgrHiiConfigAccess.c | 113 ++++++++++++------ 1 file changed, 74 insertions(+), 39 deletions(-) diff --git a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfig= Access.c b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAc= cess.c index 431fcbb33a..f242bdf056 100644 --- a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess.c +++ b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess.c @@ -1412,7 +1412,9 @@ WifiMgrDxeHiiConfigAccessCallback ( return EFI_OUT_OF_RESOURCES;=0D }=0D =0D - HiiGetBrowserData (&gWifiConfigFormSetGuid, mVendorStorageName, BufferSi= ze, (UINT8 *)IfrNvData);=0D + if (Action !=3D EFI_BROWSER_ACTION_FORM_OPEN) {=0D + HiiGetBrowserData (&gWifiConfigFormSetGuid, mVendorStorageName, Buffer= Size, (UINT8 *)IfrNvData);=0D + }=0D =0D if (Action =3D=3D EFI_BROWSER_ACTION_FORM_OPEN) {=0D switch (QuestionId) {=0D @@ -1438,43 +1440,6 @@ WifiMgrDxeHiiConfigAccessCallback ( =0D break;=0D =0D - case KEY_CONNECT_ACTION:=0D -=0D - if (Private->CurrentNic->UserSelectedProfile =3D=3D NULL) {=0D - break;=0D - }=0D -=0D - Profile =3D Private->CurrentNic->UserSelectedProfile;=0D -=0D - //=0D - // Enter the network connection configuration page=0D - // Recovery from restored data=0D - //=0D - if (HiiSetString (Private->RegisteredHandle, STRING_TOKEN (STR_SSI= D), Profile->SSId, NULL) =3D=3D 0) {=0D - return EFI_OUT_OF_RESOURCES;=0D - }=0D -=0D - IfrNvData->SecurityType =3D Profile->SecurityType;=0D - if (HiiSetString (=0D - Private->RegisteredHandle,=0D - STRING_TOKEN (STR_SECURITY_TYPE),=0D - mSecurityType[IfrNvData->SecurityType],=0D - NULL=0D - ) =3D=3D 0)=0D - {=0D - return EFI_OUT_OF_RESOURCES;=0D - }=0D -=0D - if ((IfrNvData->SecurityType =3D=3D SECURITY_TYPE_WPA2_ENTERPRISE)= ||=0D - (IfrNvData->SecurityType =3D=3D SECURITY_TYPE_WPA3_ENTERPRISE)= )=0D - {=0D - IfrNvData->EapAuthMethod =3D Profile->EapAuthMethod;=0D - IfrNvData->EapSecondAuthMethod =3D Profile->EapSecondAuthMethod;= =0D - StrCpyS (IfrNvData->EapIdentity, EAP_IDENTITY_SIZE, Profile->Eap= Identity);=0D - }=0D -=0D - break;=0D -=0D case KEY_ENROLLED_CERT_NAME:=0D =0D if (Private->CurrentNic->UserSelectedProfile =3D=3D NULL) {=0D @@ -1524,6 +1489,43 @@ WifiMgrDxeHiiConfigAccessCallback ( }=0D } else if (Action =3D=3D EFI_BROWSER_ACTION_FORM_CLOSE) {=0D switch (QuestionId) {=0D + case KEY_EAP_ENROLL_CERT_FROM_FILE:=0D +=0D + if (Private->CurrentNic->UserSelectedProfile =3D=3D NULL) {=0D + break;=0D + }=0D +=0D + Profile =3D Private->CurrentNic->UserSelectedProfile;=0D +=0D + //=0D + // Enter the network connection configuration page=0D + // Recovery from restored data=0D + //=0D + if (HiiSetString (Private->RegisteredHandle, STRING_TOKEN (STR_SSI= D), Profile->SSId, NULL) =3D=3D 0) {=0D + return EFI_OUT_OF_RESOURCES;=0D + }=0D +=0D + IfrNvData->SecurityType =3D Profile->SecurityType;=0D + if (HiiSetString (=0D + Private->RegisteredHandle,=0D + STRING_TOKEN (STR_SECURITY_TYPE),=0D + mSecurityType[IfrNvData->SecurityType],=0D + NULL=0D + ) =3D=3D 0)=0D + {=0D + return EFI_OUT_OF_RESOURCES;=0D + }=0D +=0D + if ( (IfrNvData->SecurityType =3D=3D SECURITY_TYPE_WPA2_ENTERPRIS= E)=0D + || (IfrNvData->SecurityType =3D=3D SECURITY_TYPE_WPA3_ENTERPRIS= E))=0D + {=0D + IfrNvData->EapAuthMethod =3D Profile->EapAuthMethod;=0D + IfrNvData->EapSecondAuthMethod =3D Profile->EapSecondAuthMethod;= =0D + StrCpyS (IfrNvData->EapIdentity, EAP_IDENTITY_SIZE, Profile->Eap= Identity);=0D + }=0D +=0D + break;=0D +=0D case KEY_CONNECT_ACTION:=0D =0D if (Private->CurrentNic->UserSelectedProfile =3D=3D NULL) {=0D @@ -1909,6 +1911,39 @@ WifiMgrDxeHiiConfigAccessCallback ( NULL=0D );=0D }=0D +=0D + if (Private->CurrentNic->UserSelectedProfile =3D=3D NULL) {=0D + break;=0D + }=0D +=0D + Profile =3D Private->CurrentNic->UserSelectedProfile;=0D +=0D + //=0D + // Enter the network connection configuration page=0D + // Recovery from restored data=0D + //=0D + if (HiiSetString (Private->RegisteredHandle, STRING_TOKEN (STR_S= SID), Profile->SSId, NULL) =3D=3D 0) {=0D + return EFI_OUT_OF_RESOURCES;=0D + }=0D +=0D + IfrNvData->SecurityType =3D Profile->SecurityType;=0D + if (HiiSetString (=0D + Private->RegisteredHandle,=0D + STRING_TOKEN (STR_SECURITY_TYPE),=0D + mSecurityType[IfrNvData->SecurityType],=0D + NULL=0D + ) =3D=3D 0)=0D + {=0D + return EFI_OUT_OF_RESOURCES;=0D + }=0D +=0D + if ( (IfrNvData->SecurityType =3D=3D SECURITY_TYPE_WPA2_ENTERPR= ISE)=0D + || (IfrNvData->SecurityType =3D=3D SECURITY_TYPE_WPA3_ENTERPR= ISE))=0D + {=0D + IfrNvData->EapAuthMethod =3D Profile->EapAuthMethod;=0D + IfrNvData->EapSecondAuthMethod =3D Profile->EapSecondAuthMetho= d;=0D + StrCpyS (IfrNvData->EapIdentity, EAP_IDENTITY_SIZE, Profile->E= apIdentity);=0D + }=0D }=0D =0D break;=0D @@ -1944,7 +1979,7 @@ WifiMgrDxeHiiConfigAccessCallback ( }=0D }=0D =0D - if (!EFI_ERROR (Status)) {=0D + if (!EFI_ERROR (Status) && (Action !=3D EFI_BROWSER_ACTION_FORM_OPEN)) {= =0D //=0D // Pass changed uncommitted data back to Form Browser.=0D //=0D --=20 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#117021): https://edk2.groups.io/g/devel/message/117021 Mute This Topic: https://groups.io/mt/105077953/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-