From 9ea13d7900aa99f5972ca0cfa11542a69c7b0e18 Mon Sep 17 00:00:00 2001 From: tye1 Date: Wed, 24 Aug 2011 10:53:54 +0000 Subject: [PATCH] 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 --- .../Network/VlanConfigDxe/VlanConfig.vfr | 13 +++++++++- .../Network/VlanConfigDxe/VlanConfigImpl.c | 23 ++++++------------ .../Network/VlanConfigDxe/VlanConfigNvData.h | 4 ++- .../VlanConfigDxe/VlanConfigStrings.uni | Bin 3824 -> 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.
+// Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
// 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.
+Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
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 e5a6d1620416214eea4ad7c71427187e672bfce0..bf95abd8b8fab2c4996a3393793e00a0bfcf9b18 100644 GIT binary patch delta 217 zcmew$J3(>6E?xx&T?PdPBL)KoLk7c*JI(nf-{6u^b!Tv82w{k4aApW)2m(S^20t)A z7%U#b;0ffrPmbp?j-EdJIYo0Q)N{ A^#A|> delta 10 RcmbQB_(68Uu8k+m_y8NW1jYaW -- 2.39.5