summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/sam34/sam_emac.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/arm/src/sam34/sam_emac.c')
-rw-r--r--nuttx/arch/arm/src/sam34/sam_emac.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/nuttx/arch/arm/src/sam34/sam_emac.c b/nuttx/arch/arm/src/sam34/sam_emac.c
index 581a104c2..45a3b3337 100644
--- a/nuttx/arch/arm/src/sam34/sam_emac.c
+++ b/nuttx/arch/arm/src/sam34/sam_emac.c
@@ -69,6 +69,10 @@
#include <nuttx/net/netdev.h>
#include <nuttx/net/phy.h>
+#ifdef CONFIG_NET_PKT
+# include <nuttx/net/pkt.h>
+#endif
+
#include "up_arch.h"
#include "up_internal.h"
@@ -1136,8 +1140,14 @@ static void sam_receive(struct sam_emac_s *priv)
if (dev->d_len > CONFIG_NET_ETH_MTU)
{
nlldbg("DROPPED: Too big: %d\n", dev->d_len);
+ continue;
}
- else
+
+#ifdef CONFIG_NET_PKT
+ /* When packet sockets are enabled, feed the frame into the packet tap */
+
+ pkt_input(&priv->dev);
+#endif
/* We only accept IP packets of the configured type and ARP packets */