diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-23 23:17:07 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-26 02:07:31 -0800 |
commit | 567ec874d15b478c8eda7e9a5d2dcb05f13f1fb5 (patch) | |
tree | e0c22740e44eca6f035e7dccbcff114a72d007a3 /drivers/net/tsi108_eth.c | |
parent | f9dcbcc9e338d08c0f7de7eba4eaafbbb7f81249 (diff) | |
download | blackbird-op-linux-567ec874d15b478c8eda7e9a5d2dcb05f13f1fb5.tar.gz blackbird-op-linux-567ec874d15b478c8eda7e9a5d2dcb05f13f1fb5.zip |
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>
Diffstat (limited to 'drivers/net/tsi108_eth.c')
-rw-r--r-- | drivers/net/tsi108_eth.c | 20 |
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) 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, |