net: convert multiple drivers to use netdev_for_each_mc_addr, part2
[linux-2.6.git] / drivers / net / smsc9420.c
index 2bd3c98..30110a1 100644 (file)
@@ -1063,11 +1063,11 @@ static void smsc9420_set_multicast_list(struct net_device *dev)
                mac_cr |= MAC_CR_MCPAS_;
                mac_cr &= (~MAC_CR_HPFILT_);
        } else if (!netdev_mc_empty(dev)) {
-               struct dev_mc_list *mc_list = dev->mc_list;
+               struct dev_mc_list *mc_list;
                u32 hash_lo = 0, hash_hi = 0;
 
                smsc_dbg(HW, "Multicast filter enabled");
-               while (mc_list) {
+               netdev_for_each_mc_addr(mc_list, dev) {
                        u32 bit_num = smsc9420_hash(mc_list->dmi_addr);
                        u32 mask = 1 << (bit_num & 0x1F);
 
@@ -1076,7 +1076,6 @@ static void smsc9420_set_multicast_list(struct net_device *dev)
                        else
                                hash_lo |= mask;
 
-                       mc_list = mc_list->next;
                }
                smsc9420_reg_write(pd, HASHH, hash_hi);
                smsc9420_reg_write(pd, HASHL, hash_lo);