diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2015-01-20 15:14:29 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2015-01-20 15:14:29 -0600 |
commit | e1d8c89b89c93e5ff71f276c6ec7035a80766a09 (patch) | |
tree | be6ffa4cb6f6c31e6122160effdff06155b5bb62 /nuttx/arch/arm/src/sam34 | |
parent | 8f957faf84b9aa8de2881361e116943b78ec2dd4 (diff) | |
download | nuttx-e1d8c89b89c93e5ff71f276c6ec7035a80766a09.tar.gz nuttx-e1d8c89b89c93e5ff71f276c6ec7035a80766a09.tar.bz2 nuttx-e1d8c89b89c93e5ff71f276c6ec7035a80766a09.zip |
Networking: Add missing raw/packet socket support to all Ethernet drivers
Diffstat (limited to 'nuttx/arch/arm/src/sam34')
-rw-r--r-- | nuttx/arch/arm/src/sam34/sam_emac.c | 12 |
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 */ |