diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-20 03:13:58 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-23 02:45:51 +0300 |
commit | 0ddf477b8a9b02412a6cabd51c486998811c7dd1 (patch) | |
tree | df82cf6637248439897153aca2f8fa6216003b61 /drivers/net/bcm63xx_enet.c | |
parent | 3b9a7728d878a3e7adc79fb89c3bb9ebc23760d7 (diff) | |
download | linux-0ddf477b8a9b02412a6cabd51c486998811c7dd1.tar.xz |
net: convert multiple drivers to use netdev_for_each_mc_addr, part3
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bcm63xx_enet.c')
-rw-r--r-- | drivers/net/bcm63xx_enet.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/bcm63xx_enet.c b/drivers/net/bcm63xx_enet.c index 0927ffa0d753..8cdcab7655c0 100644 --- a/drivers/net/bcm63xx_enet.c +++ b/drivers/net/bcm63xx_enet.c @@ -631,16 +631,13 @@ static void bcm_enet_set_multicast_list(struct net_device *dev) return; } - for (i = 0, mc_list = dev->mc_list; - (mc_list != NULL) && (i < netdev_mc_count(dev)) && (i < 3); - i++, mc_list = mc_list->next) { + i = 0; + netdev_for_each_mc_addr(mc_list, dev) { u8 *dmi_addr; u32 tmp; - /* filter non ethernet address */ - if (mc_list->dmi_addrlen != 6) - continue; - + if (i == 3) + break; /* update perfect match registers */ dmi_addr = mc_list->dmi_addr; tmp = (dmi_addr[2] << 24) | (dmi_addr[3] << 16) | @@ -649,7 +646,7 @@ static void bcm_enet_set_multicast_list(struct net_device *dev) tmp = (dmi_addr[0] << 8 | dmi_addr[1]); tmp |= ENET_PMH_DATAVALID_MASK; - enet_writel(priv, tmp, ENET_PMH_REG(i + 1)); + enet_writel(priv, tmp, ENET_PMH_REG(i++ + 1)); } for (; i < 3; i++) { |