Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
[safe/jmp/linux-2.6] / drivers / net / cpmac.c
index bf2072e..b85c81f 100644 (file)
@@ -328,7 +328,6 @@ static int cpmac_config(struct net_device *dev, struct ifmap *map)
 static void cpmac_set_multicast_list(struct net_device *dev)
 {
        struct dev_mc_list *iter;
-       int i;
        u8 tmp;
        u32 mbp, bit, hash[2] = { 0, };
        struct cpmac_priv *priv = netdev_priv(dev);
@@ -348,8 +347,7 @@ static void cpmac_set_multicast_list(struct net_device *dev)
                         * cpmac uses some strange mac address hashing
                         * (not crc32)
                         */
-                       for (i = 0, iter = dev->mc_list; i < dev->mc_count;
-                            i++, iter = iter->next) {
+                       netdev_for_each_mc_addr(iter, dev) {
                                bit = 0;
                                tmp = iter->dmi_addr[0];
                                bit  ^= (tmp >> 2) ^ (tmp << 4);