summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/DxeNetLib
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2008-01-17 05:56:45 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2008-01-17 05:56:45 +0000
commit3012ce5cf75f938a79c70568595454e27b2f014a (patch)
treed924d6c391796ef7ccc54d743f02d2db49ec0b86 /MdeModulePkg/Library/DxeNetLib
parentb290614d493ff72fc2a4410d169314e501b7e79e (diff)
downloadedk2-platforms-3012ce5cf75f938a79c70568595454e27b2f014a.tar.xz
1. Fixed bugs in DxeNetLib to meet consistence with network module DriverBinding protocol.
2. Sync bugs in console modules. 3. Sync bugs in PlatDriOverLib. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4571 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library/DxeNetLib')
-rw-r--r--MdeModulePkg/Library/DxeNetLib/DxeNetLib.c32
-rw-r--r--MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf16
2 files changed, 18 insertions, 30 deletions
diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
index f65489e7ed..ee8b6797e5 100644
--- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
+++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
@@ -25,6 +25,8 @@ Abstract:
#include <Protocol/SimpleNetwork.h>
#include <Protocol/LoadedImage.h>
#include <Protocol/NicIp4Config.h>
+#include <Protocol/ComponentName.h>
+#include <Protocol/ComponentName2.h>
#include <Library/NetLib.h>
#include <Library/BaseLib.h>
@@ -842,8 +844,7 @@ NetLibDefaultUnload (
UINTN Index;
EFI_DRIVER_BINDING_PROTOCOL *DriverBinding;
EFI_COMPONENT_NAME_PROTOCOL *ComponentName;
- EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration;
- EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics;
+ EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2;
//
// Get the list of all the handles in the handle database.
@@ -912,30 +913,15 @@ NetLibDefaultUnload (
Status = gBS->HandleProtocol (
DeviceHandleBuffer[Index],
- &gEfiDriverConfigurationProtocolGuid,
- (VOID **) &DriverConfiguration
+ &gEfiComponentName2ProtocolGuid,
+ (VOID **) &ComponentName2
);
-
if (!EFI_ERROR (Status)) {
gBS->UninstallProtocolInterface (
- ImageHandle,
- &gEfiDriverConfigurationProtocolGuid,
- DriverConfiguration
- );
- }
-
- Status = gBS->HandleProtocol (
- DeviceHandleBuffer[Index],
- &gEfiDriverDiagnosticsProtocolGuid,
- (VOID **) &DriverDiagnostics
- );
-
- if (!EFI_ERROR (Status)) {
- gBS->UninstallProtocolInterface (
- ImageHandle,
- &gEfiDriverDiagnosticsProtocolGuid,
- DriverDiagnostics
- );
+ ImageHandle,
+ &gEfiComponentName2ProtocolGuid,
+ ComponentName2
+ );
}
}
diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
index deb8949924..3ce822d831 100644
--- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
+++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
@@ -44,15 +44,17 @@
[LibraryClasses]
- BaseLib
- DebugLib
- BaseMemoryLib
- UefiBootServicesTableLib
- UefiRuntimeServicesTableLib
- UefiLib
- MemoryAllocationLib
+ BaseLib
+ DebugLib
+ BaseMemoryLib
+ UefiBootServicesTableLib
+ UefiRuntimeServicesTableLib
+ UefiLib
+ MemoryAllocationLib
[Protocols]
gEfiSimpleNetworkProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiNicIp4ConfigProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiDpcProtocolGuid # PROTOCOL ALWAYS_CONSUMED
+ gEfiComponentNameProtocolGuid # PROTOCOL ALWAYS_CONSUMED
+ gEfiComponentName2ProtocolGuid # PROTOCOL ALWAYS_CONSUMED \ No newline at end of file