//\r
FlightSize = TCP_SUB_SEQ (Tcb->SndNxt, Tcb->SndUna);\r
\r
- Tcb->Ssthresh = NET_MAX (FlightSize >> 1, (UINT32) (2 * Tcb->SndMss));\r
+ Tcb->Ssthresh = MAX (FlightSize >> 1, (UINT32) (2 * Tcb->SndMss));\r
Tcb->Recover = Tcb->SndNxt;\r
\r
Tcb->CongestState = TCP_CONGEST_RECOVER;\r
//\r
FlightSize = TCP_SUB_SEQ (Tcb->SndNxt, Tcb->SndUna);\r
\r
- Tcb->CWnd = NET_MIN (Tcb->Ssthresh, FlightSize + Tcb->SndMss);\r
+ Tcb->CWnd = MIN (Tcb->Ssthresh, FlightSize + Tcb->SndMss);\r
\r
Tcb->CongestState = TCP_CONGEST_OPEN;\r
TCP4_DEBUG_TRACE (("TcpFastRecover: received a full ACK(%d)"\r
Tcb->RttVar = Measure << (TCP_RTT_SHIFT - 1);\r
}\r
\r
- Tcb->Rto = (Tcb->SRtt + NET_MAX (8, 4 * Tcb->RttVar)) >> TCP_RTT_SHIFT;\r
+ Tcb->Rto = (Tcb->SRtt + MAX (8, 4 * Tcb->RttVar)) >> TCP_RTT_SHIFT;\r
\r
//\r
// Step 2.4: Limit the RTO to at least 1 second\r
TCP_SEQ_LEQ (Seg->Ack, Tcb->SndNxt)) {\r
\r
Tcb->SndWnd = Seg->Wnd;\r
- Tcb->SndWndMax = NET_MAX (Tcb->SndWnd, Tcb->SndWndMax);\r
+ Tcb->SndWndMax = MAX (Tcb->SndWnd, Tcb->SndWndMax);\r
Tcb->SndWl1 = Seg->Seq;\r
Tcb->SndWl2 = Seg->Ack;\r
TcpSetState (Tcb, TCP_ESTABLISHED);\r
Tcb->CWnd += Tcb->SndMss;\r
} else {\r
\r
- Tcb->CWnd += NET_MAX (Tcb->SndMss * Tcb->SndMss / Tcb->CWnd, 1);\r
+ Tcb->CWnd += MAX (Tcb->SndMss * Tcb->SndMss / Tcb->CWnd, 1);\r
}\r
\r
- Tcb->CWnd = NET_MIN (Tcb->CWnd, TCP_MAX_WIN << Tcb->SndWndScale);\r
+ Tcb->CWnd = MIN (Tcb->CWnd, TCP_MAX_WIN << Tcb->SndWndScale);\r
}\r
\r
if (Tcb->CongestState == TCP_CONGEST_LOSS) {\r
}\r
\r
Tcb->SndWnd = Seg->Wnd;\r
- Tcb->SndWndMax = NET_MAX (Tcb->SndWnd, Tcb->SndWndMax);\r
+ Tcb->SndWndMax = MAX (Tcb->SndWnd, Tcb->SndWndMax);\r
Tcb->SndWl1 = Seg->Seq;\r
Tcb->SndWl2 = Seg->Ack;\r
}\r