diff options
Diffstat (limited to 'drivers/net/cpmac.c')
-rw-r--r-- | drivers/net/cpmac.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c index c9c537be4ab9..0074f3bf17be 100644 --- a/drivers/net/cpmac.c +++ b/drivers/net/cpmac.c | |||
@@ -320,7 +320,6 @@ static int cpmac_config(struct net_device *dev, struct ifmap *map) | |||
320 | static void cpmac_set_multicast_list(struct net_device *dev) | 320 | static void cpmac_set_multicast_list(struct net_device *dev) |
321 | { | 321 | { |
322 | struct dev_mc_list *iter; | 322 | struct dev_mc_list *iter; |
323 | int i; | ||
324 | u8 tmp; | 323 | u8 tmp; |
325 | u32 mbp, bit, hash[2] = { 0, }; | 324 | u32 mbp, bit, hash[2] = { 0, }; |
326 | struct cpmac_priv *priv = netdev_priv(dev); | 325 | struct cpmac_priv *priv = netdev_priv(dev); |
@@ -340,8 +339,7 @@ static void cpmac_set_multicast_list(struct net_device *dev) | |||
340 | * cpmac uses some strange mac address hashing | 339 | * cpmac uses some strange mac address hashing |
341 | * (not crc32) | 340 | * (not crc32) |
342 | */ | 341 | */ |
343 | for (i = 0, iter = dev->mc_list; i < netdev_mc_count(dev); | 342 | netdev_for_each_mc_addr(iter, dev) { |
344 | i++, iter = iter->next) { | ||
345 | bit = 0; | 343 | bit = 0; |
346 | tmp = iter->dmi_addr[0]; | 344 | tmp = iter->dmi_addr[0]; |
347 | bit ^= (tmp >> 2) ^ (tmp << 4); | 345 | bit ^= (tmp >> 2) ^ (tmp << 4); |