net: convert multiple drivers to use netdev_for_each_mc_addr, part6

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jiri Pirko
2010-02-23 23:17:07 +00:00
committed by David S. Miller
parent f9dcbcc9e3
commit 567ec874d1
18 changed files with 42 additions and 77 deletions

View File

@ -1186,27 +1186,17 @@ static void tsi108_set_rx_mode(struct net_device *dev)
if (dev->flags & IFF_ALLMULTI || !netdev_mc_empty(dev)) {
int i;
struct dev_mc_list *mc = dev->mc_list;
struct dev_mc_list *mc;
rxcfg |= TSI108_EC_RXCFG_MFE | TSI108_EC_RXCFG_MC_HASH;
memset(data->mc_hash, 0, sizeof(data->mc_hash));
while (mc) {
netdev_for_each_mc_addr(mc, dev) {
u32 hash, crc;
if (mc->dmi_addrlen == 6) {
crc = ether_crc(6, mc->dmi_addr);
hash = crc >> 23;
__set_bit(hash, &data->mc_hash[0]);
} else {
printk(KERN_ERR
"%s: got multicast address of length %d instead of 6.\n",
dev->name,
mc->dmi_addrlen);
}
mc = mc->next;
crc = ether_crc(6, mc->dmi_addr);
hash = crc >> 23;
__set_bit(hash, &data->mc_hash[0]);
}
TSI_WRITE(TSI108_EC_HASHADDR,