From d8d26fb207e02aa5ef57e2bcb213f9dda16166cc Mon Sep 17 00:00:00 2001 From: mdkinney Date: Sat, 11 Jul 2009 22:51:51 +0000 Subject: Retire NetLibQueueDpc() and NetLibDispatchDpc() and use QueueDpc() and DispatchDpc() from the DpcLib instead. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8897 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Library/DxeNetLib/DxeNetLib.c | 76 ---------------------------- MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf | 9 +--- 2 files changed, 1 insertion(+), 84 deletions(-) (limited to 'MdeModulePkg/Library/DxeNetLib') diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c index 32c81c17b7..f18aa41e34 100644 --- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c +++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c @@ -19,7 +19,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include -#include #include @@ -34,8 +33,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include -EFI_DPC_PROTOCOL *mDpc = NULL; - GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mNetLibHexStr[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; #define NIC_ITEM_CONFIG_SIZE sizeof (NIC_IP4_CONFIG_INFO) + sizeof (EFI_IP4_ROUTE_TABLE) * MAX_IP4_CONFIG_IN_VARIABLE @@ -1458,76 +1455,3 @@ NetLibGetNicHandle ( gBS->FreePool (OpenBuffer); return Handle; } - -/** - Add a Deferred Procedure Call to the end of the DPC queue. - - @param[in] DpcTpl The EFI_TPL that the DPC should be invoked. - @param[in] DpcProcedure Pointer to the DPC's function. - @param[in] DpcContext Pointer to the DPC's context. Passed to DpcProcedure - when DpcProcedure is invoked. - - @retval EFI_SUCCESS The DPC was queued. - @retval EFI_INVALID_PARAMETER DpcTpl is not a valid EFI_TPL, or DpcProcedure - is NULL. - @retval EFI_OUT_OF_RESOURCES There are not enough resources available to - add the DPC to the queue. - -**/ -EFI_STATUS -EFIAPI -NetLibQueueDpc ( - IN EFI_TPL DpcTpl, - IN EFI_DPC_PROCEDURE DpcProcedure, - IN VOID *DpcContext OPTIONAL - ) -{ - return mDpc->QueueDpc (mDpc, DpcTpl, DpcProcedure, DpcContext); -} - -/** - Dispatch the queue of DPCs. ALL DPCs that have been queued with a DpcTpl - value greater than or equal to the current TPL are invoked in the order that - they were queued. DPCs with higher DpcTpl values are invoked before DPCs with - lower DpcTpl values. - - @retval EFI_SUCCESS One or more DPCs were invoked. - @retval EFI_NOT_FOUND No DPCs were invoked. - -**/ -EFI_STATUS -EFIAPI -NetLibDispatchDpc ( - VOID - ) -{ - return mDpc->DispatchDpc(mDpc); -} - -/** - The constructor function caches the pointer to DPC protocol. - - The constructor function locates DPC protocol from protocol database. - It will ASSERT() if that operation fails and it will always return EFI_SUCCESS. - - @param[in] ImageHandle The firmware allocated handle for the EFI image. - @param[in] SystemTable A pointer to the EFI System Table. - - @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. - -**/ -EFI_STATUS -EFIAPI -NetLibConstructor ( - IN EFI_HANDLE ImageHandle, - IN EFI_SYSTEM_TABLE *SystemTable - ) -{ - EFI_STATUS Status; - - Status = gBS->LocateProtocol (&gEfiDpcProtocolGuid, NULL, (VOID**) &mDpc); - ASSERT_EFI_ERROR (Status); - ASSERT (mDpc != NULL); - - return Status; -} diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf index 2f2b2d095f..05d68d70e0 100644 --- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf +++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf @@ -21,8 +21,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. VERSION_STRING = 1.0 LIBRARY_CLASS = NetLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER - CONSTRUCTOR = NetLibConstructor - # # The following information is for reference only and not required by the build tools. # @@ -52,15 +50,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. PrintLib [Guids] - gEfiNicIp4ConfigVariableGuid + gEfiNicIp4ConfigVariableGuid [Protocols] gEfiSimpleNetworkProtocolGuid # PROTOCOL ALWAYS_CONSUMED - gEfiDpcProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiComponentNameProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiComponentName2ProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiHiiConfigRoutingProtocolGuid # PROTOCOL ALWAYS_CONSUMED - -[Depex] - gEfiDpcProtocolGuid - \ No newline at end of file -- cgit v1.2.3