lwip: fix tcp rx abnormal issue(tw8242)

In tcp_alloc(), initialize per_soc_tcp_wnd before initializing recv_wnd because recv_wnd depends on per_soc_tcp_wnd.
This commit is contained in:
Liu Zhi Fu
2016-10-31 17:50:09 +08:00
parent e34fc7a46c
commit a5552b1e21
3 changed files with 8 additions and 27 deletions

View File

@@ -1320,9 +1320,9 @@ tcp_rst(u32_t seqno, u32_t ackno,
#endif
#else
#if LWIP_WND_SCALE
tcphdr->wnd = PP_HTONS(((TCP_WND >> TCP_RCV_SCALE) & 0xFFFF));
tcphdr->wnd = PP_HTONS(((TCP_WND_DEFAULT >> TCP_RCV_SCALE) & 0xFFFF));
#else
tcphdr->wnd = PP_HTONS(TCP_WND);
tcphdr->wnd = PP_HTONS(TCP_WND_DEFAULT);
#endif
#endif
tcphdr->chksum = 0;