summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/ArpDxe
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-12-18 07:01:23 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2007-12-18 07:01:23 +0000
commitc4a62a12c2890297cfcb9828b51b058fb347c01a (patch)
treef60f918368c8c96325bcfbc050c7b6189f567492 /MdeModulePkg/Universal/Network/ArpDxe
parent372787b85a2a6a6da0a7b0357f58953da26d81a8 (diff)
downloadedk2-c4a62a12c2890297cfcb9828b51b058fb347c01a.zip
edk2-c4a62a12c2890297cfcb9828b51b058fb347c01a.tar.gz
edk2-c4a62a12c2890297cfcb9828b51b058fb347c01a.tar.bz2
Sync the latest version from R8.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4400 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/ArpDxe')
-rw-r--r--MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c55
1 files changed, 24 insertions, 31 deletions
diff --git a/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c b/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c
index af2e082..aa99ff5 100644
--- a/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c
+++ b/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c
@@ -413,7 +413,7 @@ ArpDriverBindingStop (
//
NicHandle = NetLibGetNicHandle (ControllerHandle, &gEfiManagedNetworkProtocolGuid);
if (NicHandle == NULL) {
- return EFI_SUCCESS;
+ return EFI_DEVICE_ERROR;
}
//
@@ -429,50 +429,43 @@ ArpDriverBindingStop (
);
if (EFI_ERROR (Status)) {
ARP_DEBUG_ERROR (("ArpDriverBindingStop: Open ArpSb failed, %r.\n", Status));
- return Status;
+ return EFI_DEVICE_ERROR;
}
ArpService = ARP_SERVICE_DATA_FROM_THIS (ServiceBinding);
- while (!NetListIsEmpty (&ArpService->ChildrenList)) {
+ if (NumberOfChildren == 0) {
//
- // Iterate all the instances.
+ // Uninstall the ARP ServiceBinding protocol.
//
- Instance = NET_LIST_HEAD (&ArpService->ChildrenList, ARP_INSTANCE_DATA, List);
+ gBS->UninstallMultipleProtocolInterfaces (
+ NicHandle,
+ &gEfiArpServiceBindingProtocolGuid,
+ &ArpService->ServiceBinding,
+ NULL
+ );
//
- // Destroy this arp child.
+ // Clean the arp servicebinding context data and free the memory allocated.
//
- ServiceBinding->DestroyChild (ServiceBinding, Instance->Handle);
- }
+ ArpCleanService (ArpService);
- ASSERT (NetListIsEmpty (&ArpService->PendingRequestTable));
- ASSERT (NetListIsEmpty (&ArpService->DeniedCacheTable));
- ASSERT (NetListIsEmpty (&ArpService->ResolvedCacheTable));
+ NetFreePool (ArpService);
+ } else {
- //
- // Uninstall the ARP ServiceBinding protocol.
- //
- Status = gBS->UninstallMultipleProtocolInterfaces (
- NicHandle,
- &gEfiArpServiceBindingProtocolGuid,
- &ArpService->ServiceBinding,
- NULL
- );
- if (EFI_ERROR (Status)) {
- ARP_DEBUG_ERROR (("ArpDriverBindingStop: Failed to uninstall ArpSb, %r.\n", Status));
- return Status;
- }
+ while (!NetListIsEmpty (&ArpService->ChildrenList)) {
+ Instance = NET_LIST_HEAD (&ArpService->ChildrenList, ARP_INSTANCE_DATA, List);
- //
- // Clean the arp servicebinding context data and free the memory allocated.
- //
- ArpCleanService (ArpService);
- NetFreePool (ArpService);
+ ServiceBinding->DestroyChild (ServiceBinding, Instance->Handle);
+ }
- return Status;
-}
+ ASSERT (NetListIsEmpty (&ArpService->PendingRequestTable));
+ ASSERT (NetListIsEmpty (&ArpService->DeniedCacheTable));
+ ASSERT (NetListIsEmpty (&ArpService->ResolvedCacheTable));
+ }
+ return EFI_SUCCESS;
+}
/**
Creates a child handle with a set of I/O services.