summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nuttx/arch/arm/src/c5471/c5471_ethernet.c4
-rw-r--r--nuttx/arch/arm/src/kinetis/kinetis_enet.c4
-rw-r--r--nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c4
-rw-r--r--nuttx/arch/arm/src/sam34/sam_emac.c4
-rw-r--r--nuttx/arch/arm/src/sama5/sam_emaca.c4
-rw-r--r--nuttx/arch/arm/src/sama5/sam_emacb.c4
-rw-r--r--nuttx/arch/arm/src/sama5/sam_gmac.c4
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_eth.c4
-rw-r--r--nuttx/arch/arm/src/tiva/lm3s_ethernet.c4
-rw-r--r--nuttx/arch/arm/src/tiva/tm4c_ethernet.c4
-rw-r--r--nuttx/arch/hc/src/m9s12/m9s12_ethernet.c4
-rw-r--r--nuttx/arch/mips/src/pic32mx/pic32mx-ethernet.c4
-rw-r--r--nuttx/arch/sim/src/up_netdriver.c4
-rw-r--r--nuttx/arch/z80/src/ez80/ez80_emac.c4
14 files changed, 28 insertions, 28 deletions
diff --git a/nuttx/arch/arm/src/c5471/c5471_ethernet.c b/nuttx/arch/arm/src/c5471/c5471_ethernet.c
index f52856662..3f950c25e 100644
--- a/nuttx/arch/arm/src/c5471/c5471_ethernet.c
+++ b/nuttx/arch/arm/src/c5471/c5471_ethernet.c
@@ -1256,7 +1256,7 @@ static void c5471_receive(struct c5471_driver_s *c5471)
/* Update the Ethernet header with the correct MAC address */
#ifdef CONFIG_NET_IPv6
- if (BUF->type == HTONS(ETHTYPE_IP))
+ if (IFF_IS_IPv4(dev->d_flags))
#endif
{
arp_out(dev);
@@ -1290,7 +1290,7 @@ static void c5471_receive(struct c5471_driver_s *c5471)
#ifdef CONFIG_NET_IPv4
/* Update the Ethernet header with the correct MAC address */
- if (BUF->type == HTONS(ETHTYPE_IP))
+ if (IFF_IS_IPv4(dev->d_flags))
{
arp_out(dev);
}
diff --git a/nuttx/arch/arm/src/kinetis/kinetis_enet.c b/nuttx/arch/arm/src/kinetis/kinetis_enet.c
index 9b365c311..08b273aa6 100644
--- a/nuttx/arch/arm/src/kinetis/kinetis_enet.c
+++ b/nuttx/arch/arm/src/kinetis/kinetis_enet.c
@@ -537,7 +537,7 @@ static void kinetis_receive(FAR struct kinetis_driver_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);
@@ -568,7 +568,7 @@ static void kinetis_receive(FAR struct kinetis_driver_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);
}
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c b/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c
index 3b4ac7d5d..b37aed6c2 100644
--- a/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c
+++ b/nuttx/arch/arm/src/lpc17xx/lpc17_ethernet.c
@@ -897,7 +897,7 @@ static void lpc17_rxdone(struct lpc17_driver_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->lp_dev.d_flags))
#endif
{
arp_out(&priv->lp_dev);
@@ -930,7 +930,7 @@ static void lpc17_rxdone(struct lpc17_driver_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->lp_dev.d_flags))
{
arp_out(&priv->lp_dev);
}
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);
}
diff --git a/nuttx/arch/arm/src/sama5/sam_emaca.c b/nuttx/arch/arm/src/sama5/sam_emaca.c
index 00e324482..51b1700fd 100644
--- a/nuttx/arch/arm/src/sama5/sam_emaca.c
+++ b/nuttx/arch/arm/src/sama5/sam_emaca.c
@@ -1202,7 +1202,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);
@@ -1233,7 +1233,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);
}
diff --git a/nuttx/arch/arm/src/sama5/sam_emacb.c b/nuttx/arch/arm/src/sama5/sam_emacb.c
index 98af0f834..37fb8ea33 100644
--- a/nuttx/arch/arm/src/sama5/sam_emacb.c
+++ b/nuttx/arch/arm/src/sama5/sam_emacb.c
@@ -1528,7 +1528,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);
@@ -1559,7 +1559,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);
}
diff --git a/nuttx/arch/arm/src/sama5/sam_gmac.c b/nuttx/arch/arm/src/sama5/sam_gmac.c
index ba5789324..1ed1e4b60 100644
--- a/nuttx/arch/arm/src/sama5/sam_gmac.c
+++ b/nuttx/arch/arm/src/sama5/sam_gmac.c
@@ -1132,7 +1132,7 @@ static void sam_receive(struct sam_gmac_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);
@@ -1163,7 +1163,7 @@ static void sam_receive(struct sam_gmac_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);
}
diff --git a/nuttx/arch/arm/src/stm32/stm32_eth.c b/nuttx/arch/arm/src/stm32/stm32_eth.c
index d78719e6c..4b3b982d9 100644
--- a/nuttx/arch/arm/src/stm32/stm32_eth.c
+++ b/nuttx/arch/arm/src/stm32/stm32_eth.c
@@ -1638,7 +1638,7 @@ static void stm32_receive(FAR struct stm32_ethmac_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);
@@ -1669,7 +1669,7 @@ static void stm32_receive(FAR struct stm32_ethmac_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);
}
diff --git a/nuttx/arch/arm/src/tiva/lm3s_ethernet.c b/nuttx/arch/arm/src/tiva/lm3s_ethernet.c
index 5c1e70104..6d1bdaa4f 100644
--- a/nuttx/arch/arm/src/tiva/lm3s_ethernet.c
+++ b/nuttx/arch/arm/src/tiva/lm3s_ethernet.c
@@ -790,7 +790,7 @@ static void tiva_receive(struct tiva_driver_s *priv)
/* Update the Ethernet header with the correct MAC address */
#ifdef CONFIG_NET_IPv6
- if (ETHBUF->type == HTONS(ETHTYPE_IP))
+ if (IFF_IS_IPv4(priv->ld_dev.d_flags))
#endif
{
arp_out(&priv->ld_dev);
@@ -823,7 +823,7 @@ static void tiva_receive(struct tiva_driver_s *priv)
#ifdef CONFIG_NET_IPv4
/* Update the Ethernet header with the correct MAC address */
- if (ETHBUF->type == HTONS(ETHTYPE_IP))
+ if (IFF_IS_IPv4(priv->ld_dev.d_flags))
{
arp_out(&priv->ld_dev);
}
diff --git a/nuttx/arch/arm/src/tiva/tm4c_ethernet.c b/nuttx/arch/arm/src/tiva/tm4c_ethernet.c
index 61106a961..8e920d5dd 100644
--- a/nuttx/arch/arm/src/tiva/tm4c_ethernet.c
+++ b/nuttx/arch/arm/src/tiva/tm4c_ethernet.c
@@ -1714,7 +1714,7 @@ static void tiva_receive(FAR struct tiva_ethmac_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);
@@ -1745,7 +1745,7 @@ static void tiva_receive(FAR struct tiva_ethmac_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);
}
diff --git a/nuttx/arch/hc/src/m9s12/m9s12_ethernet.c b/nuttx/arch/hc/src/m9s12/m9s12_ethernet.c
index efa408c8b..caa25af5c 100644
--- a/nuttx/arch/hc/src/m9s12/m9s12_ethernet.c
+++ b/nuttx/arch/hc/src/m9s12/m9s12_ethernet.c
@@ -279,7 +279,7 @@ static void emac_receive(FAR struct emac_driver_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->d_dev.d_flags))
#endif
{
arp_out(&priv->d_dev);
@@ -310,7 +310,7 @@ static void emac_receive(FAR struct emac_driver_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->d_dev.d_flags))
{
arp_out(&priv->d_dev);
}
diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-ethernet.c b/nuttx/arch/mips/src/pic32mx/pic32mx-ethernet.c
index d704814d6..872e68434 100644
--- a/nuttx/arch/mips/src/pic32mx/pic32mx-ethernet.c
+++ b/nuttx/arch/mips/src/pic32mx/pic32mx-ethernet.c
@@ -1454,7 +1454,7 @@ static void pic32mx_rxdone(struct pic32mx_driver_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->pd_dev.d_flags))
#endif
{
arp_out(&priv->pd_dev);
@@ -1487,7 +1487,7 @@ static void pic32mx_rxdone(struct pic32mx_driver_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->pd_dev.d_flags))
{
arp_out(&priv->pd_dev);
}
diff --git a/nuttx/arch/sim/src/up_netdriver.c b/nuttx/arch/sim/src/up_netdriver.c
index eec433ac2..7f40cabb4 100644
--- a/nuttx/arch/sim/src/up_netdriver.c
+++ b/nuttx/arch/sim/src/up_netdriver.c
@@ -181,7 +181,7 @@ void netdriver_loop(void)
/* Update the Ethernet header with the correct MAC address */
#ifdef CONFIG_NET_IPv6
- if (BUF->type == HTONS(ETHTYPE_IP))
+ if (IFF_IS_IPv4(g_sim_dev.d_flags))
#endif
{
arp_out(&g_sim_dev);
@@ -213,7 +213,7 @@ void netdriver_loop(void)
#ifdef CONFIG_NET_IPv4
/* Update the Ethernet header with the correct MAC address */
- if (BUF->type == HTONS(ETHTYPE_IP))
+ if (IFF_IS_IPv4(g_sim_dev.d_flags))
{
arp_out(&g_sim_dev);
}
diff --git a/nuttx/arch/z80/src/ez80/ez80_emac.c b/nuttx/arch/z80/src/ez80/ez80_emac.c
index 2a65638ec..7c2e935d0 100644
--- a/nuttx/arch/z80/src/ez80/ez80_emac.c
+++ b/nuttx/arch/z80/src/ez80/ez80_emac.c
@@ -1292,7 +1292,7 @@ static int ez80emac_receive(struct ez80emac_driver_s *priv)
/* Update the Ethernet header with the correct MAC address */
#ifdef CONFIG_NET_IPv6
- if (ETHBUF->type == HTONS(ETHTYPE_IP))
+ if (IFF_IS_IPv4(priv->dev.d_flags))
#endif
{
arp_out(&priv->dev);
@@ -1324,7 +1324,7 @@ static int ez80emac_receive(struct ez80emac_driver_s *priv)
#ifdef CONFIG_NET_IPv4
/* Update the Ethernet header with the correct MAC address */
- if (ETHBUF->type == HTONS(ETHTYPE_IP))
+ if (IFF_IS_IPv4(priv->dev.d_flags))
{
arp_out(&priv->dev);
}