]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
Retire NetLibQueueDpc() and NetLibDispatchDpc() and use QueueDpc() and DispatchDpc...
[mirror_edk2.git] / MdeModulePkg / Universal / Network / UefiPxeBcDxe / PxeBcImpl.c
index 15444c10836d36ac9f1cc7da05257ee3a7bbdff2..3eeacdcc5c8065c51c56213b5a7dee9d9fb03db0 100644 (file)
@@ -84,8 +84,6 @@ UpdateArpCache (
 \r
   @param  Event              Pointer to EFI_PXE_BC_PROTOCOL\r
   @param  Context            Context of the timer event\r
-  \r
-  @return None.\r
 \r
 **/\r
 VOID\r
@@ -139,8 +137,6 @@ FindInArpCache (
 \r
   @param  Context               The PXEBC private data.\r
 \r
-  @return None.\r
-\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -233,8 +229,6 @@ Resume:
   @param  Event                 The event signaled.\r
   @param  Context               The context passed in by the event notifier.\r
 \r
-  @return None.\r
-\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -246,7 +240,7 @@ IcmpErrorListenHandler (
   //\r
   // Request IpIoListenHandlerDpc as a DPC at TPL_CALLBACK\r
   //\r
-  NetLibQueueDpc (TPL_CALLBACK, IcmpErrorListenHandlerDpc, Context);\r
+  QueueDpc (TPL_CALLBACK, IcmpErrorListenHandlerDpc, Context);\r
 }\r
 \r
 /**                                                                 \r
@@ -479,7 +473,7 @@ EfiPxeBcStop (
   // Dispatch the DPCs queued by the NotifyFunction of the canceled rx token's\r
   // events.\r
   //\r
-  NetLibDispatchDpc ();\r
+  DispatchDpc ();\r
 \r
   Private->Ip4->Configure (Private->Ip4, NULL);\r
 \r
@@ -1432,6 +1426,8 @@ CheckIpByFilter (
     return TRUE;\r
   }\r
 \r
+  ASSERT (PxeBcMode->IpFilter.IpCnt < EFI_PXE_BASE_CODE_MAX_IPCNT);\r
+\r
   for (Index = 0; Index < PxeBcMode->IpFilter.IpCnt; Index++) {\r
     CopyMem (\r
       &Ip4Address, \r
@@ -1755,20 +1751,20 @@ EfiPxeBcSetIpFilter (
   BOOLEAN                   PromiscuousNeed;\r
 \r
   if (This == NULL) {\r
-    DEBUG ((EFI_D_ERROR, "BC *This pointer == NULL.\n"));\r
+    DEBUG ((EFI_D_ERROR, "This == NULL.\n"));\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
   Private = PXEBC_PRIVATE_DATA_FROM_PXEBC (This);\r
   Mode = Private->PxeBc.Mode;\r
 \r
-  if (Private == NULL) {\r
-    DEBUG ((EFI_D_ERROR, "PXEBC_PRIVATE_DATA poiner == NULL.\n"));\r
+  if (NewFilter == NULL) {\r
+    DEBUG ((EFI_D_ERROR, "NewFilter == NULL.\n"));\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  if (NewFilter == NULL) {\r
-    DEBUG ((EFI_D_ERROR, "IP Filter *NewFilter == NULL.\n"));\r
+  if (NewFilter->IpCnt > EFI_PXE_BASE_CODE_MAX_IPCNT) {\r
+    DEBUG ((EFI_D_ERROR, "NewFilter->IpCnt > %d.\n", EFI_PXE_BASE_CODE_MAX_IPCNT));\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -1778,6 +1774,7 @@ EfiPxeBcSetIpFilter (
   }\r
 \r
   PromiscuousNeed = FALSE;\r
+\r
   for (Index = 0; Index < NewFilter->IpCnt; ++Index) {\r
     if (IP4_IS_LOCAL_BROADCAST (EFI_IP4 (NewFilter->IpList[Index].v4))) {\r
       //\r