public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH] NetworkPkg/WifiConnectionManagerDxe: Update UI according to UEFI spec
@ 2024-03-22  1:16 Tan, Ming
  2024-04-10 16:03 ` Clark-williams, Zachary
  0 siblings, 1 reply; 4+ messages in thread
From: Tan, Ming @ 2024-03-22  1:16 UTC (permalink / raw)
  To: devel
  Cc: Saloni Kasbekar, Zachary Clark-williams, Dandan Bi,
	Felix Polyudov, Liqi Liu

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4736

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 <saloni.kasbekar@intel.com>
Cc: Zachary Clark-williams <zachary.clark-williams@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Felix Polyudov <Felixp@ami.com>
Signed-off-by: Liqi Liu <liqi.liu@intel.com>
Signed-off-by: Ming Tan <ming.tan@intel.com>
---
  PR: https://github.com/tianocore/edk2/pull/5487

 .../WifiConnectionMgrHiiConfigAccess.c        | 113 ++++++++++++------
 1 file changed, 74 insertions(+), 39 deletions(-)

diff --git a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess.c b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess.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;
   }
 
-  HiiGetBrowserData (&gWifiConfigFormSetGuid, mVendorStorageName, BufferSize, (UINT8 *)IfrNvData);
+  if (Action != EFI_BROWSER_ACTION_FORM_OPEN) {
+    HiiGetBrowserData (&gWifiConfigFormSetGuid, mVendorStorageName, BufferSize, (UINT8 *)IfrNvData);
+  }
 
   if (Action == EFI_BROWSER_ACTION_FORM_OPEN) {
     switch (QuestionId) {
@@ -1438,43 +1440,6 @@ WifiMgrDxeHiiConfigAccessCallback (
 
         break;
 
-      case KEY_CONNECT_ACTION:
-
-        if (Private->CurrentNic->UserSelectedProfile == NULL) {
-          break;
-        }
-
-        Profile = Private->CurrentNic->UserSelectedProfile;
-
-        //
-        // Enter the network connection configuration page
-        // Recovery from restored data
-        //
-        if (HiiSetString (Private->RegisteredHandle, STRING_TOKEN (STR_SSID), Profile->SSId, NULL) == 0) {
-          return EFI_OUT_OF_RESOURCES;
-        }
-
-        IfrNvData->SecurityType = Profile->SecurityType;
-        if (HiiSetString (
-              Private->RegisteredHandle,
-              STRING_TOKEN (STR_SECURITY_TYPE),
-              mSecurityType[IfrNvData->SecurityType],
-              NULL
-              ) == 0)
-        {
-          return EFI_OUT_OF_RESOURCES;
-        }
-
-        if ((IfrNvData->SecurityType == SECURITY_TYPE_WPA2_ENTERPRISE) ||
-            (IfrNvData->SecurityType == SECURITY_TYPE_WPA3_ENTERPRISE))
-        {
-          IfrNvData->EapAuthMethod       = Profile->EapAuthMethod;
-          IfrNvData->EapSecondAuthMethod = Profile->EapSecondAuthMethod;
-          StrCpyS (IfrNvData->EapIdentity, EAP_IDENTITY_SIZE, Profile->EapIdentity);
-        }
-
-        break;
-
       case KEY_ENROLLED_CERT_NAME:
 
         if (Private->CurrentNic->UserSelectedProfile == NULL) {
@@ -1524,6 +1489,43 @@ WifiMgrDxeHiiConfigAccessCallback (
     }
   } else if (Action == EFI_BROWSER_ACTION_FORM_CLOSE) {
     switch (QuestionId) {
+      case KEY_EAP_ENROLL_CERT_FROM_FILE:
+
+        if (Private->CurrentNic->UserSelectedProfile == NULL) {
+          break;
+        }
+
+        Profile = Private->CurrentNic->UserSelectedProfile;
+
+        //
+        // Enter the network connection configuration page
+        // Recovery from restored data
+        //
+        if (HiiSetString (Private->RegisteredHandle, STRING_TOKEN (STR_SSID), Profile->SSId, NULL) == 0) {
+          return EFI_OUT_OF_RESOURCES;
+        }
+
+        IfrNvData->SecurityType = Profile->SecurityType;
+        if (HiiSetString (
+              Private->RegisteredHandle,
+              STRING_TOKEN (STR_SECURITY_TYPE),
+              mSecurityType[IfrNvData->SecurityType],
+              NULL
+              ) == 0)
+        {
+          return EFI_OUT_OF_RESOURCES;
+        }
+
+        if (  (IfrNvData->SecurityType == SECURITY_TYPE_WPA2_ENTERPRISE)
+           || (IfrNvData->SecurityType == SECURITY_TYPE_WPA3_ENTERPRISE))
+        {
+          IfrNvData->EapAuthMethod       = Profile->EapAuthMethod;
+          IfrNvData->EapSecondAuthMethod = Profile->EapSecondAuthMethod;
+          StrCpyS (IfrNvData->EapIdentity, EAP_IDENTITY_SIZE, Profile->EapIdentity);
+        }
+
+        break;
+
       case KEY_CONNECT_ACTION:
 
         if (Private->CurrentNic->UserSelectedProfile == NULL) {
@@ -1909,6 +1911,39 @@ WifiMgrDxeHiiConfigAccessCallback (
               NULL
               );
           }
+
+          if (Private->CurrentNic->UserSelectedProfile == NULL) {
+            break;
+          }
+
+          Profile = Private->CurrentNic->UserSelectedProfile;
+
+          //
+          // Enter the network connection configuration page
+          // Recovery from restored data
+          //
+          if (HiiSetString (Private->RegisteredHandle, STRING_TOKEN (STR_SSID), Profile->SSId, NULL) == 0) {
+            return EFI_OUT_OF_RESOURCES;
+          }
+
+          IfrNvData->SecurityType = Profile->SecurityType;
+          if (HiiSetString (
+                Private->RegisteredHandle,
+                STRING_TOKEN (STR_SECURITY_TYPE),
+                mSecurityType[IfrNvData->SecurityType],
+                NULL
+                ) == 0)
+          {
+            return EFI_OUT_OF_RESOURCES;
+          }
+
+          if (  (IfrNvData->SecurityType == SECURITY_TYPE_WPA2_ENTERPRISE)
+             || (IfrNvData->SecurityType == SECURITY_TYPE_WPA3_ENTERPRISE))
+          {
+            IfrNvData->EapAuthMethod       = Profile->EapAuthMethod;
+            IfrNvData->EapSecondAuthMethod = Profile->EapSecondAuthMethod;
+            StrCpyS (IfrNvData->EapIdentity, EAP_IDENTITY_SIZE, Profile->EapIdentity);
+          }
         }
 
         break;
@@ -1944,7 +1979,7 @@ WifiMgrDxeHiiConfigAccessCallback (
     }
   }
 
-  if (!EFI_ERROR (Status)) {
+  if (!EFI_ERROR (Status) && (Action != EFI_BROWSER_ACTION_FORM_OPEN)) {
     //
     // Pass changed uncommitted data back to Form Browser.
     //
-- 
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]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] [PATCH] NetworkPkg/WifiConnectionManagerDxe: Update UI according to UEFI spec
  2024-03-22  1:16 [edk2-devel] [PATCH] NetworkPkg/WifiConnectionManagerDxe: Update UI according to UEFI spec Tan, Ming
@ 2024-04-10 16:03 ` Clark-williams, Zachary
  2024-04-16  5:31   ` Michael D Kinney
  0 siblings, 1 reply; 4+ messages in thread
From: Clark-williams, Zachary @ 2024-04-10 16:03 UTC (permalink / raw)
  To: Tan, Ming, devel@edk2.groups.io
  Cc: Kasbekar, Saloni, Bi, Dandan, POLUDOV, FELIX, Liu, Liqi

Reviewed-by: Zachary Clark-Williams <zachary.clark-williams@intel.com>

-----Original Message-----
From: Tan, Ming <ming.tan@intel.com> 
Sent: Thursday, March 21, 2024 6:16 PM
To: devel@edk2.groups.io
Cc: Kasbekar, Saloni <saloni.kasbekar@intel.com>; Clark-williams, Zachary <zachary.clark-williams@intel.com>; Bi, Dandan <dandan.bi@intel.com>; POLUDOV, FELIX <felixp@ami.com>; Liu, Liqi <liqi.liu@intel.com>
Subject: [PATCH] NetworkPkg/WifiConnectionManagerDxe: Update UI according to UEFI spec

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4736

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 <saloni.kasbekar@intel.com>
Cc: Zachary Clark-williams <zachary.clark-williams@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Felix Polyudov <Felixp@ami.com>
Signed-off-by: Liqi Liu <liqi.liu@intel.com>
Signed-off-by: Ming Tan <ming.tan@intel.com>
---
  PR: https://github.com/tianocore/edk2/pull/5487

 .../WifiConnectionMgrHiiConfigAccess.c        | 113 ++++++++++++------
 1 file changed, 74 insertions(+), 39 deletions(-)

diff --git a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess.c b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess.c
index 431fcbb33a..f242bdf056 100644
--- a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess.c
+++ b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAcce
+++ ss.c
@@ -1412,7 +1412,9 @@ WifiMgrDxeHiiConfigAccessCallback (
     return EFI_OUT_OF_RESOURCES;   } -  HiiGetBrowserData (&gWifiConfigFormSetGuid, mVendorStorageName, BufferSize, (UINT8 *)IfrNvData);+  if (Action != EFI_BROWSER_ACTION_FORM_OPEN) {+    HiiGetBrowserData (&gWifiConfigFormSetGuid, mVendorStorageName, BufferSize, (UINT8 *)IfrNvData);+  }    if (Action == EFI_BROWSER_ACTION_FORM_OPEN) {     switch (QuestionId) {@@ -1438,43 +1440,6 @@ WifiMgrDxeHiiConfigAccessCallback (
          break; -      case KEY_CONNECT_ACTION:--        if (Private->CurrentNic->UserSelectedProfile == NULL) {-          break;-        }--        Profile = Private->CurrentNic->UserSelectedProfile;--        //-        // Enter the network connection configuration page-        // Recovery from restored data-        //-        if (HiiSetString (Private->RegisteredHandle, STRING_TOKEN (STR_SSID), Profile->SSId, NULL) == 0) {-          return EFI_OUT_OF_RESOURCES;-        }--        IfrNvData->SecurityType = Profile->SecurityType;-        if (HiiSetString (-              Private->RegisteredHandle,-              STRING_TOKEN (STR_SECURITY_TYPE),-              mSecurityType[IfrNvData->SecurityType],-              NULL-              ) == 0)-        {-          return EFI_OUT_OF_RESOURCES;-        }--        if ((IfrNvData->SecurityType == SECURITY_TYPE_WPA2_ENTERPRISE) ||-            (IfrNvData->SecurityType == SECURITY_TYPE_WPA3_ENTERPRISE))-        {-          IfrNvData->EapAuthMethod       = Profile->EapAuthMethod;-          IfrNvData->EapSecondAuthMethod = Profile->EapSecondAuthMethod;-          StrCpyS (IfrNvData->EapIdentity, EAP_IDENTITY_SIZE, Profile->EapIdentity);-        }--        break;-       case KEY_ENROLLED_CERT_NAME:          if (Private->CurrentNic->UserSelectedProfile == NULL) {@@ -1524,6 +1489,43 @@ WifiMgrDxeHiiConfigAccessCallback (
     }   } else if (Action == EFI_BROWSER_ACTION_FORM_CLOSE) {     switch (QuestionId) {+      case KEY_EAP_ENROLL_CERT_FROM_FILE:++        if (Private->CurrentNic->UserSelectedProfile == NULL) {+          break;+        }++        Profile = Private->CurrentNic->UserSelectedProfile;++        //+        // Enter the network connection configuration page+        // Recovery from restored data+        //+        if (HiiSetString (Private->RegisteredHandle, STRING_TOKEN (STR_SSID), Profile->SSId, NULL) == 0) {+          return EFI_OUT_OF_RESOURCES;+        }++        IfrNvData->SecurityType = Profile->SecurityType;+        if (HiiSetString (+              Private->RegisteredHandle,+              STRING_TOKEN (STR_SECURITY_TYPE),+              mSecurityType[IfrNvData->SecurityType],+              NULL+              ) == 0)+        {+          return EFI_OUT_OF_RESOURCES;+        }++        if (  (IfrNvData->SecurityType == SECURITY_TYPE_WPA2_ENTERPRISE)+           || (IfrNvData->SecurityType == SECURITY_TYPE_WPA3_ENTERPRISE))+        {+          IfrNvData->EapAuthMethod       = Profile->EapAuthMethod;+          IfrNvData->EapSecondAuthMethod = Profile->EapSecondAuthMethod;+          StrCpyS (IfrNvData->EapIdentity, EAP_IDENTITY_SIZE, Profile->EapIdentity);+        }++        break;+       case KEY_CONNECT_ACTION:          if (Private->CurrentNic->UserSelectedProfile == NULL) {@@ -1909,6 +1911,39 @@ WifiMgrDxeHiiConfigAccessCallback (
               NULL               );           }++          if (Private->CurrentNic->UserSelectedProfile == NULL) {+            break;+          }++          Profile = Private->CurrentNic->UserSelectedProfile;++          //+          // Enter the network connection configuration page+          // Recovery from restored data+          //+          if (HiiSetString (Private->RegisteredHandle, STRING_TOKEN (STR_SSID), Profile->SSId, NULL) == 0) {+            return EFI_OUT_OF_RESOURCES;+          }++          IfrNvData->SecurityType = Profile->SecurityType;+          if (HiiSetString (+                Private->RegisteredHandle,+                STRING_TOKEN (STR_SECURITY_TYPE),+                mSecurityType[IfrNvData->SecurityType],+                NULL+                ) == 0)+          {+            return EFI_OUT_OF_RESOURCES;+          }++          if (  (IfrNvData->SecurityType == SECURITY_TYPE_WPA2_ENTERPRISE)+             || (IfrNvData->SecurityType == SECURITY_TYPE_WPA3_ENTERPRISE))+          {+            IfrNvData->EapAuthMethod       = Profile->EapAuthMethod;+            IfrNvData->EapSecondAuthMethod = Profile->EapSecondAuthMethod;+            StrCpyS (IfrNvData->EapIdentity, EAP_IDENTITY_SIZE, Profile->EapIdentity);+          }         }          break;@@ -1944,7 +1979,7 @@ WifiMgrDxeHiiConfigAccessCallback (
     }   } -  if (!EFI_ERROR (Status)) {+  if (!EFI_ERROR (Status) && (Action != EFI_BROWSER_ACTION_FORM_OPEN)) {     //     // Pass changed uncommitted data back to Form Browser.     //-- 
2.31.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117605): https://edk2.groups.io/g/devel/message/117605
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]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] [PATCH] NetworkPkg/WifiConnectionManagerDxe: Update UI according to UEFI spec
  2024-04-10 16:03 ` Clark-williams, Zachary
