aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/epic100.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/epic100.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/epic100.c')
-rw-r--r--drivers/net/epic100.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c
index 1f8b11449fad..31a3adb65566 100644
--- a/drivers/net/epic100.c
+++ b/drivers/net/epic100.c
@@ -1390,20 +1390,20 @@ static void set_rx_mode(struct net_device *dev)
1390 outl(0x002C, ioaddr + RxCtrl); 1390 outl(0x002C, ioaddr + RxCtrl);
1391 /* Unconditionally log net taps. */ 1391 /* Unconditionally log net taps. */
1392 memset(mc_filter, 0xff, sizeof(mc_filter)); 1392 memset(mc_filter, 0xff, sizeof(mc_filter));
1393 } else if ((dev->mc_count > 0) || (dev->flags & IFF_ALLMULTI)) { 1393 } else if ((!netdev_mc_empty(dev)) || (dev->flags & IFF_ALLMULTI)) {
1394 /* There is apparently a chip bug, so the multicast filter 1394 /* There is apparently a chip bug, so the multicast filter
1395 is never enabled. */ 1395 is never enabled. */
1396 /* Too many to filter perfectly -- accept all multicasts. */ 1396 /* Too many to filter perfectly -- accept all multicasts. */
1397 memset(mc_filter, 0xff, sizeof(mc_filter)); 1397 memset(mc_filter, 0xff, sizeof(mc_filter));
1398 outl(0x000C, ioaddr + RxCtrl); 1398 outl(0x000C, ioaddr + RxCtrl);
1399 } else if (dev->mc_count == 0) { 1399 } else if (netdev_mc_empty(dev)) {
1400 outl(0x0004, ioaddr + RxCtrl); 1400 outl(0x0004, ioaddr + RxCtrl);
1401 return; 1401 return;
1402 } else { /* Never executed, for now. */ 1402 } else { /* Never executed, for now. */
1403 struct dev_mc_list *mclist; 1403 struct dev_mc_list *mclist;
1404 1404
1405 memset(mc_filter, 0, sizeof(mc_filter)); 1405 memset(mc_filter, 0, sizeof(mc_filter));
1406 for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count; 1406 for (i = 0, mclist = dev->mc_list; mclist && i < netdev_mc_count(dev);
1407 i++, mclist = mclist->next) { 1407 i++, mclist = mclist->next) {
1408 unsigned int bit_nr = 1408 unsigned int bit_nr =
1409 ether_crc_le(ETH_ALEN, mclist->dmi_addr) & 0x3f; 1409 ether_crc_le(ETH_ALEN, mclist->dmi_addr) & 0x3f;