From fc1ac6e3e042787c10ff50f9e75bb41c6f696258 Mon Sep 17 00:00:00 2001 From: Juha Niskanen Date: Fri, 15 Oct 2021 15:16:45 +0300 Subject: [PATCH] include/nuttx/net/netconfig.h: add MSS values for usrsock Signed-off-by: Juha Niskanen --- include/nuttx/net/netconfig.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/nuttx/net/netconfig.h b/include/nuttx/net/netconfig.h index af1c43984a..18d5d292e8 100644 --- a/include/nuttx/net/netconfig.h +++ b/include/nuttx/net/netconfig.h @@ -272,7 +272,14 @@ # define TUN_UDP_MSS(h) (CONFIG_NET_TUN_PKTSIZE - __UDP_HDRLEN - (h)) #endif +#ifdef CONFIG_NET_USRSOCK +# define __MIN_UDP_MSS(h) INT_MAX +# define __MAX_UDP_MSS(h) 0 +#endif + #ifdef CONFIG_NET_ETHERNET +# undef __MIN_UDP_MSS +# undef __MAX_UDP_MSS # define __MIN_UDP_MSS(h) ETH_UDP_MSS(h) # define __MAX_UDP_MSS(h) ETH_UDP_MSS(h) # define __ETH_MIN_UDP_MSS(h) ETH_UDP_MSS(h) @@ -452,7 +459,14 @@ # define TUN_TCP_MSS(h) (CONFIG_NET_TUN_PKTSIZE - __TCP_HDRLEN - (h)) #endif +#ifdef CONFIG_NET_USRSOCK +# define __MIN_TCP_MSS(h) INT_MAX +# define __MAX_TCP_MSS(h) 0 +#endif + #ifdef CONFIG_NET_ETHERNET +# undef __MIN_TCP_MSS +# undef __MAX_TCP_MSS # define __MIN_TCP_MSS(h) ETH_TCP_MSS(h) # define __MAX_TCP_MSS(h) ETH_TCP_MSS(h) # define __ETH_MIN_TCP_MSS(h) ETH_TCP_MSS(h)