]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c
Sync the latest version from R8.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4Input.c
index f5c4c9e1d406ff7963a1b2dbd7928cd86df68496..06a011031597ff08fa7935918dba19b9cdf96a61 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2005 - 2006, Intel Corporation\r
+Copyright (c) 2005 - 2007, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -435,7 +435,7 @@ Ip4Reassemble (
     }\r
 \r
     NewPacket->Ip                  = Assemble->Head;\r
-    CopyMem (IP4_GET_CLIP_INFO (NewPacket), Assemble->Info, sizeof (IP4_CLIP_INFO));\r
+    CopyMem (IP4_GET_CLIP_INFO (NewPacket), Assemble->Info, sizeof (*IP4_GET_CLIP_INFO (NewPacket)));\r
     return NewPacket;\r
   }\r
 \r
@@ -511,7 +511,7 @@ Ip4AccpetFrame (
   //\r
   // Some OS may send IP packets without checksum.\r
   //\r
-  Checksum = ~NetblockChecksum ((UINT8 *) Head, HeadLen);\r
+  Checksum = (UINT16) (~NetblockChecksum ((UINT8 *) Head, HeadLen));\r
 \r
   if ((Head->Checksum != 0) && (Checksum != 0)) {\r
     goto RESTART;\r
@@ -607,6 +607,12 @@ Ip4AccpetFrame (
 \r
   Packet = NULL;\r
 \r
+  //\r
+  // Dispatch the DPCs queued by the NotifyFunction of the rx token's events\r
+  // which are signaled with received data.\r
+  //\r
+  NetLibDispatchDpc ();\r
+\r
 RESTART:\r
   Ip4ReceiveFrame (IpSb->DefaultInterface, NULL, Ip4AccpetFrame, IpSb);\r
 \r