diff --git a/net/tcp/tcp.h b/net/tcp/tcp.h index 82f6d152639..937f8afdb5b 100644 --- a/net/tcp/tcp.h +++ b/net/tcp/tcp.h @@ -212,10 +212,7 @@ struct tcp_conn_s uint8_t rcvseq[4]; /* The sequence number that we expect to * receive next */ uint8_t sndseq[4]; /* The sequence number that was last sent by us */ -#if !defined(CONFIG_NET_TCP_WRITE_BUFFERS) || \ - defined(CONFIG_NET_SENDFILE) uint32_t rexmit_seq; /* The sequence number to be retrasmitted */ -#endif uint8_t crefs; /* Reference counts on this instance */ #if defined(CONFIG_NET_IPv4) && defined(CONFIG_NET_IPv6) uint8_t domain; /* IP domain: PF_INET or PF_INET6 */ diff --git a/net/tcp/tcp_conn.c b/net/tcp/tcp_conn.c index d97b1ae8561..182ba7bac95 100644 --- a/net/tcp/tcp_conn.c +++ b/net/tcp/tcp_conn.c @@ -1144,9 +1144,7 @@ FAR struct tcp_conn_s *tcp_alloc_accept(FAR struct net_driver_s *dev, conn->tcpstateflags = TCP_SYN_RCVD; tcp_initsequence(conn); -#if !defined(CONFIG_NET_TCP_WRITE_BUFFERS) conn->rexmit_seq = tcp_getsequence(conn->sndseq); -#endif conn->tx_unacked = 1; #ifdef CONFIG_NET_TCP_WRITE_BUFFERS @@ -1470,9 +1468,7 @@ int tcp_connect(FAR struct tcp_conn_s *conn, FAR const struct sockaddr *addr) /* Save initial sndseq to rexmit_seq, otherwise it will be zero */ -#if !defined(CONFIG_NET_TCP_WRITE_BUFFERS) conn->rexmit_seq = tcp_getsequence(conn->sndseq); -#endif #ifdef CONFIG_NET_TCP_CC_NEWRENO /* Initialize the variables of congestion control. */ diff --git a/net/tcp/tcp_input.c b/net/tcp/tcp_input.c index d6630136450..3543873cec9 100644 --- a/net/tcp/tcp_input.c +++ b/net/tcp/tcp_input.c @@ -1327,11 +1327,7 @@ skip_rtt: if ((tcp->flags & TCP_CTL) == TCP_SYN) { -#if !defined(CONFIG_NET_TCP_WRITE_BUFFERS) tcp_setsequence(conn->sndseq, conn->rexmit_seq); -#else - /* REVISIT for the buffered mode */ -#endif tcp_synack(dev, conn, TCP_ACK | TCP_SYN); return; } diff --git a/net/tcp/tcp_send.c b/net/tcp/tcp_send.c index 02e289ee563..ce09b57c2f6 100644 --- a/net/tcp/tcp_send.c +++ b/net/tcp/tcp_send.c @@ -238,7 +238,6 @@ static void tcp_sendcommon(FAR struct net_driver_s *dev, g_netstats.tcp.sent++; #endif -#if !defined(CONFIG_NET_TCP_WRITE_BUFFERS) if ((tcp->flags & (TCP_SYN | TCP_FIN)) != 0) { /* Remember sndseq that will be used in case of a possible @@ -253,9 +252,6 @@ static void tcp_sendcommon(FAR struct net_driver_s *dev, net_incr32(conn->sndseq, 1); } -#else - /* REVISIT for the buffered mode */ -#endif } /**************************************************************************** diff --git a/net/tcp/tcp_timer.c b/net/tcp/tcp_timer.c index 61929735827..c59360c4d1f 100644 --- a/net/tcp/tcp_timer.c +++ b/net/tcp/tcp_timer.c @@ -602,11 +602,7 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn) * SYNACK. */ -#if !defined(CONFIG_NET_TCP_WRITE_BUFFERS) tcp_setsequence(conn->sndseq, conn->rexmit_seq); -#else - /* REVISIT for the buffered mode */ -#endif tcp_synack(dev, conn, TCP_ACK | TCP_SYN); goto done; @@ -614,11 +610,7 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn) /* In the SYN_SENT state, we retransmit out SYN. */ -#if !defined(CONFIG_NET_TCP_WRITE_BUFFERS) tcp_setsequence(conn->sndseq, conn->rexmit_seq); -#else - /* REVISIT for the buffered mode */ -#endif tcp_synack(dev, conn, TCP_SYN); goto done; @@ -659,11 +651,7 @@ void tcp_timer(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn) /* In all these states we should retransmit a FINACK. */ -#if !defined(CONFIG_NET_TCP_WRITE_BUFFERS) tcp_setsequence(conn->sndseq, conn->rexmit_seq); -#else - /* REVISIT for the buffered mode */ -#endif tcp_send(dev, conn, TCP_FIN | TCP_ACK, hdrlen); goto done; }