]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
Retire NetLibQueueDpc() and NetLibDispatchDpc() and use QueueDpc() and DispatchDpc...
[mirror_edk2.git] / MdeModulePkg / Library / DxeNetLib / DxeNetLib.c
index 32c81c17b77008126c461d7efa82ebc93ea73c0c..f18aa41e34a10e15d1f73535763787382ba7ed51 100644 (file)
@@ -19,7 +19,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Protocol/HiiConfigRouting.h>\r
 #include <Protocol/ComponentName.h>\r
 #include <Protocol/ComponentName2.h>\r
-#include <Protocol/Dpc.h>\r
 \r
 #include <Guid/NicIp4ConfigNvData.h>\r
 \r
@@ -34,8 +33,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/HiiLib.h>\r
 #include <Library/PrintLib.h>\r
 \r
-EFI_DPC_PROTOCOL *mDpc = NULL;\r
-\r
 GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mNetLibHexStr[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};\r
 \r
 #define NIC_ITEM_CONFIG_SIZE   sizeof (NIC_IP4_CONFIG_INFO) + sizeof (EFI_IP4_ROUTE_TABLE) * MAX_IP4_CONFIG_IN_VARIABLE\r
@@ -1458,76 +1455,3 @@ NetLibGetNicHandle (
   gBS->FreePool (OpenBuffer);\r
   return Handle;\r
 }\r
-\r
-/**\r
-  Add a Deferred Procedure Call to the end of the DPC queue.\r
-\r
-  @param[in]  DpcTpl           The EFI_TPL that the DPC should be invoked.\r
-  @param[in]  DpcProcedure     Pointer to the DPC's function.\r
-  @param[in]  DpcContext       Pointer to the DPC's context.  Passed to DpcProcedure\r
-                               when DpcProcedure is invoked.\r
-\r
-  @retval  EFI_SUCCESS              The DPC was queued.\r
-  @retval  EFI_INVALID_PARAMETER    DpcTpl is not a valid EFI_TPL, or DpcProcedure\r
-                                    is NULL.\r
-  @retval  EFI_OUT_OF_RESOURCES     There are not enough resources available to\r
-                                    add the DPC to the queue.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-NetLibQueueDpc (\r
-  IN EFI_TPL            DpcTpl,\r
-  IN EFI_DPC_PROCEDURE  DpcProcedure,\r
-  IN VOID               *DpcContext    OPTIONAL\r
-  )\r
-{\r
-  return mDpc->QueueDpc (mDpc, DpcTpl, DpcProcedure, DpcContext);\r
-}\r
-\r
-/**\r
-  Dispatch the queue of DPCs. ALL DPCs that have been queued with a DpcTpl\r
-  value greater than or equal to the current TPL are invoked in the order that\r
-  they were queued.  DPCs with higher DpcTpl values are invoked before DPCs with\r
-  lower DpcTpl values.\r
-\r
-  @retval  EFI_SUCCESS              One or more DPCs were invoked.\r
-  @retval  EFI_NOT_FOUND            No DPCs were invoked.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-NetLibDispatchDpc (\r
-  VOID\r
-  )\r
-{\r
-  return mDpc->DispatchDpc(mDpc);\r
-}\r
-\r
-/**\r
-  The constructor function caches the pointer to DPC protocol.\r
-\r
-  The constructor function locates DPC protocol from protocol database.\r
-  It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.\r
-\r
-  @param[in]  ImageHandle   The firmware allocated handle for the EFI image.\r
-  @param[in]  SystemTable   A pointer to the EFI System Table.\r
-\r
-  @retval EFI_SUCCESS   The constructor always returns EFI_SUCCESS.\r
-\r
-**/\r
-EFI_STATUS\r
-EFIAPI\r
-NetLibConstructor (\r
-  IN EFI_HANDLE                ImageHandle,\r
-  IN EFI_SYSTEM_TABLE          *SystemTable\r
-  )\r
-{\r
-  EFI_STATUS  Status;\r
-\r
-  Status = gBS->LocateProtocol (&gEfiDpcProtocolGuid, NULL, (VOID**) &mDpc);\r
-  ASSERT_EFI_ERROR (Status);\r
-  ASSERT (mDpc != NULL);\r
-\r
-  return Status;\r
-}\r