mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-11 07:24:46 +00:00
net/tcp: define a fallback value for rcv_wnd size
Some driver implements it's own network packet pool, so PKTBUFSRX is zero. This results in zero-size TCP receive window, so data transfer doesn't work. Avoid it by setting a reasonable fallback value. Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
3a44b8ba94
commit
0eff920826
1 changed files with 5 additions and 1 deletions
|
@ -36,7 +36,11 @@
|
|||
#define TCP_SEND_RETRY 3
|
||||
#define TCP_SEND_TIMEOUT 2000UL
|
||||
#define TCP_RX_INACTIVE_TIMEOUT 30000UL
|
||||
#define TCP_RCV_WND_SIZE (PKTBUFSRX * TCP_MSS)
|
||||
#if PKTBUFSRX != 0
|
||||
#define TCP_RCV_WND_SIZE (PKTBUFSRX * TCP_MSS)
|
||||
#else
|
||||
#define TCP_RCV_WND_SIZE (4 * TCP_MSS)
|
||||
#endif
|
||||
|
||||
#define TCP_PACKET_OK 0
|
||||
#define TCP_PACKET_DROP 1
|
||||
|
|
Loading…
Add table
Reference in a new issue