]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/irda/irlan/irlan_eth.c
net: use netdev_mc_count and netdev_mc_empty when appropriate
[net-next-2.6.git] / net / irda / irlan / irlan_eth.c
index 7b6b631f647fbd704add643b8cac365dc11bcb51..9616c32d1076dda982fff4c6da5c6e1057cf39d1 100644 (file)
@@ -30,6 +30,7 @@
 #include <linux/inetdevice.h>
 #include <linux/if_arp.h>
 #include <linux/module.h>
+#include <linux/sched.h>
 #include <net/arp.h>
 
 #include <net/irda/irda.h>
@@ -320,14 +321,15 @@ static void irlan_eth_set_multicast_list(struct net_device *dev)
                /* Enable promiscuous mode */
                IRDA_WARNING("Promiscuous mode not implemented by IrLAN!\n");
        }
-       else if ((dev->flags & IFF_ALLMULTI) || dev->mc_count > HW_MAX_ADDRS) {
+       else if ((dev->flags & IFF_ALLMULTI) ||
+                netdev_mc_count(dev) > HW_MAX_ADDRS) {
                /* Disable promiscuous mode, use normal mode. */
                IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __func__ );
                /* hardware_set_filter(NULL); */
 
                irlan_set_multicast_filter(self, TRUE);
        }
-       else if (dev->mc_count) {
+       else if (!netdev_mc_empty(dev)) {
                IRDA_DEBUG(4, "%s(), Setting multicast filter\n", __func__ );
                /* Walk the address list, and load the filter */
                /* hardware_set_filter(dev->mc_list); */