aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-17 19:42:54 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-18 17:47:49 -0500
commit5508590c193661bc1484ad7b952af5fceacea40d (patch)
tree8b7d1655f63034725127b9456afa5bad4bb6e83a /drivers/net/sfc
parent2a0d18f97cc15d57ad0c93259a3df4cb72c5a28b (diff)
net: convert multiple drivers to use netdev_for_each_mc_addr, part2
Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc')
-rw-r--r--drivers/net/sfc/efx.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c
index dc58d9fd0f3..88f2fb193ab 100644
--- a/drivers/net/sfc/efx.c
+++ b/drivers/net/sfc/efx.c
@@ -1602,11 +1602,10 @@ static int efx_set_mac_address(struct net_device *net_dev, void *data)
1602static void efx_set_multicast_list(struct net_device *net_dev) 1602static void efx_set_multicast_list(struct net_device *net_dev)
1603{ 1603{
1604 struct efx_nic *efx = netdev_priv(net_dev); 1604 struct efx_nic *efx = netdev_priv(net_dev);
1605 struct dev_mc_list *mc_list = net_dev->mc_list; 1605 struct dev_mc_list *mc_list;
1606 union efx_multicast_hash *mc_hash = &efx->multicast_hash; 1606 union efx_multicast_hash *mc_hash = &efx->multicast_hash;
1607 u32 crc; 1607 u32 crc;
1608 int bit; 1608 int bit;
1609 int i;
1610 1609
1611 efx->promiscuous = !!(net_dev->flags & IFF_PROMISC); 1610 efx->promiscuous = !!(net_dev->flags & IFF_PROMISC);
1612 1611
@@ -1615,11 +1614,10 @@ static void efx_set_multicast_list(struct net_device *net_dev)
1615 memset(mc_hash, 0xff, sizeof(*mc_hash)); 1614 memset(mc_hash, 0xff, sizeof(*mc_hash));
1616 } else { 1615 } else {
1617 memset(mc_hash, 0x00, sizeof(*mc_hash)); 1616 memset(mc_hash, 0x00, sizeof(*mc_hash));
1618 for (i = 0; i < netdev_mc_count(net_dev); i++) { 1617 netdev_for_each_mc_addr(mc_list, net_dev) {
1619 crc = ether_crc_le(ETH_ALEN, mc_list->dmi_addr); 1618 crc = ether_crc_le(ETH_ALEN, mc_list->dmi_addr);
1620 bit = crc & (EFX_MCAST_HASH_ENTRIES - 1); 1619 bit = crc & (EFX_MCAST_HASH_ENTRIES - 1);
1621 set_bit_le(bit, mc_hash->byte); 1620 set_bit_le(bit, mc_hash->byte);
1622 mc_list = mc_list->next;
1623 } 1621 }
1624 1622
1625 /* Broadcast packets go through the multicast hash filter. 1623 /* Broadcast packets go through the multicast hash filter.