diff options
Diffstat (limited to 'MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c')
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c index fdbb26cd78..9ed9ae82a8 100644 --- a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c +++ b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDriver.c @@ -1,7 +1,7 @@ /** @file
The driver binding for IP4 CONFIG protocol.
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 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 text of the license may be found at<BR>
@@ -77,7 +77,9 @@ IP4_CONFIG_INSTANCE mIp4ConfigTemplate = { (NIC_IP4_CONFIG_INFO *) NULL,
(EFI_DHCP4_PROTOCOL *) NULL,
NULL,
- NULL
+ NULL,
+ NULL,
+ TRUE
};
/**
@@ -286,6 +288,21 @@ Ip4ConfigDriverBindingStart ( }
//
+ // A dedicated timer is used to poll underlying media status.
+ //
+ Status = gBS->CreateEvent (
+ EVT_NOTIFY_SIGNAL | EVT_TIMER,
+ TPL_CALLBACK,
+ MediaChangeDetect,
+ Instance,
+ &Instance->Timer
+ );
+
+ if (EFI_ERROR (Status)) {
+ goto ON_ERROR;
+ }
+
+ //
// Get the previous configure parameters. If an error happend here,
// just ignore it because the driver should be able to operate.
//
@@ -476,6 +493,12 @@ Ip4ConfigDriverBindingStop ( FreePool (Instance->MacString);
}
+ if (Instance->Timer != NULL) {
+ gBS->SetTimer (Instance->Timer, TimerCancel, 0);
+ gBS->CloseEvent (Instance->Timer);
+ Instance->Timer = NULL;
+ }
+
Ip4ConfigCleanConfig (Instance);
FreePool (Instance);
|