diff --git a/net/devif/devif_cansend.c b/net/devif/devif_cansend.c index 753868fe82..5807fdf773 100644 --- a/net/devif/devif_cansend.c +++ b/net/devif/devif_cansend.c @@ -55,8 +55,7 @@ void devif_can_send(FAR struct net_driver_s *dev, FAR const void *buf, unsigned int len) { - unsigned int limit = NETDEV_PKTSIZE(dev) - - CONFIG_NET_LL_GUARDSIZE; + unsigned int limit = NETDEV_PKTSIZE(dev) - NET_LL_HDRLEN(dev); if (dev == NULL || len == 0 || len > limit) { diff --git a/net/devif/devif_pktsend.c b/net/devif/devif_pktsend.c index 8c98699e69..7b3982c81b 100644 --- a/net/devif/devif_pktsend.c +++ b/net/devif/devif_pktsend.c @@ -55,8 +55,7 @@ void devif_pkt_send(FAR struct net_driver_s *dev, FAR const void *buf, unsigned int len) { - unsigned int limit = NETDEV_PKTSIZE(dev) - - CONFIG_NET_LL_GUARDSIZE; + unsigned int limit = NETDEV_PKTSIZE(dev) - NET_LL_HDRLEN(dev); if (dev == NULL || len == 0 || len > limit) { diff --git a/net/devif/devif_send.c b/net/devif/devif_send.c index 020e843909..bfb963e84c 100644 --- a/net/devif/devif_send.c +++ b/net/devif/devif_send.c @@ -69,7 +69,7 @@ void devif_send(FAR struct net_driver_s *dev, FAR const void *buf, int len, unsigned int offset) { unsigned int limit = NETDEV_PKTSIZE(dev) - - CONFIG_NET_LL_GUARDSIZE - offset; + NET_LL_HDRLEN(dev) - offset; if (dev == NULL || len == 0 || len > limit) {