1. Enabled IP4 layer auto configuration in case cable swap is detected.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11582 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -285,6 +287,21 @@ Ip4ConfigDriverBindingStart (
|
||||
goto ON_ERROR;
|
||||
}
|
||||
|
||||
//
|
||||
// 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);
|
||||
|
||||
|
Reference in New Issue
Block a user