diff --git a/net/sixlowpan/sixlowpan_tcpsend.c b/net/sixlowpan/sixlowpan_tcpsend.c index b0b0277f8ba..29ca5dc5c8f 100644 --- a/net/sixlowpan/sixlowpan_tcpsend.c +++ b/net/sixlowpan/sixlowpan_tcpsend.c @@ -263,6 +263,10 @@ static int sixlowpan_tcp_header(FAR struct tcp_conn_s *conn, ipv6tcp->tcp.wnd[0] = recvwndo >> 8; ipv6tcp->tcp.wnd[1] = recvwndo & 0xff; + + /* Update the Receiver Window */ + + conn->rcv_wnd = recvwndo; } /* Calculate TCP checksum. */ diff --git a/net/tcp/tcp.h b/net/tcp/tcp.h index fc67f45f213..a3649b88ec2 100644 --- a/net/tcp/tcp.h +++ b/net/tcp/tcp.h @@ -194,6 +194,7 @@ struct tcp_conn_s * connection */ uint16_t snd_wnd; /* Sequence and acknowledgement numbers of last * window update */ + uint16_t rcv_wnd; /* Receiver window available */ #ifdef CONFIG_NET_TCP_WRITE_BUFFERS uint32_t tx_unacked; /* Number bytes sent but not yet ACKed */ #else diff --git a/net/tcp/tcp_send.c b/net/tcp/tcp_send.c index ee82f003834..190d4e6ee9b 100644 --- a/net/tcp/tcp_send.c +++ b/net/tcp/tcp_send.c @@ -366,6 +366,10 @@ static void tcp_sendcommon(FAR struct net_driver_s *dev, tcp->wnd[0] = recvwndo >> 8; tcp->wnd[1] = recvwndo & 0xff; + + /* Update the Receiver Window */ + + conn->rcv_wnd = recvwndo; } /* Finish the IP portion of the message and calculate checksums */