@ 2024-04-16  5:31   ` Michael D Kinney
  2024-04-16 16:38     ` Michael D Kinney
  0 siblings, 1 reply; 4+ messages in thread
From: Michael D Kinney @ 2024-04-16  5:31 UTC (permalink / raw)
  To: devel@edk2.groups.io, Clark-williams, Zachary, Tan, Ming
  Cc: Kasbekar, Saloni, Bi, Dandan, POLUDOV, FELIX, Liu, Liqi,
	Kinney, Michael D

Acked-by: Michael D Kinney <michael.d.kinney@intel.com>


> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Clark-
> williams, Zachary
> Sent: Wednesday, April 10, 2024 9:03 AM
> To: Tan, Ming <ming.tan@intel.com>; devel@edk2.groups.io
> Cc: Kasbekar, Saloni <saloni.kasbekar@intel.com>; Bi, Dandan
> <dandan.bi@intel.com>; POLUDOV, FELIX <felixp@ami.com>; Liu, Liqi
> <liqi.liu@intel.com>
> Subject: Re: [edk2-devel] [PATCH] NetworkPkg/WifiConnectionManagerDxe:
> Update UI according to UEFI spec
> 
> Reviewed-by: Zachary Clark-Williams <zachary.clark-williams@intel.com>
> 
> -----Original Message-----
> From: Tan, Ming <ming.tan@intel.com>
> Sent: Thursday, March 21, 2024 6:16 PM
> To: devel@edk2.groups.io
> Cc: Kasbekar, Saloni <saloni.kasbekar@intel.com>; Clark-williams,
> Zachary <zachary.clark-williams@intel.com>; Bi, Dandan
> <dandan.bi@intel.com>; POLUDOV, FELIX <felixp@ami.com>; Liu, Liqi
> <liqi.liu@intel.com>
> Subject: [PATCH] NetworkPkg/WifiConnectionManagerDxe: Update UI
> according to UEFI spec
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4736
> 
> 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 <saloni.kasbekar@intel.com>
> Cc: Zachary Clark-williams <zachary.clark-williams@intel.com>
> Cc: Dandan Bi <dandan.bi@intel.com>
> Cc: Felix Polyudov <Felixp@ami.com>
> Signed-off-by: Liqi Liu <liqi.liu@intel.com>
> Signed-off-by: Ming Tan <ming.tan@intel.com>
> ---
>   PR: https://github.com/tianocore/edk2/pull/5487
> 
>  .../WifiConnectionMgrHiiConfigAccess.c        | 113 ++++++++++++-----
> -
>  1 file changed, 74 insertions(+), 39 deletions(-)
> 
> diff --git
> a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess
> .c
> b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess
> .c
> index 431fcbb33a..f242bdf056 100644
> ---
> a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess
> .c
> +++
> b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAcce
> +++ ss.c
> @@ -1412,7 +1412,9 @@ WifiMgrDxeHiiConfigAccessCallback (
>      return EFI_OUT_OF_RESOURCES;   } -  HiiGetBrowserData
> (&gWifiConfigFormSetGuid, mVendorStorageName, BufferSize, (UINT8
> *)IfrNvData);+  if (Action != EFI_BROWSER_ACTION_FORM_OPEN) {+
> HiiGetBrowserData (&gWifiConfigFormSetGuid, mVendorStorageName,
> BufferSize, (UINT8 *)IfrNvData);+  }    if (Action ==
> EFI_BROWSER_ACTION_FORM_OPEN) {     switch (QuestionId) {@@ -1438,43
> +1440,6 @@ WifiMgrDxeHiiConfigAccessCallback (
>           break; -      case KEY_CONNECT_ACTION:--        if (Private-
> >CurrentNic->UserSelectedProfile == NULL) {-          break;-
> }--        Profile = Private->CurrentNic->UserSelectedProfile;--
> //-        // Enter the network connection configuration page-
> // Recovery from restored data-        //-        if (HiiSetString
> (Private->RegisteredHandle, STRING_TOKEN (STR_SSID), Profile->SSId,
> NULL) == 0) {-          return EFI_OUT_OF_RESOURCES;-        }--
> IfrNvData->SecurityType = Profile->SecurityType;-        if
> (HiiSetString (-              Private->RegisteredHandle,-
> STRING_TOKEN (STR_SECURITY_TYPE),-
> mSecurityType[IfrNvData->SecurityType],-              NULL-
> ) == 0)-        {-          return EFI_OUT_OF_RESOURCES;-        }--
> if ((IfrNvData->SecurityType == SECURITY_TYPE_WPA2_ENTERPRISE) ||-
> (IfrNvData->SecurityType == SECURITY_TYPE_WPA3_ENTERPRISE))-        {-
> IfrNvData->EapAuthMethod       = Profile->EapAuthMethod;-
> IfrNvData->EapSecondAuthMethod = Profile->EapSecondAuthMethod;-
> StrCpyS (IfrNvData->EapIdentity, EAP_IDENTITY_SIZE, Profile-
> >EapIdentity);-        }--        break;-       case
> KEY_ENROLLED_CERT_NAME:          if (Private->CurrentNic-
> >UserSelectedProfile == NULL) {@@ -1524,6 +1489,43 @@
> WifiMgrDxeHiiConfigAccessCallback (
>      }   } else if (Action == EFI_BROWSER_ACTION_FORM_CLOSE) {
> switch (QuestionId) {+      case KEY_EAP_ENROLL_CERT_FROM_FILE:++
> if (Private->CurrentNic->UserSelectedProfile == NULL) {+
> break;+        }++        Profile = Private->CurrentNic-
> >UserSelectedProfile;++        //+        // Enter the network
> connection configuration page+        // Recovery from restored data+
> //+        if (HiiSetString (Private->RegisteredHandle, STRING_TOKEN
> (STR_SSID), Profile->SSId, NULL) == 0) {+          return
> EFI_OUT_OF_RESOURCES;+        }++        IfrNvData->SecurityType =
> Profile->SecurityType;+        if (HiiSetString (+
> Private->RegisteredHandle,+              STRING_TOKEN
> (STR_SECURITY_TYPE),+              mSecurityType[IfrNvData-
> >SecurityType],+              NULL+              ) == 0)+        {+
> return EFI_OUT_OF_RESOURCES;+        }++        if (  (IfrNvData-
> >SecurityType == SECURITY_TYPE_WPA2_ENTERPRISE)+           ||
> (IfrNvData->SecurityType == SECURITY_TYPE_WPA3_ENTERPRISE))+        {+
> IfrNvData->EapAuthMethod       = Profile->EapAuthMethod;+
> IfrNvData->EapSecondAuthMethod = Profile->EapSecondAuthMethod;+
> StrCpyS (IfrNvData->EapIdentity, EAP_IDENTITY_SIZE, Profile-
> >EapIdentity);+        }++        break;+       case
> KEY_CONNECT_ACTION:          if (Private->CurrentNic-
> >UserSelectedProfile == NULL) {@@ -1909,6 +1911,39 @@
> WifiMgrDxeHiiConfigAccessCallback (
>                NULL               );           }++          if
> (Private->CurrentNic->UserSelectedProfile == NULL) {+
> break;+          }++          Profile = Private->CurrentNic-
> >UserSelectedProfile;++          //+          // Enter the network
> connection configuration page+          // Recovery from restored
> data+          //+          if (HiiSetString (Private-
> >RegisteredHandle, STRING_TOKEN (STR_SSID), Profile->SSId, NULL) == 0)
> {+            return EFI_OUT_OF_RESOURCES;+          }++
> IfrNvData->SecurityType = Profile->SecurityType;+          if
> (HiiSetString (+                Private->RegisteredHandle,+
> STRING_TOKEN (STR_SECURITY_TYPE),+
> mSecurityType[IfrNvData->SecurityType],+                NULL+
> ) == 0)+          {+            return EFI_OUT_OF_RESOURCES;+
> }++          if (  (IfrNvData->SecurityType ==
> SECURITY_TYPE_WPA2_ENTERPRISE)+             || (IfrNvData-
> >SecurityType == SECURITY_TYPE_WPA3_ENTERPRISE))+          {+
> IfrNvData->EapAuthMethod       = Profile->EapAuthMethod;+
> IfrNvData->EapSecondAuthMethod = Profile->EapSecondAuthMethod;+
> StrCpyS (IfrNvData->EapIdentity, EAP_IDENTITY_SIZE, Profile-
> >EapIdentity);+          }         }          break;@@ -1944,7 +1979,7
> @@ WifiMgrDxeHiiConfigAccessCallback (
>      }   } -  if (!EFI_ERROR (Status)) {+  if (!EFI_ERROR (Status) &&
> (Action != EFI_BROWSER_ACTION_FORM_OPEN)) {     //     // Pass changed
> uncommitted data back to Form Browser.     //--
> 2.31.1.windows.1
> 
> 
> 
> 
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117849): https://edk2.groups.io/g/devel/message/117849
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]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] [PATCH] NetworkPkg/WifiConnectionManagerDxe: Update UI according to UEFI spec
  2024-04-16  5:31   ` Michael D Kinney
@ 2024-04-16 16:38     ` Michael D Kinney
  0 siblings, 0 replies; 4+ messages in thread
