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/tlan.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/tlan.c')
-rw-r--r-- | drivers/net/tlan.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c index e44d5a074c69..390540c101c7 100644 --- a/drivers/net/tlan.c +++ b/drivers/net/tlan.c | |||
@@ -1314,7 +1314,7 @@ static struct net_device_stats *TLan_GetStats( struct net_device *dev ) | |||
1314 | 1314 | ||
1315 | static void TLan_SetMulticastList( struct net_device *dev ) | 1315 | static void TLan_SetMulticastList( struct net_device *dev ) |
1316 | { | 1316 | { |
1317 | struct dev_mc_list *dmi = dev->mc_list; | 1317 | struct dev_mc_list *dmi; |
1318 | u32 hash1 = 0; | 1318 | u32 hash1 = 0; |
1319 | u32 hash2 = 0; | 1319 | u32 hash2 = 0; |
1320 | int i; | 1320 | int i; |
@@ -1335,7 +1335,8 @@ static void TLan_SetMulticastList( struct net_device *dev ) | |||
1335 | TLan_DioWrite32( dev->base_addr, TLAN_HASH_1, 0xFFFFFFFF ); | 1335 | TLan_DioWrite32( dev->base_addr, TLAN_HASH_1, 0xFFFFFFFF ); |
1336 | TLan_DioWrite32( dev->base_addr, TLAN_HASH_2, 0xFFFFFFFF ); | 1336 | TLan_DioWrite32( dev->base_addr, TLAN_HASH_2, 0xFFFFFFFF ); |
1337 | } else { | 1337 | } else { |
1338 | for ( i = 0; i < netdev_mc_count(dev); i++ ) { | 1338 | i = 0; |
1339 | netdev_for_each_mc_addr(dmi, dev) { | ||
1339 | if ( i < 3 ) { | 1340 | if ( i < 3 ) { |
1340 | TLan_SetMac( dev, i + 1, | 1341 | TLan_SetMac( dev, i + 1, |
1341 | (char *) &dmi->dmi_addr ); | 1342 | (char *) &dmi->dmi_addr ); |
@@ -1346,7 +1347,7 @@ static void TLan_SetMulticastList( struct net_device *dev ) | |||
1346 | else | 1347 | else |
1347 | hash2 |= ( 1 << ( offset - 32 ) ); | 1348 | hash2 |= ( 1 << ( offset - 32 ) ); |
1348 | } | 1349 | } |
1349 | dmi = dmi->next; | 1350 | i++; |
1350 | } | 1351 | } |
1351 | for ( ; i < 3; i++ ) | 1352 | for ( ; i < 3; i++ ) |
1352 | TLan_SetMac( dev, i + 1, NULL ); | 1353 | TLan_SetMac( dev, i + 1, NULL ); |