summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c17
-rw-r--r--MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.h9
-rw-r--r--MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c3
-rw-r--r--MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigNv.c4
4 files changed, 27 insertions, 6 deletions
diff --git a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c
index 7288234bfa..5493d07d10 100644
--- a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c
+++ b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.c
@@ -1,7 +1,7 @@
/** @file
This code implements the IP4Config and NicIp4Config protocols.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2012, 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 text of the license may be found at<BR>
@@ -125,6 +125,15 @@ EfiNicIp4ConfigSetInfo (
// Signal the IP4 to run the auto configuration again
//
if (Reconfig && (Instance->ReconfigEvent != NULL)) {
+ //
+ // When NicConfig is NULL, NIC IP4 configuration parameter is removed,
+ // the auto configuration process should stop running the configuration
+ // policy for the EFI IPv4 Protocol driver.
+ //
+ if (NicConfig == NULL) {
+ Instance->DoNotStart = TRUE;
+ }
+
Status = gBS->SignalEvent (Instance->ReconfigEvent);
DispatchDpc ();
}
@@ -344,6 +353,12 @@ EfiIp4ConfigStart (
Instance->NicConfig = EfiNicIp4ConfigGetInfo (Instance);
if (Instance->NicConfig == NULL) {
+ if (Instance->DoNotStart) {
+ Instance->DoNotStart = FALSE;
+ Status = EFI_SUCCESS;
+ goto ON_EXIT;
+ }
+
Source = IP4_CONFIG_SOURCE_DHCP;
} else {
Source = Instance->NicConfig->Source;
diff --git a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.h b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.h
index b3d8acae9b..cbe8ec5fcf 100644
--- a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.h
+++ b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4Config.h
@@ -1,7 +1,7 @@
/** @file
Header file for IP4Config driver.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2012, 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 text of the license may be found at<BR>
@@ -137,7 +137,12 @@ typedef struct _IP4_CONFIG_INSTANCE {
//
// Underlying media present status.
//
- BOOLEAN MediaPresent;
+ BOOLEAN MediaPresent;
+
+ //
+ // A flag to indicate EfiIp4ConfigStart should not run
+ //
+ BOOLEAN DoNotStart;
} IP4_CONFIG_INSTANCE;
#define IP4_CONFIG_INSTANCE_FROM_IP4CONFIG(this) \
diff --git a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c
index eee306ad3b..2a9fcb94e5 100644
--- a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c
+++ b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c
@@ -87,7 +87,8 @@ IP4_CONFIG_INSTANCE mIp4ConfigTemplate = {
NULL,
NULL,
NULL,
- TRUE
+ TRUE,
+ FALSE
};
/**
diff --git a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigNv.c b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigNv.c
index 2878863ade..f09bd51744 100644
--- a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigNv.c
+++ b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigNv.c
@@ -215,7 +215,7 @@ Ip4ConfigConvertIfrNvDataToDeviceConfigData (
//
ZeroMem (&Ip4ConfigInstance->Ip4ConfigCallbackInfo, sizeof (IP4_SETTING_INFO));
- Status = EfiNicIp4ConfigSetInfo (Ip4ConfigInstance, NULL, FALSE);
+ Status = EfiNicIp4ConfigSetInfo (Ip4ConfigInstance, NULL, TRUE);
if (Status == EFI_NOT_FOUND) {
return EFI_SUCCESS;
}
@@ -629,7 +629,7 @@ Ip4DeviceRouteConfig (
FreePool (NicInfo);
} else {
ZeroMem (&Ip4ConfigInstance->Ip4ConfigCallbackInfo, sizeof (IP4_SETTING_INFO));
- Status = EfiNicIp4ConfigSetInfo (Ip4ConfigInstance, NULL, FALSE);
+ Status = EfiNicIp4ConfigSetInfo (Ip4ConfigInstance, NULL, TRUE);
}
}