diff --git a/arch/arm/src/c5471/c5471_ethernet.c b/arch/arm/src/c5471/c5471_ethernet.c index 7ea7e3d232b..35a4ae29a54 100644 --- a/arch/arm/src/c5471/c5471_ethernet.c +++ b/arch/arm/src/c5471/c5471_ethernet.c @@ -1271,6 +1271,12 @@ static void c5471_receive(struct c5471_driver_s *c5471) { arp_out(dev); } +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(dev); + } +#endif /* And send the packet */ @@ -1297,13 +1303,19 @@ static void c5471_receive(struct c5471_driver_s *c5471) if (dev->d_len > 0 && (EIM_TXDESC_OWN_HOST & getreg32(c5471->c_rxcpudesc)) == 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(dev->d_flags)) { arp_out(dev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(dev); + } #endif /* And send the packet */ diff --git a/arch/arm/src/kinetis/kinetis_enet.c b/arch/arm/src/kinetis/kinetis_enet.c index 39aa02dea22..e28f8b630e3 100644 --- a/arch/arm/src/kinetis/kinetis_enet.c +++ b/arch/arm/src/kinetis/kinetis_enet.c @@ -552,6 +552,12 @@ static void kinetis_receive(FAR struct kinetis_driver_s *priv) { arp_out(&priv->dev); } +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(&priv->dev); + } +#endif /* And send the packet */ @@ -575,13 +581,19 @@ static void kinetis_receive(FAR struct kinetis_driver_s *priv) if (priv->dev.d_len > 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(priv->dev.d_flags)) { arp_out(&priv->dev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(&priv->dev); + } #endif /* And send the packet */ diff --git a/arch/arm/src/lpc17xx/lpc17_ethernet.c b/arch/arm/src/lpc17xx/lpc17_ethernet.c index 71ee88a435a..d0e085d4fdc 100644 --- a/arch/arm/src/lpc17xx/lpc17_ethernet.c +++ b/arch/arm/src/lpc17xx/lpc17_ethernet.c @@ -914,6 +914,12 @@ static void lpc17_rxdone(struct lpc17_driver_s *priv) { arp_out(&priv->lp_dev); } +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(&priv->lp_dev); + } +#endif /* And send the packet */ @@ -939,13 +945,19 @@ static void lpc17_rxdone(struct lpc17_driver_s *priv) if (priv->lp_dev.d_len > 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(priv->lp_dev.d_flags)) { arp_out(&priv->lp_dev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(&priv->lp_dev); + } #endif /* And send the packet */ diff --git a/arch/arm/src/sam34/sam_emac.c b/arch/arm/src/sam34/sam_emac.c index 45a3b333792..2f293243670 100644 --- a/arch/arm/src/sam34/sam_emac.c +++ b/arch/arm/src/sam34/sam_emac.c @@ -1177,6 +1177,12 @@ static void sam_receive(struct sam_emac_s *priv) { arp_out(&priv->dev); } +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(&priv->dev); + } +#endif /* And send the packet */ @@ -1200,13 +1206,19 @@ static void sam_receive(struct sam_emac_s *priv) if (priv->dev.d_len > 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(priv->dev.d_flags)) { arp_out(&priv->dev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(&priv->dev); + } #endif /* And send the packet */ diff --git a/arch/arm/src/sama5/sam_emaca.c b/arch/arm/src/sama5/sam_emaca.c index db362810741..d9b8037ffd0 100644 --- a/arch/arm/src/sama5/sam_emaca.c +++ b/arch/arm/src/sama5/sam_emaca.c @@ -1217,6 +1217,12 @@ static void sam_receive(struct sam_emac_s *priv) { arp_out(&priv->dev); } +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(&priv->dev); + } +#endif /* And send the packet */ @@ -1240,19 +1246,25 @@ static void sam_receive(struct sam_emac_s *priv) if (priv->dev.d_len > 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(priv->dev.d_flags)) { arp_out(&priv->dev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(&priv->dev); + } #endif - /* And send the packet */ + /* And send the packet */ - sam_transmit(priv); - } + sam_transmit(priv); + } } else #endif diff --git a/arch/arm/src/sama5/sam_emacb.c b/arch/arm/src/sama5/sam_emacb.c index 7f0c3b4d60e..35ba12c9021 100644 --- a/arch/arm/src/sama5/sam_emacb.c +++ b/arch/arm/src/sama5/sam_emacb.c @@ -1543,6 +1543,12 @@ static void sam_receive(struct sam_emac_s *priv) { arp_out(&priv->dev); } +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(&priv->dev); + } +#endif /* And send the packet */ @@ -1566,13 +1572,19 @@ static void sam_receive(struct sam_emac_s *priv) if (priv->dev.d_len > 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(priv->dev.d_flags)) { arp_out(&priv->dev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(&priv->dev); + } #endif /* And send the packet */ diff --git a/arch/arm/src/sama5/sam_gmac.c b/arch/arm/src/sama5/sam_gmac.c index 689c614c4af..4a86bf4c1ec 100644 --- a/arch/arm/src/sama5/sam_gmac.c +++ b/arch/arm/src/sama5/sam_gmac.c @@ -1147,6 +1147,12 @@ static void sam_receive(struct sam_gmac_s *priv) { arp_out(&priv->dev); } +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(&priv->dev); + } +#endif /* And send the packet */ @@ -1170,13 +1176,19 @@ static void sam_receive(struct sam_gmac_s *priv) if (priv->dev.d_len > 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(priv->dev.d_flags)) { arp_out(&priv->dev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(&priv->dev); + } #endif /* And send the packet */ diff --git a/arch/arm/src/stm32/stm32_eth.c b/arch/arm/src/stm32/stm32_eth.c index 22b22e43cbe..16d00614af1 100644 --- a/arch/arm/src/stm32/stm32_eth.c +++ b/arch/arm/src/stm32/stm32_eth.c @@ -1649,6 +1649,12 @@ static void stm32_receive(FAR struct stm32_ethmac_s *priv) { arp_out(&priv->dev); } +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(&priv->dev); + } +#endif /* And send the packet */ @@ -1672,13 +1678,19 @@ static void stm32_receive(FAR struct stm32_ethmac_s *priv) if (priv->dev.d_len > 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(priv->dev.d_flags)) { arp_out(&priv->dev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(&priv->dev); + } #endif /* And send the packet */ diff --git a/arch/arm/src/tiva/lm3s_ethernet.c b/arch/arm/src/tiva/lm3s_ethernet.c index bcfd7dd9c11..89fad3101c9 100644 --- a/arch/arm/src/tiva/lm3s_ethernet.c +++ b/arch/arm/src/tiva/lm3s_ethernet.c @@ -805,6 +805,12 @@ static void tiva_receive(struct tiva_driver_s *priv) { arp_out(&priv->ld_dev); } +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(&priv->ld_dev); + } +#endif /* And send the packet */ @@ -830,13 +836,19 @@ static void tiva_receive(struct tiva_driver_s *priv) if (priv->dev.d_len > 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(priv->ld_dev.d_flags)) { arp_out(&priv->ld_dev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(&priv->ld_dev); + } #endif /* And send the packet */ diff --git a/arch/arm/src/tiva/tm4c_ethernet.c b/arch/arm/src/tiva/tm4c_ethernet.c index 8e920d5dd6a..5910b095398 100644 --- a/arch/arm/src/tiva/tm4c_ethernet.c +++ b/arch/arm/src/tiva/tm4c_ethernet.c @@ -1719,7 +1719,12 @@ static void tiva_receive(FAR struct tiva_ethmac_s *priv) { arp_out(&priv->dev); } - +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(&priv->dev); + } +#endif /* And send the packet */ tiva_transmit(priv); @@ -1742,13 +1747,19 @@ static void tiva_receive(FAR struct tiva_ethmac_s *priv) if (priv->dev.d_len > 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(priv->dev.d_flags)) { arp_out(&priv->dev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(&priv->dev); + } #endif /* And send the packet */ diff --git a/arch/hc/src/m9s12/m9s12_ethernet.c b/arch/hc/src/m9s12/m9s12_ethernet.c index bbba9d70993..782e8f1517e 100644 --- a/arch/hc/src/m9s12/m9s12_ethernet.c +++ b/arch/hc/src/m9s12/m9s12_ethernet.c @@ -294,6 +294,12 @@ static void emac_receive(FAR struct emac_driver_s *priv) { arp_out(&priv->d_dev); } +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(&priv->d_dev); + } +#endif /* And send the packet */ @@ -317,13 +323,19 @@ static void emac_receive(FAR struct emac_driver_s *priv) if (priv->d_dev.d_len > 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(priv->d_dev.d_flags)) { arp_out(&priv->d_dev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(&priv->d_dev); + } #endif /* And send the packet */ diff --git a/arch/mips/src/pic32mx/pic32mx-ethernet.c b/arch/mips/src/pic32mx/pic32mx-ethernet.c index 0d301db1d8d..d78a7c225c6 100644 --- a/arch/mips/src/pic32mx/pic32mx-ethernet.c +++ b/arch/mips/src/pic32mx/pic32mx-ethernet.c @@ -1471,6 +1471,12 @@ static void pic32mx_rxdone(struct pic32mx_driver_s *priv) { arp_out(&priv->pd_dev); } +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(&priv->pd_dev); + } +#endif /* And send the packet */ @@ -1496,13 +1502,19 @@ static void pic32mx_rxdone(struct pic32mx_driver_s *priv) if (priv->pd_dev.d_len > 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(priv->pd_dev.d_flags)) { arp_out(&priv->pd_dev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(&priv->pd_dev); + } #endif /* And send the packet */ diff --git a/arch/sim/src/up_netdriver.c b/arch/sim/src/up_netdriver.c index abffefc4326..036d51e2b02 100644 --- a/arch/sim/src/up_netdriver.c +++ b/arch/sim/src/up_netdriver.c @@ -198,6 +198,12 @@ void netdriver_loop(void) { arp_out(&g_sim_dev); } +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(&g_sim_dev); + } +#endif /* And send the packet */ @@ -222,13 +228,19 @@ void netdriver_loop(void) if (g_sim_dev.d_len > 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(g_sim_dev.d_flags)) { arp_out(&g_sim_dev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(&g_sim_dev); + } #endif /* And send the packet */ diff --git a/arch/z80/src/ez80/ez80_emac.c b/arch/z80/src/ez80/ez80_emac.c index 488dd18235e..7ea5b47ac97 100644 --- a/arch/z80/src/ez80/ez80_emac.c +++ b/arch/z80/src/ez80/ez80_emac.c @@ -1307,6 +1307,12 @@ static int ez80emac_receive(struct ez80emac_driver_s *priv) { arp_out(&priv->dev); } +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(&priv->dev); + } +#endif /* And send the packet */ @@ -1331,13 +1337,19 @@ static int ez80emac_receive(struct ez80emac_driver_s *priv) if (priv->dev.d_len > 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(priv->dev.d_flags)) { arp_out(&priv->dev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(&priv->dev); + } #endif /* And send the packet */ diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c index 4002a078b7a..47d92f78277 100644 --- a/drivers/net/cs89x0.c +++ b/drivers/net/cs89x0.c @@ -472,6 +472,12 @@ static void cs89x0_receive(struct cs89x0_driver_s *cs89x0, uint16_t isq) { arp_out(&cs89x0->cs_dev); } +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(&s89x0->cs_dev); + } +#endif /* And send the packet */ @@ -495,13 +501,19 @@ static void cs89x0_receive(struct cs89x0_driver_s *cs89x0, uint16_t isq) if (cs89x0->cs_dev.d_len > 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(cs89x0->cs_dev.d_flags)) { arp_out(&cs89x0->cs_dev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(&cs89x0->cs_dev); + } #endif /* And send the packet */ diff --git a/drivers/net/dm90x0.c b/drivers/net/dm90x0.c index 729cc3baaf7..c7f7d8b69cc 100644 --- a/drivers/net/dm90x0.c +++ b/drivers/net/dm90x0.c @@ -1016,6 +1016,12 @@ static void dm9x_receive(struct dm9x_driver_s *dm9x) { arp_out(&dm9x->dm_dev); } +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(&dm9x->dm_dev); + } +#endif /* And send the packet */ @@ -1039,13 +1045,19 @@ static void dm9x_receive(struct dm9x_driver_s *dm9x) if (dm9x->dm_dev.d_len > 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(dm9x->dm_dev.d_flags)) { arp_out(&dm9x->dm_dev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(&dm9x->dm_dev); + } #endif /* And send the packet */ diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index 543fa93b0a3..9fc546ec993 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -603,6 +603,12 @@ static void e1000_receive(struct e1000_dev *e1000) { arp_out(&e1000->netdev); } +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(&e1000->netdev); + } +#endif /* And send the packet */ @@ -626,13 +632,19 @@ static void e1000_receive(struct e1000_dev *e1000) if (e1000->netdev.d_len > 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(e1000->netdev.d_flags)) { arp_out(&e1000->netdev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(&e1000->netdev); + } #endif /* And send the packet */ diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c index 6516250c69a..18ec1e44933 100644 --- a/drivers/net/enc28j60.c +++ b/drivers/net/enc28j60.c @@ -1412,6 +1412,12 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv) { arp_out(&priv->dev); } +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(&priv->dev); + } +#endif /* And send the packet */ @@ -1435,13 +1441,19 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv) if (priv->dev.d_len > 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(priv->dev.d_flags)) { arp_out(&priv->dev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(&priv->dev); + } #endif /* And send the packet */ diff --git a/drivers/net/encx24j600.c b/drivers/net/encx24j600.c index e3dd1e8e725..5ed7c2dea82 100644 --- a/drivers/net/encx24j600.c +++ b/drivers/net/encx24j600.c @@ -1540,6 +1540,12 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv) { arp_out(&priv->dev); } +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(&priv->dev); + } +#endif /* And send the packet */ @@ -1572,13 +1578,19 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv) if (priv->dev.d_len > 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(priv->dev.d_flags)) { arp_out(&priv->dev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(&priv->dev); + } #endif /* And send the packet */ diff --git a/drivers/net/skeleton.c b/drivers/net/skeleton.c index 38dc32181ce..a9423473002 100644 --- a/drivers/net/skeleton.c +++ b/drivers/net/skeleton.c @@ -326,6 +326,12 @@ static void skel_receive(FAR struct skel_driver_s *skel) { arp_out(&skel->sk_dev); } +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(&kel->sk_dev); + } +#endif /* And send the packet */ @@ -349,13 +355,19 @@ static void skel_receive(FAR struct skel_driver_s *skel) if (skel->sk_dev.d_len > 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(skel->sk_dev.d_flags)) { arp_out(&skel->sk_dev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(&skel->sk_dev); + } #endif /* And send the packet */ diff --git a/drivers/net/vnet.c b/drivers/net/vnet.c index db1665897e5..3def6e8d1f4 100644 --- a/drivers/net/vnet.c +++ b/drivers/net/vnet.c @@ -339,6 +339,12 @@ void rtos_vnet_recv(struct rgmp_vnet *rgmp_vnet, char *data, int len) { arp_out(&vnet->sk_dev); } +#ifdef CONFIG_NET_IPv6 + else + { + neighbor_out(&vnet->sk_dev); + } +#endif /* And send the packet */ @@ -362,13 +368,19 @@ void rtos_vnet_recv(struct rgmp_vnet *rgmp_vnet, char *data, int len) if (vnet->sk_dev.d_len > 0) { -#ifdef CONFIG_NET_IPv4 /* Update the Ethernet header with the correct MAC address */ +#ifdef CONFIG_NET_IPv4 if (IFF_IS_IPv4(vnet->sk_dev.d_flags)) { arp_out(&vnet->sk_dev); } + else +#endif +#ifdef CONFIG_NET_IPv6 + { + neighbor_out(&vnet->sk_dev); + } #endif /* And send the packet */