aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smsc9420.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/smsc9420.c')
-rw-r--r--drivers/net/smsc9420.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/smsc9420.c b/drivers/net/smsc9420.c
index 2bd3c986559a..30110a11d737 100644
--- a/drivers/net/smsc9420.c
+++ b/drivers/net/smsc9420.c
@@ -1063,11 +1063,11 @@ static void smsc9420_set_multicast_list(struct net_device *dev)
1063 mac_cr |= MAC_CR_MCPAS_; 1063 mac_cr |= MAC_CR_MCPAS_;
1064 mac_cr &= (~MAC_CR_HPFILT_); 1064 mac_cr &= (~MAC_CR_HPFILT_);
1065 } else if (!netdev_mc_empty(dev)) { 1065 } else if (!netdev_mc_empty(dev)) {
1066 struct dev_mc_list *mc_list = dev->mc_list; 1066 struct dev_mc_list *mc_list;
1067 u32 hash_lo = 0, hash_hi = 0; 1067 u32 hash_lo = 0, hash_hi = 0;
1068 1068
1069 smsc_dbg(HW, "Multicast filter enabled"); 1069 smsc_dbg(HW, "Multicast filter enabled");
1070 while (mc_list) { 1070 netdev_for_each_mc_addr(mc_list, dev) {
1071 u32 bit_num = smsc9420_hash(mc_list->dmi_addr); 1071 u32 bit_num = smsc9420_hash(mc_list->dmi_addr);
1072 u32 mask = 1 << (bit_num & 0x1F); 1072 u32 mask = 1 << (bit_num & 0x1F);
1073 1073
@@ -1076,7 +1076,6 @@ static void smsc9420_set_multicast_list(struct net_device *dev)
1076 else 1076 else
1077 hash_lo |= mask; 1077 hash_lo |= mask;
1078 1078
1079 mc_list = mc_list->next;
1080 } 1079 }
1081 smsc9420_reg_write(pd, HASHH, hash_hi); 1080 smsc9420_reg_write(pd, HASHH, hash_hi);
1082 smsc9420_reg_write(pd, HASHL, hash_lo); 1081 smsc9420_reg_write(pd, HASHL, hash_lo);