aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mace.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-23 04:19:49 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-26 05:07:30 -0500
commitf9dcbcc9e338d08c0f7de7eba4eaafbbb7f81249 (patch)
tree8a1d9a37bc057440220a5ad23231e0fe974b93f6 /drivers/net/mace.c
parent52c793f24054f5dc30d228e37e0e19cc8313f086 (diff)
net: convert multiple drivers to use netdev_for_each_mc_addr, part5 V2
removed some needless checks and also corrected bug in lp486e (dmi was passed instead of dmi->dmi_addr) Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mace.c')
-rw-r--r--drivers/net/mace.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/mace.c b/drivers/net/mace.c
index fdb0bbdd6782..57534f0e906d 100644
--- a/drivers/net/mace.c
+++ b/drivers/net/mace.c
@@ -588,7 +588,7 @@ static void mace_set_multicast(struct net_device *dev)
588{ 588{
589 struct mace_data *mp = netdev_priv(dev); 589 struct mace_data *mp = netdev_priv(dev);
590 volatile struct mace __iomem *mb = mp->mace; 590 volatile struct mace __iomem *mb = mp->mace;
591 int i, j; 591 int i;
592 u32 crc; 592 u32 crc;
593 unsigned long flags; 593 unsigned long flags;
594 594
@@ -598,7 +598,7 @@ static void mace_set_multicast(struct net_device *dev)
598 mp->maccc |= PROM; 598 mp->maccc |= PROM;
599 } else { 599 } else {
600 unsigned char multicast_filter[8]; 600 unsigned char multicast_filter[8];
601 struct dev_mc_list *dmi = dev->mc_list; 601 struct dev_mc_list *dmi;
602 602
603 if (dev->flags & IFF_ALLMULTI) { 603 if (dev->flags & IFF_ALLMULTI) {
604 for (i = 0; i < 8; i++) 604 for (i = 0; i < 8; i++)
@@ -606,11 +606,10 @@ static void mace_set_multicast(struct net_device *dev)
606 } else { 606 } else {
607 for (i = 0; i < 8; i++) 607 for (i = 0; i < 8; i++)
608 multicast_filter[i] = 0; 608 multicast_filter[i] = 0;
609 for (i = 0; i < netdev_mc_count(dev); i++) { 609 netdev_for_each_mc_addr(dmi, dev) {
610 crc = ether_crc_le(6, dmi->dmi_addr); 610 crc = ether_crc_le(6, dmi->dmi_addr);
611 j = crc >> 26; /* bit number in multicast_filter */ 611 i = crc >> 26; /* bit number in multicast_filter */
612 multicast_filter[j >> 3] |= 1 << (j & 7); 612 multicast_filter[i >> 3] |= 1 << (i & 7);
613 dmi = dmi->next;
614 } 613 }
615 } 614 }
616#if 0 615#if 0