net: use netdev_mc_count and netdev_mc_empty when appropriate
[safe/jmp/linux-2.6] / drivers / staging / wavelan / wavelan_cs.c
index 10c702b..08fcb22 100644 (file)
@@ -1373,7 +1373,7 @@ wavelan_set_multicast_list(struct net_device *    dev)
 
 #ifdef DEBUG_IOCTL_INFO
   printk(KERN_DEBUG "%s: wavelan_set_multicast_list(): setting Rx mode %02X to %d addresses.\n",
-        dev->name, dev->flags, dev->mc_count);
+        dev->name, dev->flags, netdev_mc_count(dev));
 #endif
 
   if(dev->flags & IFF_PROMISC)
@@ -1394,7 +1394,7 @@ wavelan_set_multicast_list(struct net_device *    dev)
     /* If all multicast addresses
      * or too much multicast addresses for the hardware filter */
     if((dev->flags & IFF_ALLMULTI) ||
-       (dev->mc_count > I82593_MAX_MULTICAST_ADDRESSES))
+       (netdev_mc_count(dev) > I82593_MAX_MULTICAST_ADDRESSES))
       {
        /*
         * Disable promiscuous mode, but active the all multicast mode
@@ -1418,12 +1418,12 @@ wavelan_set_multicast_list(struct net_device *  dev)
           */
 #ifdef MULTICAST_AVOID
          if(lp->promiscuous || lp->allmulticast ||
-            (dev->mc_count != lp->mc_count))
+            (netdev_mc_count(dev) != lp->mc_count))
 #endif
            {
              lp->promiscuous = 0;
              lp->allmulticast = 0;
-             lp->mc_count = dev->mc_count;
+             lp->mc_count = netdev_mc_count(dev);
 
              wv_82593_reconfig(dev);
            }
@@ -3622,7 +3622,8 @@ wv_82593_config(struct net_device *       dev)
       if(!wv_82593_cmd(dev, "wv_82593_config(): mc-setup",
                       OP0_MC_SETUP, SR0_MC_SETUP_DONE))
        ret = FALSE;
-      lp->mc_count = dev->mc_count;    /* remember to avoid repeated reset */
+      /* remember to avoid repeated reset */
+      lp->mc_count = netdev_mc_count(dev);
     }
 
   /* Job done, clear the flag */