]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Timer.c
1. Add DPC protocol and DpcLib library in MdeModulePkg.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Tcp4Dxe / Tcp4Timer.c
index 20679b4f95bb58f62102e221468c86301842e968..7802ba0119bbb33497d52c501c905f38918d2b62 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
@@ -150,7 +150,7 @@ TcpRexmitTimeout (
   // yet ACKed.\r
   //\r
   FlightSize        = TCP_SUB_SEQ (Tcb->SndNxt, Tcb->SndUna);\r
-  Tcb->Ssthresh     = NET_MAX ((UINT32) (2 * Tcb->SndMss), FlightSize / 2);\r
+  Tcb->Ssthresh     = MAX ((UINT32) (2 * Tcb->SndMss), FlightSize / 2);\r
 \r
   Tcb->CWnd         = Tcb->SndMss;\r
   Tcb->LossRecover  = Tcb->SndNxt;\r
@@ -494,7 +494,6 @@ TcpBackoffRto (
 /**\r
   Heart beat timer handler.\r
 \r
-  @param  Event    Timer event signaled, ignored.\r
   @param  Context  Context of the timer event, ignored.\r
 \r
   @return None.\r
@@ -502,8 +501,7 @@ TcpBackoffRto (
 **/\r
 VOID\r
 EFIAPI\r
-TcpTicking (\r
-  IN EFI_EVENT Event,\r
+TcpTickingDpc (\r
   IN VOID      *Context\r
   )\r
 {\r
@@ -580,3 +578,23 @@ NextConnection:
     ;\r
   }\r
 }\r
+\r
+/**\r
+  Heart beat timer handler, queues the DPC at TPL_CALLBACK.\r
+\r
+  @param  Event    Timer event signaled, ignored.\r
+  @param  Context  Context of the timer event, ignored.\r
+\r
+  @return None.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+TcpTicking (\r
+  IN EFI_EVENT Event,\r
+  IN VOID      *Context\r
+  )\r
+{\r
+  NetLibQueueDpc (TPL_CALLBACK, TcpTickingDpc, Context);\r
+}\r
+\r