diff --git a/src/core/init.c b/src/core/init.c index 0eb1e44c..570d54aa 100644 --- a/src/core/init.c +++ b/src/core/init.c @@ -141,7 +141,7 @@ PACK_STRUCT_END #if (LWIP_TCP && (TCP_WND > 0xffffffff)) #error "If you want to use TCP, TCP_WND must fit in an u32_t, so, you have to reduce it in your lwipopts.h" #endif -#if (LWIP_TCP && LWIP_WND_SCALE && (TCP_RCV_SCALE > 14)) +#if (LWIP_TCP && (TCP_RCV_SCALE > 14)) #error "The maximum valid window scale value is 14!" #endif #if (LWIP_TCP && (TCP_WND > (0xFFFFU << TCP_RCV_SCALE))) diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 0db03b50..61305016 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -1128,7 +1128,10 @@ /** * TCP_WND: The size of a TCP window. This must be at least - * (2 * TCP_MSS) for things to work well + * (2 * TCP_MSS) for things to work well. + * ATTENTION: when using TCP_RCV_SCALE, TCP_WND is the total size + * with scaling applied. Maximum window value in the TCP header + * will be TCP_WND >> TCP_RCV_SCALE */ #if !defined TCP_WND || defined __DOXYGEN__ #define TCP_WND (4 * TCP_MSS)