diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-23 18:17:07 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-26 05:07:31 -0500 |
commit | 567ec874d15b478c8eda7e9a5d2dcb05f13f1fb5 (patch) | |
tree | e0c22740e44eca6f035e7dccbcff114a72d007a3 /drivers/net/tsi108_eth.c | |
parent | f9dcbcc9e338d08c0f7de7eba4eaafbbb7f81249 (diff) |
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) | |||
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, |