aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tsi108_eth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/tsi108_eth.c')
-rw-r--r--drivers/net/tsi108_eth.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c
index f4b30c4826fb..647cdd1d4e20 100644
--- a/drivers/net/tsi108_eth.c
+++ b/drivers/net/tsi108_eth.c
@@ -1186,27 +1186,17 @@ static void tsi108_set_rx_mode(struct net_device *dev)
1186 1186
1187 if (dev->flags & IFF_ALLMULTI || !netdev_mc_empty(dev)) { 1187 if (dev->flags & IFF_ALLMULTI || !netdev_mc_empty(dev)) {
1188 int i; 1188 int i;
1189 struct dev_mc_list *mc = dev->mc_list; 1189 struct dev_mc_list *mc;
1190 rxcfg |= TSI108_EC_RXCFG_MFE | TSI108_EC_RXCFG_MC_HASH; 1190 rxcfg |= TSI108_EC_RXCFG_MFE | TSI108_EC_RXCFG_MC_HASH;
1191 1191
1192 memset(data->mc_hash, 0, sizeof(data->mc_hash)); 1192 memset(data->mc_hash, 0, sizeof(data->mc_hash));
1193 1193
1194 while (mc) { 1194 netdev_for_each_mc_addr(mc, dev) {
1195 u32 hash, crc; 1195 u32 hash, crc;
1196 1196
1197 if (mc->dmi_addrlen == 6) { 1197 crc = ether_crc(6, mc->dmi_addr);
1198 crc = ether_crc(6, mc->dmi_addr); 1198 hash = crc >> 23;
1199 hash = crc >> 23; 1199 __set_bit(hash, &data->mc_hash[0]);
1200
1201 __set_bit(hash, &data->mc_hash[0]);
1202 } else {
1203 printk(KERN_ERR
1204 "%s: got multicast address of length %d instead of 6.\n",
1205 dev->name,
1206 mc->dmi_addrlen);
1207 }
1208
1209 mc = mc->next;
1210 } 1200 }
1211 1201
1212 TSI_WRITE(TSI108_EC_HASHADDR, 1202 TSI_WRITE(TSI108_EC_HASHADDR,