summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524>2011-08-24 10:53:54 +0000
committertye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524>2011-08-24 10:53:54 +0000
commit9ea13d7900aa99f5972ca0cfa11542a69c7b0e18 (patch)
tree198ba1960e26a5129a36013c4a55ab505f8f9616
parent83f1f16a83f0d69a0acc93b3249e9e2b65f3a195 (diff)
downloadedk2-platforms-9ea13d7900aa99f5972ca0cfa11542a69c7b0e18.tar.xz
Update to NOT to use EFI_BROWSER_ACTION_FORM_OPEN in Callback function thus able to function properly in UEFI2.1 platform.
Signed-off-by: tye Reviewed-by: lgao4 Reviewed-by: xdu2 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12197 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfig.vfr13
-rw-r--r--MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigImpl.c23
-rw-r--r--MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigNvData.h4
-rw-r--r--MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigStrings.unibin3824 -> 4240 bytes
4 files changed, 23 insertions, 17 deletions
diff --git a/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfig.vfr b/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfig.vfr
index 9f29fe838f..b6eb95d9ea 100644
--- a/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfig.vfr
+++ b/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfig.vfr
@@ -1,7 +1,7 @@
///** @file
// VLAN configuration formset.
//
-// Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
// This program and the accompanying materials
// are licensed and made available under the terms and conditions
// of the BSD License which accompanies this distribution. The full
@@ -26,6 +26,17 @@ formset
name = VlanNvData,
guid = VLAN_CONFIG_PRIVATE_GUID;
+ form formid = VLAN_HEAD_FORM_ID,
+ title = STRING_TOKEN(STR_VLAN_FORM_TITLE);
+
+ goto VLAN_CONFIGURATION_FORM_ID,
+ prompt = STRING_TOKEN (STR_GET_CURRENT_SETTING),
+ help = STRING_TOKEN (STR_GET_CURRENT_SETTING_HELP),
+ flags = INTERACTIVE,
+ key = VLAN_UPDATE_QUESTION_ID;
+
+ endform;
+
form formid = VLAN_CONFIGURATION_FORM_ID,
title = STRING_TOKEN(STR_VLAN_FORM_TITLE);
diff --git a/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigImpl.c b/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigImpl.c
index dfcf7a3d9c..8abe77f4bb 100644
--- a/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigImpl.c
+++ b/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigImpl.c
@@ -236,21 +236,7 @@ VlanCallback (
PrivateData = VLAN_CONFIG_PRIVATE_DATA_FROM_THIS (This);
- if (Action == EFI_BROWSER_ACTION_FORM_OPEN) {
- if (QuestionId == VLAN_ADD_QUESTION_ID) {
- //
- // Update current VLAN list into Form when Form is opened.
- // This will be done only in FORM_OPEN CallBack of question with VLAN_ADD_QUESTION_ID.
- //
- VlanUpdateForm (PrivateData);
- }
- return EFI_SUCCESS;
- }
-
- if (Action == EFI_BROWSER_ACTION_FORM_CLOSE) {
- //
- // Do nothing for UEFI FORM_CLOSE action
- //
+ if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) {
return EFI_SUCCESS;
}
@@ -319,6 +305,13 @@ VlanCallback (
ZeroMem (Configuration->VlanList, MAX_VLAN_NUMBER);
break;
+ case VLAN_UPDATE_QUESTION_ID:
+ //
+ // Update current VLAN list into Form.
+ //
+ VlanUpdateForm (PrivateData);
+ break;
+
default:
break;
}
diff --git a/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigNvData.h b/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigNvData.h
index 5c566151a9..61cd535a00 100644
--- a/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigNvData.h
+++ b/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigNvData.h
@@ -1,7 +1,7 @@
/** @file
Header file for NV data structure definition.
-Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions
of the BSD License which accompanies this distribution. The full
@@ -26,9 +26,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#define VLAN_CONFIGURATION_VARSTORE_ID 0x0001
#define VLAN_CONFIGURATION_FORM_ID 0x0001
+#define VLAN_HEAD_FORM_ID 0x0002
#define VLAN_ADD_QUESTION_ID 0x1000
#define VLAN_REMOVE_QUESTION_ID 0x2000
+#define VLAN_UPDATE_QUESTION_ID 0x3000
#define LABEL_VLAN_LIST 0x0001
#define LABEL_END 0xffff
diff --git a/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigStrings.uni b/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigStrings.uni
index e5a6d16204..bf95abd8b8 100644
--- a/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigStrings.uni
+++ b/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigStrings.uni
Binary files differ