70 |
|
|
71 |
struct tcp_pcb *tcp_tmp_pcb; |
struct tcp_pcb *tcp_tmp_pcb; |
72 |
|
|
|
#define MIN(x,y) (x) < (y)? (x): (y) |
|
|
|
|
73 |
static u8_t tcp_timer; |
static u8_t tcp_timer; |
74 |
|
|
75 |
static u16_t tcp_new_port(void); |
static u16_t tcp_new_port(void); |
506 |
tcp_rexmit(pcb); |
tcp_rexmit(pcb); |
507 |
|
|
508 |
/* Reduce congestion window and ssthresh. */ |
/* Reduce congestion window and ssthresh. */ |
509 |
eff_wnd = MIN(pcb->cwnd, pcb->snd_wnd); |
eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd); |
510 |
pcb->ssthresh = eff_wnd >> 1; |
pcb->ssthresh = eff_wnd >> 1; |
511 |
if (pcb->ssthresh < pcb->mss) { |
if (pcb->ssthresh < pcb->mss) { |
512 |
pcb->ssthresh = pcb->mss * 2; |
pcb->ssthresh = pcb->mss * 2; |