diff --git a/arch/arm/src/imxrt/imxrt_enet.c b/arch/arm/src/imxrt/imxrt_enet.c index 1e8bf5826c..5d5cb0c5af 100644 --- a/arch/arm/src/imxrt/imxrt_enet.c +++ b/arch/arm/src/imxrt/imxrt_enet.c @@ -259,7 +259,8 @@ #define BUF ((struct eth_hdr_s *)priv->dev.d_buf) -#define IMXRT_BUF_SIZE ENET_ALIGN_UP(CONFIG_NET_ETH_PKTSIZE) +#define IMXRT_BUF_SIZE ENET_ALIGN_UP(CONFIG_NET_ETH_PKTSIZE + \ + CONFIG_NET_GUARDSIZE) /**************************************************************************** * Private Types @@ -2293,11 +2294,13 @@ static inline int imxrt_initphy(struct imxrt_driver_s *priv, bool renogphy) #ifdef CONFIG_IMXRT_ENETUSEMII rcr = ENET_RCR_CRCFWD | - CONFIG_NET_ETH_PKTSIZE << ENET_RCR_MAX_FL_SHIFT | + (CONFIG_NET_ETH_PKTSIZE + CONFIG_NET_GUARDSIZE) + << ENET_RCR_MAX_FL_SHIFT | ENET_RCR_MII_MODE; #else rcr = ENET_RCR_RMII_MODE | ENET_RCR_CRCFWD | - CONFIG_NET_ETH_PKTSIZE << ENET_RCR_MAX_FL_SHIFT | + (CONFIG_NET_ETH_PKTSIZE + CONFIG_NET_GUARDSIZE) + << ENET_RCR_MAX_FL_SHIFT | ENET_RCR_MII_MODE; #endif tcr = 0;