From: Michael D Kinney @ 2024-04-16 16:38 UTC (permalink / raw)
  To: devel@edk2.groups.io, Clark-williams, Zachary, Tan, Ming
  Cc: Kasbekar, Saloni, Bi, Dandan, POLUDOV, FELIX, Liu, Liqi,
	Kinney, Michael D

Merged: https://github.com/tianocore/edk2/pull/5487



> -----Original Message-----
> From: Kinney, Michael D <michael.d.kinney@intel.com>
> Sent: Monday, April 15, 2024 10:32 PM
> To: devel@edk2.groups.io; Clark-williams, Zachary <zachary.clark-
> williams@intel.com>; Tan, Ming <ming.tan@intel.com>
> Cc: Kasbekar, Saloni <saloni.kasbekar@intel.com>; Bi, Dandan
> <dandan.bi@intel.com>; POLUDOV, FELIX <felixp@ami.com>; Liu, Liqi
> <liqi.liu@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
> Subject: RE: [edk2-devel] [PATCH] NetworkPkg/WifiConnectionManagerDxe:
> Update UI according to UEFI spec
> 
> Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
> 
> 
> > -----Original Message-----
> > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of
> Clark-
> > williams, Zachary
> > Sent: Wednesday, April 10, 2024 9:03 AM
> > To: Tan, Ming <ming.tan@intel.com>; devel@edk2.groups.io
> > Cc: Kasbekar, Saloni <saloni.kasbekar@intel.com>; Bi, Dandan
> > <dandan.bi@intel.com>; POLUDOV, FELIX <felixp@ami.com>; Liu, Liqi
> > <liqi.liu@intel.com>
> > Subject: Re: [edk2-devel] [PATCH]
> NetworkPkg/WifiConnectionManagerDxe:
> > Update UI according to UEFI spec
> >
> > Reviewed-by: Zachary Clark-Williams <zachary.clark-
> williams@intel.com>
> >
> > -----Original Message-----
> > From: Tan, Ming <ming.tan@intel.com>
> > Sent: Thursday, March 21, 2024 6:16 PM
> > To: devel@edk2.groups.io
> > Cc: Kasbekar, Saloni <saloni.kasbekar@intel.com>; Clark-williams,
> > Zachary <zachary.clark-williams@intel.com>; Bi, Dandan
> > <dandan.bi@intel.com>; POLUDOV, FELIX <felixp@ami.com>; Liu, Liqi
> > <liqi.liu@intel.com>
> > Subject: [PATCH] NetworkPkg/WifiConnectionManagerDxe: Update UI
> > according to UEFI spec
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4736
> >
> > 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 <saloni.kasbekar@intel.com>
> > Cc: Zachary Clark-williams <zachary.clark-williams@intel.com>
> > Cc: Dandan Bi <dandan.bi@intel.com>
> > Cc: Felix Polyudov <Felixp@ami.com>
> > Signed-off-by: Liqi Liu <liqi.liu@intel.com>
> > Signed-off-by: Ming Tan <ming.tan@intel.com>
> > ---
> >   PR: https://github.com/tianocore/edk2/pull/5487
> >
> >  .../WifiConnectionMgrHiiConfigAccess.c        | 113 ++++++++++++---
> --
> > -
> >  1 file changed, 74 insertions(+), 39 deletions(-)
> >
> > diff --git
> >
> a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess
> > .c
> >
> b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess
> > .c
> > index 431fcbb33a..f242bdf056 100644
> > ---
> >
> a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess
> > .c
> > +++
> > b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAcce
> > +++ ss.c
> > @@ -1412,7 +1412,9 @@ WifiMgrDxeHiiConfigAccessCallback (
> >      return EFI_OUT_OF_RESOURCES;   } -  HiiGetBrowserData
> > (&gWifiConfigFormSetGuid, mVendorStorageName, BufferSize, (UINT8
> > *)IfrNvData);+  if (Action != EFI_BROWSER_ACTION_FORM_OPEN) {+
> > HiiGetBrowserData (&gWifiConfigFormSetGuid, mVendorStorageName,
> > BufferSize, (UINT8 *)IfrNvData);+  }    if (Action ==
> > EFI_BROWSER_ACTION_FORM_OPEN) {     switch (QuestionId) {@@ -1438,43
> > +1440,6 @@ WifiMgrDxeHiiConfigAccessCallback (
> >           break; -      case KEY_CONNECT_ACTION:--        if
> (Private-
> > >CurrentNic->UserSelectedProfile == NULL) {-          break;-
> > }--        Profile = Private->CurrentNic->UserSelectedProfile;--
> > //-        // Enter the network connection configuration page-
> > // Recovery from restored data-        //-        if (HiiSetString
> > (Private->RegisteredHandle, STRING_TOKEN (STR_SSID), Profile->SSId,
> > NULL) == 0) {-          return EFI_OUT_OF_RESOURCES;-        }--
> > IfrNvData->SecurityType = Profile->SecurityType;-        if
> > (HiiSetString (-              Private->RegisteredHandle,-
> > STRING_TOKEN (STR_SECURITY_TYPE),-
> > mSecurityType[IfrNvData->SecurityType],-              NULL-
> > ) == 0)-        {-          return EFI_OUT_OF_RESOURCES;-        }--
> > if ((IfrNvData->SecurityType == SECURITY_TYPE_WPA2_ENTERPRISE) ||-
> > (IfrNvData->SecurityType == SECURITY_TYPE_WPA3_ENTERPRISE))-
> {-
> > IfrNvData->EapAuthMethod       = Profile->EapAuthMethod;-
> > IfrNvData->EapSecondAuthMethod = Profile->EapSecondAuthMethod;-
> > StrCpyS (IfrNvData->EapIdentity, EAP_IDENTITY_SIZE, Profile-
> > >EapIdentity);-        }--        break;-       case
> > KEY_ENROLLED_CERT_NAME:          if (Private->CurrentNic-
> > >UserSelectedProfile == NULL) {@@ -1524,6 +1489,43 @@
> > WifiMgrDxeHiiConfigAccessCallback (
> >      }   } else if (Action == EFI_BROWSER_ACTION_FORM_CLOSE) {
> > switch (QuestionId) {+      case KEY_EAP_ENROLL_CERT_FROM_FILE:++
> > if (Private->CurrentNic->UserSelectedProfile == NULL) {+
> > break;+        }++        Profile = Private->CurrentNic-
> > >UserSelectedProfile;++        //+        // Enter the network
> > connection configuration page+        // Recovery from restored
> data+
> > //+        if (HiiSetString (Private->RegisteredHandle, STRING_TOKEN
> > (STR_SSID), Profile->SSId, NULL) == 0) {+          return
> > EFI_OUT_OF_RESOURCES;+        }++        IfrNvData->SecurityType =
> > Profile->SecurityType;+        if (HiiSetString (+
> > Private->RegisteredHandle,+              STRING_TOKEN
> > (STR_SECURITY_TYPE),+              mSecurityType[IfrNvData-
> > >SecurityType],+              NULL+              ) == 0)+        {+
> > return EFI_OUT_OF_RESOURCES;+        }++        if (  (IfrNvData-
> > >SecurityType == SECURITY_TYPE_WPA2_ENTERPRISE)+           ||
> > (IfrNvData->SecurityType == SECURITY_TYPE_WPA3_ENTERPRISE))+
> {+
> > IfrNvData->EapAuthMethod       = Profile->EapAuthMethod;+
> > IfrNvData->EapSecondAuthMethod = Profile->EapSecondAuthMethod;+
> > StrCpyS (IfrNvData->EapIdentity, EAP_IDENTITY_SIZE, Profile-
> > >EapIdentity);+        }++        break;+       case
> > KEY_CONNECT_ACTION:          if (Private->CurrentNic-
> > >UserSelectedProfile == NULL) {@@ -1909,6 +1911,39 @@
> > WifiMgrDxeHiiConfigAccessCallback (
> >                NULL               );           }++          if
> > (Private->CurrentNic->UserSelectedProfile == NULL) {+
> > break;+          }++          Profile = Private->CurrentNic-
> > >UserSelectedProfile;++          //+          // Enter the network
> > connection configuration page+          // Recovery from restored
> > data+          //+          if (HiiSetString (Private-
> > >RegisteredHandle, STRING_TOKEN (STR_SSID), Profile->SSId, NULL) ==
> 0)
> > {+            return EFI_OUT_OF_RESOURCES;+          }++
> > IfrNvData->SecurityType = Profile->SecurityType;+          if
> > (HiiSetString (+                Private->RegisteredHandle,+
> > STRING_TOKEN (STR_SECURITY_TYPE),+
> > mSecurityType[IfrNvData->SecurityType],+                NULL+
> > ) == 0)+          {+            return EFI_OUT_OF_RESOURCES;+
> > }++          if (  (IfrNvData->SecurityType ==
> > SECURITY_TYPE_WPA2_ENTERPRISE)+             || (IfrNvData-
> > >SecurityType == SECURITY_TYPE_WPA3_ENTERPRISE))+          {+
> > IfrNvData->EapAuthMethod       = Profile->EapAuthMethod;+
> > IfrNvData->EapSecondAuthMethod = Profile->EapSecondAuthMethod;+
> > StrCpyS (IfrNvData->EapIdentity, EAP_IDENTITY_SIZE, Profile-
> > >EapIdentity);+          }         }          break;@@ -1944,7
> +1979,7
> > @@ WifiMgrDxeHiiConfigAccessCallback (
> >      }   } -  if (!EFI_ERROR (Status)) {+  if (!EFI_ERROR (Status)
> &&
> > (Action != EFI_BROWSER_ACTION_FORM_OPEN)) {     //     // Pass
> changed
> > uncommitted data back to Form Browser.     //--
> > 2.31.1.windows.1
> >
> >
> >
> > 
> >



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117888): https://edk2.groups.io/g/devel/message/117888
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]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-16 16:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-22  1:16 [edk2-devel] [PATCH] NetworkPkg/WifiConnectionManagerDxe: Update UI according to UEFI spec Tan, Ming
2024-04-10 16:03 ` Clark-williams, Zachary
2024-04-16  5:31   ` Michael D Kinney
2024-04-16 16:38     ` Michael D Kinney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox