aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bcm63xx_enet.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-19 19:13:58 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-22 18:45:51 -0500
commit0ddf477b8a9b02412a6cabd51c486998811c7dd1 (patch)
treedf82cf6637248439897153aca2f8fa6216003b61 /drivers/net/bcm63xx_enet.c
parent3b9a7728d878a3e7adc79fb89c3bb9ebc23760d7 (diff)
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.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/bcm63xx_enet.c b/drivers/net/bcm63xx_enet.c
index 0927ffa0d75..8cdcab7655c 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)
631 return; 631 return;
632 } 632 }
633 633
634 for (i = 0, mc_list = dev->mc_list; 634 i = 0;
635 (mc_list != NULL) && (i < netdev_mc_count(dev)) && (i < 3); 635 netdev_for_each_mc_addr(mc_list, dev) {
636 i++, mc_list = mc_list->next) {
637 u8 *dmi_addr; 636 u8 *dmi_addr;
638 u32 tmp; 637 u32 tmp;
639 638
640 /* filter non ethernet address */ 639 if (i == 3)
641 if (mc_list->dmi_addrlen != 6) 640 break;
642 continue;
643
644 /* update perfect match registers */ 641 /* update perfect match registers */
645 dmi_addr = mc_list->dmi_addr; 642 dmi_addr = mc_list->dmi_addr;
646 tmp = (dmi_addr[2] << 24) | (dmi_addr[3] << 16) | 643 tmp = (dmi_addr[2] << 24) | (dmi_addr[3] << 16) |
@@ -649,7 +646,7 @@ static void bcm_enet_set_multicast_list(struct net_device *dev)
649 646
650 tmp = (dmi_addr[0] << 8 | dmi_addr[1]); 647 tmp = (dmi_addr[0] << 8 | dmi_addr[1]);
651 tmp |= ENET_PMH_DATAVALID_MASK; 648 tmp |= ENET_PMH_DATAVALID_MASK;
652 enet_writel(priv, tmp, ENET_PMH_REG(i + 1)); 649 enet_writel(priv, tmp, ENET_PMH_REG(i++ + 1));
653 } 650 }
654 651
655 for (; i < 3; i++) { 652 for (; i < 3; i++) {