summaryrefslogtreecommitdiff
path: root/nuttx/arch/arm/src/sam34
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-01-20 06:26:14 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-01-20 06:26:14 -0600
commit82183ccc3878f0c66959aa7653620bdbd15ef4e3 (patch)
tree1a7f0fba02136ab78b799a8ba60a894fb8951faf /nuttx/arch/arm/src/sam34
parentca545aa2d7239f5f769035c77d63d80409d7bc02 (diff)
downloadnuttx-82183ccc3878f0c66959aa7653620bdbd15ef4e3.tar.gz
nuttx-82183ccc3878f0c66959aa7653620bdbd15ef4e3.tar.bz2
nuttx-82183ccc3878f0c66959aa7653620bdbd15ef4e3.zip
Ethernet drivers: Use IFF_IS_IPv4 macro. Cannot rely on the EtherType being set correctly.
Diffstat (limited to 'nuttx/arch/arm/src/sam34')
-rw-r--r--nuttx/arch/arm/src/sam34/sam_emac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nuttx/arch/arm/src/sam34/sam_emac.c b/nuttx/arch/arm/src/sam34/sam_emac.c
index 85676a9ef..581a104c2 100644
--- a/nuttx/arch/arm/src/sam34/sam_emac.c
+++ b/nuttx/arch/arm/src/sam34/sam_emac.c
@@ -1162,7 +1162,7 @@ static void sam_receive(struct sam_emac_s *priv)
/* Update the Ethernet header with the correct MAC address */
#ifdef CONFIG_NET_IPv6
- if (BUF->type == HTONS(ETHTYPE_IP))
+ if (IFF_IS_IPv4(priv->dev.d_flags))
#endif
{
arp_out(&priv->dev);
@@ -1193,7 +1193,7 @@ static void sam_receive(struct sam_emac_s *priv)
#ifdef CONFIG_NET_IPv4
/* Update the Ethernet header with the correct MAC address */
- if (BUF->type == HTONS(ETHTYPE_IP))
+ if (IFF_IS_IPv4(priv->dev.d_flags))
{
arp_out(&priv->dev);
}