diff --git a/arch/arm/src/lpc17xx/lpc17_emacram.h b/arch/arm/src/lpc17xx/lpc17_emacram.h index 98eaa91b97..3561b72ba8 100755 --- a/arch/arm/src/lpc17xx/lpc17_emacram.h +++ b/arch/arm/src/lpc17xx/lpc17_emacram.h @@ -209,7 +209,7 @@ #define LPC17_PKTMEM_SIZE (LPC17_EMACRAM_SIZE-LPC17_DESCTAB_SIZE) #define LPC17_PKTMEM_END (LPC17_EMACRAM_BASE+LPC17_PKTMEM_SIZE) -#define LPC17_MAXPACKET_SIZE ((CONFIG_NET_BUFSIZE + 3 + 2) & ~3) +#define LPC17_MAXPACKET_SIZE ((CONFIG_NET_BUFSIZE + CONFIG_NET_GUARDSIZE + 3) & ~3) #define LPC17_NTXPKTS CONFIG_NET_NTXDESC #define LPC17_NRXPKTS CONFIG_NET_NRXDESC diff --git a/arch/arm/src/lpc17xx/lpc17_ethernet.c b/arch/arm/src/lpc17xx/lpc17_ethernet.c index 3efa3df03b..de015bcb94 100644 --- a/arch/arm/src/lpc17xx/lpc17_ethernet.c +++ b/arch/arm/src/lpc17xx/lpc17_ethernet.c @@ -53,6 +53,7 @@ #include #include +#include #include #include @@ -809,7 +810,7 @@ static void lpc17_rxdone(struct lpc17_driver_s *priv) * imply that the packet is too big. */ - /* else */ if (pktlen > CONFIG_NET_BUFSIZE+2) + /* else */ if (pktlen > CONFIG_NET_BUFSIZE + CONFIG_NET_GUARDSIZE) { nlldbg("Too big. considx: %08x prodidx: %08x pktlen: %d rxstat: %08x\n", considx, prodidx, pktlen, *rxstat);