fixed bug in stop() function, that made stop() failure.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4986 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
vanjeff 2008-04-03 05:51:57 +00:00
parent c311f86b23
commit aa6c4e3c99
1 changed files with 21 additions and 5 deletions

View File

@ -444,19 +444,22 @@ PxeBcDriverBindingStop (
EFI_STATUS Status;
NicHandle = NetLibGetNicHandle (ControllerHandle, &gEfiArpProtocolGuid);
if (NicHandle == NULL) {
NicHandle = NetLibGetNicHandle (ControllerHandle, &gEfiDhcp4ProtocolGuid);
if (NicHandle == NULL) {
NicHandle = NetLibGetNicHandle (ControllerHandle, &gEfiMtftp4ProtocolGuid);
NicHandle = NetLibGetNicHandle (ControllerHandle, &gEfiIp4ProtocolGuid);
if (NicHandle == NULL) {
NicHandle = NetLibGetNicHandle (ControllerHandle, &gEfiUdp4ProtocolGuid);
return EFI_DEVICE_ERROR;
if (NicHandle == NULL) {
NicHandle = NetLibGetNicHandle (ControllerHandle, &gEfiMtftp4ProtocolGuid);
if (NicHandle == NULL) {
return EFI_DEVICE_ERROR;
}
}
}
}
}
@ -526,6 +529,19 @@ PxeBcDriverBindingStop (
Private->Mtftp4Child
);
gBS->CloseProtocol (
Private->Ip4Child,
&gEfiIp4ProtocolGuid,
This->DriverBindingHandle,
NicHandle
);
NetLibDestroyServiceChild (
NicHandle,
This->DriverBindingHandle,
&gEfiIp4ServiceBindingProtocolGuid,
Private->Ip4Child
);
gBS->CloseProtocol (
Private->ArpChild,
&gEfiArpProtocolGuid,