aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/macmace.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/macmace.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/macmace.c')
-rw-r--r--drivers/net/macmace.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/macmace.c b/drivers/net/macmace.c
index 740accbf0806..4e4eac0ba176 100644
--- a/drivers/net/macmace.c
+++ b/drivers/net/macmace.c
@@ -496,7 +496,7 @@ static void mace_set_multicast(struct net_device *dev)
496{ 496{
497 struct mace_data *mp = netdev_priv(dev); 497 struct mace_data *mp = netdev_priv(dev);
498 volatile struct mace *mb = mp->mace; 498 volatile struct mace *mb = mp->mace;
499 int i, j; 499 int i;
500 u32 crc; 500 u32 crc;
501 u8 maccc; 501 u8 maccc;
502 unsigned long flags; 502 unsigned long flags;
@@ -509,7 +509,7 @@ static void mace_set_multicast(struct net_device *dev)
509 mb->maccc |= PROM; 509 mb->maccc |= PROM;
510 } else { 510 } else {
511 unsigned char multicast_filter[8]; 511 unsigned char multicast_filter[8];
512 struct dev_mc_list *dmi = dev->mc_list; 512 struct dev_mc_list *dmi;
513 513
514 if (dev->flags & IFF_ALLMULTI) { 514 if (dev->flags & IFF_ALLMULTI) {
515 for (i = 0; i < 8; i++) { 515 for (i = 0; i < 8; i++) {
@@ -518,11 +518,11 @@ static void mace_set_multicast(struct net_device *dev)
518 } else { 518 } else {
519 for (i = 0; i < 8; i++) 519 for (i = 0; i < 8; i++)
520 multicast_filter[i] = 0; 520 multicast_filter[i] = 0;
521 for (i = 0; i < netdev_mc_count(dev); i++) { 521 netdev_for_each_mc_addr(dmi, dev) {
522 crc = ether_crc_le(6, dmi->dmi_addr); 522 crc = ether_crc_le(6, dmi->dmi_addr);
523 j = crc >> 26; /* bit number in multicast_filter */ 523 /* bit number in multicast_filter */
524 multicast_filter[j >> 3] |= 1 << (j & 7); 524 i = crc >> 26;
525 dmi = dmi->next; 525 multicast_filter[i >> 3] |= 1 << (i & 7);
526 } 526 }
527 } 527 }
528 528