All Ethernet drivers (again): Missed one place where arp_out() is called and neighber_out() needs to be called

This commit is contained in:
Gregory Nutt 2015-01-21 11:36:33 -06:00
parent 8a48b3890f
commit 9588b0e7a7
14 changed files with 318 additions and 15 deletions

View File

@ -988,7 +988,30 @@ static int c5471_txpoll(struct net_driver_s *dev)
if (c5471->c_dev.d_len > 0)
{
arp_out(&c5471->c_dev);
/* Look up the destination MAC address and add it to the Ethernet
* header.
*/
#ifdef CONFIG_NET_IPv4
#ifdef CONFIG_NET_IPv6
if (IFF_IS_IPv4(c5471->c_dev.d_flags))
#endif
{
arp_out(&c5471->c_dev);
}
#endif /* CONFIG_NET_IPv4 */
#ifdef CONFIG_NET_IPv6
#ifdef CONFIG_NET_IPv4
else
#endif
{
neighbor_out(&c5471->c_dev);
}
#endif /* CONFIG_NET_IPv6 */
/* Send the packet */
c5471_transmit(c5471);
/* Check if the ESM has let go of the RX descriptor giving us access

View File

@ -448,7 +448,30 @@ static int kinetis_txpoll(struct net_driver_s *dev)
if (priv->dev.d_len > 0)
{
arp_out(&priv->dev);
/* Look up the destination MAC address and add it to the Ethernet
* header.
*/
#ifdef CONFIG_NET_IPv4
#ifdef CONFIG_NET_IPv6
if (IFF_IS_IPv4(priv->dev.d_flags))
#endif
{
arp_out(&priv->dev);
}
#endif /* CONFIG_NET_IPv4 */
#ifdef CONFIG_NET_IPv6
#ifdef CONFIG_NET_IPv4
else
#endif
{
neighbor_out(&priv->dev);
}
#endif /* CONFIG_NET_IPv6 */
/* Send the packet */
kinetis_transmit(priv);
/* Check if there is room in the device to hold another packet. If not,

View File

@ -697,11 +697,32 @@ static int lpc17_txpoll(struct net_driver_s *dev)
if (priv->lp_dev.d_len > 0)
{
/* Look up the destination MAC address and add it to the Ethernet
* header.
*/
#ifdef CONFIG_NET_IPv4
#ifdef CONFIG_NET_IPv6
if (IFF_IS_IPv4(priv->lp_dev.d_flags))
#endif
{
arp_out(&priv->lp_dev);
}
#endif /* CONFIG_NET_IPv4 */
#ifdef CONFIG_NET_IPv6
#ifdef CONFIG_NET_IPv4
else
#endif
{
neighbor_out(&priv->lp_dev);
}
#endif /* CONFIG_NET_IPv6 */
/* Send this packet. In this context, we know that there is space for
* at least one more packet in the descriptor list.
*/
arp_out(&priv->lp_dev);
lpc17_transmit(priv);
/* Check if there is room in the device to hold another packet. If not,

View File

@ -830,9 +830,30 @@ static int sam_txpoll(struct net_driver_s *dev)
if (priv->dev.d_len > 0)
{
/* Look up the destination MAC address and add it to the Ethernet
* header.
*/
#ifdef CONFIG_NET_IPv4
#ifdef CONFIG_NET_IPv6
if (IFF_IS_IPv4(priv->dev.d_flags))
#endif
{
arp_out(&priv->dev);
}
#endif /* CONFIG_NET_IPv4 */
#ifdef CONFIG_NET_IPv6
#ifdef CONFIG_NET_IPv4
else
#endif
{
neighbor_out(&priv->dev);
}
#endif /* CONFIG_NET_IPv6 */
/* Send the packet */
arp_out(&priv->dev);
sam_transmit(priv);
/* Check if the there are any free TX descriptors. We cannot perform

View File

@ -840,9 +840,30 @@ static int sam_txpoll(struct net_driver_s *dev)
if (priv->dev.d_len > 0)
{
/* Look up the destination MAC address and add it to the Ethernet
* header.
*/
#ifdef CONFIG_NET_IPv4
#ifdef CONFIG_NET_IPv6
if (IFF_IS_IPv4(priv->dev.d_flags))
#endif
{
arp_out(&priv->dev);
}
#endif /* CONFIG_NET_IPv4 */
#ifdef CONFIG_NET_IPv6
#ifdef CONFIG_NET_IPv4
else
#endif
{
neighbor_out(&priv->dev);
}
#endif /* CONFIG_NET_IPv6 */
/* Send the packet */
arp_out(&priv->dev);
sam_transmit(priv);
/* Check if the there are any free TX descriptors. We cannot perform

View File

@ -1167,9 +1167,30 @@ static int sam_txpoll(struct net_driver_s *dev)
if (priv->dev.d_len > 0)
{
/* Look up the destination MAC address and add it to the Ethernet
* header.
*/
#ifdef CONFIG_NET_IPv4
#ifdef CONFIG_NET_IPv6
if (IFF_IS_IPv4(priv->dev.d_flags))
#endif
{
arp_out(&priv->dev);
}
#endif /* CONFIG_NET_IPv4 */
#ifdef CONFIG_NET_IPv6
#ifdef CONFIG_NET_IPv4
else
#endif
{
neighbor_out(&priv->dev);
}
#endif /* CONFIG_NET_IPv6 */
/* Send the packet */
arp_out(&priv->dev);
sam_transmit(priv);
/* Check if the there are any free TX descriptors. We cannot perform

View File

@ -772,9 +772,30 @@ static int sam_txpoll(struct net_driver_s *dev)
if (priv->dev.d_len > 0)
{
/* Look up the destination MAC address and add it to the Ethernet
* header.
*/
#ifdef CONFIG_NET_IPv4
#ifdef CONFIG_NET_IPv6
if (IFF_IS_IPv4(priv->dev.d_flags))
#endif
{
arp_out(&priv->dev);
}
#endif /* CONFIG_NET_IPv4 */
#ifdef CONFIG_NET_IPv6
#ifdef CONFIG_NET_IPv4
else
#endif
{
neighbor_out(&priv->dev);
}
#endif /* CONFIG_NET_IPv6 */
/* Send the packet */
arp_out(&priv->dev);
sam_transmit(priv);
/* Check if the there are any free TX descriptors. We cannot perform

View File

@ -1175,9 +1175,30 @@ static int stm32_txpoll(struct net_driver_s *dev)
if (priv->dev.d_len > 0)
{
/* Look up the destination MAC address and add it to the Ethernet
* header.
*/
#ifdef CONFIG_NET_IPv4
#ifdef CONFIG_NET_IPv6
if (IFF_IS_IPv4(priv->dev.d_flags))
#endif
{
arp_out(&priv->dev);
}
#endif /* CONFIG_NET_IPv4 */
#ifdef CONFIG_NET_IPv6
#ifdef CONFIG_NET_IPv4
else
#endif
{
neighbor_out(&priv->dev);
}
#endif /* CONFIG_NET_IPv6 */
/* Send the packet */
arp_out(&priv->dev);
stm32_transmit(priv);
DEBUGASSERT(dev->d_len == 0 && dev->d_buf == NULL);

View File

@ -620,12 +620,34 @@ static int tiva_txpoll(struct net_driver_s *dev)
nllvdbg("Poll result: d_len=%d\n", priv->ld_dev.d_len);
if (priv->ld_dev.d_len > 0)
{
DEBUGASSERT((tiva_ethin(priv, TIVA_MAC_TR_OFFSET) & MAC_TR_NEWTX) == 0)
/* Look up the destination MAC address and add it to the Ethernet
* header.
*/
#ifdef CONFIG_NET_IPv4
#ifdef CONFIG_NET_IPv6
if (IFF_IS_IPv4(priv->ld_dev.d_flags))
#endif
{
arp_out(&priv->ld_dev);
}
#endif /* CONFIG_NET_IPv4 */
#ifdef CONFIG_NET_IPv6
#ifdef CONFIG_NET_IPv4
else
#endif
{
neighbor_out(&priv->ld_dev);
}
#endif /* CONFIG_NET_IPv6 */
/* Send the packet. tiva_transmit() will return zero if the
* packet was successfully handled.
*/
DEBUGASSERT((tiva_ethin(priv, TIVA_MAC_TR_OFFSET) & MAC_TR_NEWTX) == 0)
arp_out(&priv->ld_dev);
ret = tiva_transmit(priv);
}

View File

@ -1251,9 +1251,30 @@ static int tiva_txpoll(struct net_driver_s *dev)
if (priv->dev.d_len > 0)
{
/* Look up the destination MAC address and add it to the Ethernet
* header.
*/
#ifdef CONFIG_NET_IPv4
#ifdef CONFIG_NET_IPv6
if (IFF_IS_IPv4(priv->dev.d_flags))
#endif
{
arp_out(&priv->dev);
}
#endif /* CONFIG_NET_IPv4 */
#ifdef CONFIG_NET_IPv6
#ifdef CONFIG_NET_IPv4
else
#endif
{
neighbor_out(&priv->dev);
}
#endif /* CONFIG_NET_IPv6 */
/* Send the packet */
arp_out(&priv->dev);
tiva_transmit(priv);
DEBUGASSERT(dev->d_len == 0 && dev->d_buf == NULL);

View File

@ -216,7 +216,30 @@ static int emac_txpoll(struct net_driver_s *dev)
if (priv->d_dev.d_len > 0)
{
arp_out(&priv->d_dev);
/* Look up the destination MAC address and add it to the Ethernet
* header.
*/
#ifdef CONFIG_NET_IPv4
#ifdef CONFIG_NET_IPv6
if (IFF_IS_IPv4(priv->d_dev.d_flags))
#endif
{
arp_out(&priv->d_dev);
}
#endif /* CONFIG_NET_IPv4 */
#ifdef CONFIG_NET_IPv6
#ifdef CONFIG_NET_IPv4
else
#endif
{
neighbor_out(&priv->d_dev);
}
#endif /* CONFIG_NET_IPv6 */
/* Send the packet */
emac_transmit(priv);
/* Check if there is room in the device to hold another packet. If not,

View File

@ -1152,11 +1152,32 @@ static int pic32mx_txpoll(struct net_driver_s *dev)
if (priv->pd_dev.d_len > 0)
{
/* Look up the destination MAC address and add it to the Ethernet
* header.
*/
#ifdef CONFIG_NET_IPv4
#ifdef CONFIG_NET_IPv6
if (IFF_IS_IPv4(priv->pd_dev.d_flags))
#endif
{
arp_out(&priv->pd_dev);
}
#endif /* CONFIG_NET_IPv4 */
#ifdef CONFIG_NET_IPv6
#ifdef CONFIG_NET_IPv4
else
#endif
{
neighbor_out(&priv->pd_dev);
}
#endif /* CONFIG_NET_IPv6 */
/* Send this packet. In this context, we know that there is space for
* at least one more packet in the descriptor list.
*/
arp_out(&priv->pd_dev);
pic32mx_transmit(priv);
/* Check if the next TX descriptor is available. If not, return a

View File

@ -126,7 +126,30 @@ static int sim_txpoll(struct net_driver_s *dev)
if (g_sim_dev.d_len > 0)
{
arp_out(&g_sim_dev);
/* Look up the destination MAC address and add it to the Ethernet
* header.
*/
#ifdef CONFIG_NET_IPv4
#ifdef CONFIG_NET_IPv6
if (IFF_IS_IPv4(&g_sim_dev))
#endif
{
arp_out(&g_sim_dev);
}
#endif /* CONFIG_NET_IPv4 */
#ifdef CONFIG_NET_IPv6
#ifdef CONFIG_NET_IPv4
else
#endif
{
neighbor_out(&g_sim_dev);
}
#endif /* CONFIG_NET_IPv6 */
/* Send the packet */
netdev_send(g_sim_dev.d_buf, g_sim_dev.d_len);
}

View File

@ -1085,11 +1085,32 @@ static int ez80emac_txpoll(struct net_driver_s *dev)
nvdbg("Poll result: d_len=%d\n", priv->dev.d_len);
if (priv->dev.d_len > 0)
{
/* Look up the destination MAC address and add it to the Ethernet
* header.
*/
#ifdef CONFIG_NET_IPv4
#ifdef CONFIG_NET_IPv6
if (IFF_IS_IPv4(priv->dev.d_flags))
#endif
{
arp_out(&priv->dev);
}
#endif /* CONFIG_NET_IPv4 */
#ifdef CONFIG_NET_IPv6
#ifdef CONFIG_NET_IPv4
else
#endif
{
neighbor_out(&priv->dev);
}
#endif /* CONFIG_NET_IPv6 */
/* Send the packet. ez80emac_transmit() will return zero if the
* packet was successfully handled.
*/
arp_out(&priv->dev);
ret = ez80emac_transmit(priv);
}