From 5764d5a5294c8885a91482dd867d6757470b2ba7 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 5 Jul 2018 17:41:01 -0600 Subject: [PATCH] net/tcp: Back out part of commit d9443888881e5d638a08ab3f6fdc203c9f9f475c. I see a few places that say that the maximum receive window size is 32,767 (INT16_MAX), but most say that it is 65,535 (UINT16_MAX). --- net/tcp/tcp_recvwindow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/tcp/tcp_recvwindow.c b/net/tcp/tcp_recvwindow.c index 065f368c19..4929e797ee 100644 --- a/net/tcp/tcp_recvwindow.c +++ b/net/tcp/tcp_recvwindow.c @@ -152,9 +152,9 @@ uint16_t tcp_get_recvwindow(FAR struct net_driver_s *dev) */ rwnd = (navail * CONFIG_IOB_BUFSIZE) + mss; - if (rwnd > INT16_MAX) + if (rwnd > UINT16_MAX) { - rwnd = INT16_MAX; + rwnd = UINT16_MAX; } /* Save the new receive window size */