diff options
Diffstat (limited to 'drivers/net/macmace.c')
-rw-r--r-- | drivers/net/macmace.c | 12 |
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) { struct mace_data *mp = netdev_priv(dev); volatile struct mace *mb = mp->mace; - int i, j; + int i; u32 crc; u8 maccc; unsigned long flags; @@ -509,7 +509,7 @@ static void mace_set_multicast(struct net_device *dev) mb->maccc |= PROM; } else { unsigned char multicast_filter[8]; - struct dev_mc_list *dmi = dev->mc_list; + struct dev_mc_list *dmi; if (dev->flags & IFF_ALLMULTI) { for (i = 0; i < 8; i++) { @@ -518,11 +518,11 @@ static void mace_set_multicast(struct net_device *dev) } else { for (i = 0; i < 8; i++) multicast_filter[i] = 0; - for (i = 0; i < netdev_mc_count(dev); i++) { + netdev_for_each_mc_addr(dmi, dev) { crc = ether_crc_le(6, dmi->dmi_addr); - j = crc >> 26; /* bit number in multicast_filter */ - multicast_filter[j >> 3] |= 1 << (j & 7); - dmi = dmi->next; + /* bit number in multicast_filter */ + i = crc >> 26; + multicast_filter[i >> 3] |= 1 << (i & 7); } } |