diff --git a/sys/include/net/gnrc/tcp/config.h b/sys/include/net/gnrc/tcp/config.h index 5953090cf1..c4aa11beb6 100644 --- a/sys/include/net/gnrc/tcp/config.h +++ b/sys/include/net/gnrc/tcp/config.h @@ -68,11 +68,11 @@ extern "C" { /** * @brief Maximum Segment Size (MSS). */ -#ifndef GNRC_TCP_MSS +#ifndef CONFIG_GNRC_TCP_MSS #ifdef MODULE_GNRC_IPV6 -#define GNRC_TCP_MSS (1220U) /**< If IPv6 is used. Get MSS = 1280 - IPv6 Hdr - TCP Hdr = 1220 */ +#define CONFIG_GNRC_TCP_MSS (1220U) /**< If IPv6 is used. Get MSS = 1280 - IPv6 Hdr - TCP Hdr = 1220 */ #else -#define GNRC_TCP_MSS (576U) /**< Default MSS */ +#define CONFIG_GNRC_TCP_MSS (576U) /**< Default MSS */ #endif #endif @@ -87,7 +87,7 @@ extern "C" { * @brief Default receive window size */ #ifndef GNRC_TCP_DEFAULT_WINDOW -#define GNRC_TCP_DEFAULT_WINDOW (GNRC_TCP_MSS * CONFIG_GNRC_TCP_MSS_MULTIPLICATOR) +#define GNRC_TCP_DEFAULT_WINDOW (CONFIG_GNRC_TCP_MSS * CONFIG_GNRC_TCP_MSS_MULTIPLICATOR) #endif /** diff --git a/sys/net/gnrc/transport_layer/tcp/gnrc_tcp_fsm.c b/sys/net/gnrc/transport_layer/tcp/gnrc_tcp_fsm.c index 29b61509f7..85a1a13199 100644 --- a/sys/net/gnrc/transport_layer/tcp/gnrc_tcp_fsm.c +++ b/sys/net/gnrc/transport_layer/tcp/gnrc_tcp_fsm.c @@ -272,7 +272,7 @@ static int _fsm_call_send(gnrc_tcp_tcb_t *tcb, void *buf, size_t len) /* Check if window is open and all packets were transmitted */ if (payload > 0 && tcb->snd_wnd > 0 && tcb->pkt_retransmit == NULL) { /* Calculate segment size */ - payload = (payload < GNRC_TCP_MSS) ? payload : GNRC_TCP_MSS; + payload = (payload < CONFIG_GNRC_TCP_MSS) ? payload : CONFIG_GNRC_TCP_MSS; payload = (payload < tcb->mss) ? payload : tcb->mss; payload = (payload < len) ? payload : len; @@ -307,8 +307,8 @@ static int _fsm_call_recv(gnrc_tcp_tcb_t *tcb, void *buf, size_t len) /* Read data into 'buf' up to 'len' bytes from receive buffer */ size_t rcvd = ringbuffer_get(&(tcb->rcv_buf), buf, len); - /* If receive buffer can store more than GNRC_TCP_MSS: open window to available buffer size */ - if (ringbuffer_get_free(&tcb->rcv_buf) >= GNRC_TCP_MSS) { + /* If receive buffer can store more than CONFIG_GNRC_TCP_MSS: open window to available buffer size */ + if (ringbuffer_get_free(&tcb->rcv_buf) >= CONFIG_GNRC_TCP_MSS) { tcb->rcv_wnd = ringbuffer_get_free(&(tcb->rcv_buf)); /* Send ACK to anounce window update */ diff --git a/sys/net/gnrc/transport_layer/tcp/gnrc_tcp_pkt.c b/sys/net/gnrc/transport_layer/tcp/gnrc_tcp_pkt.c index 984f8681bc..fdf8af54c6 100644 --- a/sys/net/gnrc/transport_layer/tcp/gnrc_tcp_pkt.c +++ b/sys/net/gnrc/transport_layer/tcp/gnrc_tcp_pkt.c @@ -201,7 +201,7 @@ int _pkt_build(gnrc_tcp_tcb_t *tcb, gnrc_pktsnip_t **out_pkt, uint16_t *seq_con, /* If SYN flag is set: Add MSS option */ if (ctl & MSK_SYN) { - network_uint32_t mss_option = byteorder_htonl(_option_build_mss(GNRC_TCP_MSS)); + network_uint32_t mss_option = byteorder_htonl(_option_build_mss(CONFIG_GNRC_TCP_MSS)); memcpy(opt_ptr, &mss_option, sizeof(mss_option)); } /* Increase opt_ptr and decrease opt_left, if other options are added */