aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tulip/winbond-840.c
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2010-02-07 23:30:35 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-12 14:38:58 -0500
commit4cd24eaf0c6ee7f0242e34ee77ec899f255e66b5 (patch)
tree99f57f6374a58022e1e5ed1cbc12699288c7eae1 /drivers/net/tulip/winbond-840.c
parent8e5574211d96c0552f84c757718475fdb4021be7 (diff)
net: use netdev_mc_count and netdev_mc_empty when appropriate
This patch replaces dev->mc_count in all drivers (hopefully I didn't miss anything). Used spatch and did small tweaks and conding style changes when it was suitable. Jirka Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tulip/winbond-840.c')
-rw-r--r--drivers/net/tulip/winbond-840.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c
index 9fb89afccf7c..98711a9f35ac 100644
--- a/drivers/net/tulip/winbond-840.c
+++ b/drivers/net/tulip/winbond-840.c
@@ -1361,7 +1361,7 @@ static u32 __set_rx_mode(struct net_device *dev)
1361 memset(mc_filter, 0xff, sizeof(mc_filter)); 1361 memset(mc_filter, 0xff, sizeof(mc_filter));
1362 rx_mode = RxAcceptBroadcast | AcceptMulticast | RxAcceptAllPhys 1362 rx_mode = RxAcceptBroadcast | AcceptMulticast | RxAcceptAllPhys
1363 | AcceptMyPhys; 1363 | AcceptMyPhys;
1364 } else if ((dev->mc_count > multicast_filter_limit) || 1364 } else if ((netdev_mc_count(dev) > multicast_filter_limit) ||
1365 (dev->flags & IFF_ALLMULTI)) { 1365 (dev->flags & IFF_ALLMULTI)) {
1366 /* Too many to match, or accept all multicasts. */ 1366 /* Too many to match, or accept all multicasts. */
1367 memset(mc_filter, 0xff, sizeof(mc_filter)); 1367 memset(mc_filter, 0xff, sizeof(mc_filter));
@@ -1370,8 +1370,9 @@ static u32 __set_rx_mode(struct net_device *dev)
1370 struct dev_mc_list *mclist; 1370 struct dev_mc_list *mclist;
1371 int i; 1371 int i;
1372 memset(mc_filter, 0, sizeof(mc_filter)); 1372 memset(mc_filter, 0, sizeof(mc_filter));
1373 for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count; 1373 for (i = 0, mclist = dev->mc_list;
1374 i++, mclist = mclist->next) { 1374 mclist && i < netdev_mc_count(dev);
1375 i++, mclist = mclist->next) {
1375 int filterbit = (ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26) ^ 0x3F; 1376 int filterbit = (ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26) ^ 0x3F;
1376 filterbit &= 0x3f; 1377 filterbit &= 0x3f;
1377 mc_filter[filterbit >> 5] |= 1 << (filterbit & 31); 1378 mc_filter[filterbit >> 5] |= 1 << (filterbit & 31);