diff options
Diffstat (limited to 'nuttx/arch/arm/src/sam34/sam_emac.c')
-rw-r--r-- | nuttx/arch/arm/src/sam34/sam_emac.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nuttx/arch/arm/src/sam34/sam_emac.c b/nuttx/arch/arm/src/sam34/sam_emac.c index 2573778a4..c5df14f14 100644 --- a/nuttx/arch/arm/src/sam34/sam_emac.c +++ b/nuttx/arch/arm/src/sam34/sam_emac.c @@ -204,7 +204,7 @@ #endif #define EMAC_RX_UNITSIZE 128 /* Fixed size for RX buffer */ -#define EMAC_TX_UNITSIZE CONFIG_NET_BUFSIZE /* MAX size for Ethernet packet */ +#define EMAC_TX_UNITSIZE CONFIG_NET_ETH_MTU /* MAX size for Ethernet packet */ /* We need at least one more free buffer than transmit buffers */ @@ -1010,9 +1010,9 @@ static int sam_recvframe(struct sam_emac_s *priv) /* Get the number of bytes to copy from the buffer */ copylen = EMAC_RX_UNITSIZE; - if ((pktlen + copylen) > CONFIG_NET_BUFSIZE) + if ((pktlen + copylen) > CONFIG_NET_ETH_MTU) { - copylen = CONFIG_NET_BUFSIZE - pktlen; + copylen = CONFIG_NET_ETH_MTU - pktlen; } /* Get the data source. Invalidate the source memory region to @@ -1133,7 +1133,7 @@ static void sam_receive(struct sam_emac_s *priv) * (this should not happen) */ - if (dev->d_len > CONFIG_NET_BUFSIZE) + if (dev->d_len > CONFIG_NET_ETH_MTU) { nlldbg("DROPPED: Too big: %d\n", dev->d_len); } |