summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/DxeNetLib
diff options
context:
space:
mode:
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