]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/net/ehea/ehea_main.c
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[net-next-2.6.git] / drivers / net / ehea / ehea_main.c
index 7b62336e6736177ede8ae77789a5c82ed406222f..809ccc9ff09cc8913a8e19ab1982cf76e7d69000 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/udp.h>
 #include <linux/if.h>
 #include <linux/list.h>
+#include <linux/slab.h>
 #include <linux/if_ether.h>
 #include <linux/notifier.h>
 #include <linux/reboot.h>
@@ -1967,7 +1968,7 @@ static void ehea_set_multicast_list(struct net_device *dev)
 {
        struct ehea_port *port = netdev_priv(dev);
        struct dev_mc_list *k_mcl_entry;
-       int ret, i;
+       int ret;
 
        if (dev->flags & IFF_PROMISC) {
                ehea_promiscuous(dev, 1);
@@ -1981,7 +1982,7 @@ static void ehea_set_multicast_list(struct net_device *dev)
        }
        ehea_allmulti(dev, 0);
 
-       if (dev->mc_count) {
+       if (!netdev_mc_empty(dev)) {
                ret = ehea_drop_multicast_list(dev);
                if (ret) {
                        /* Dropping the current multicast list failed.
@@ -1990,15 +1991,14 @@ static void ehea_set_multicast_list(struct net_device *dev)
                        ehea_allmulti(dev, 1);
                }
 
-               if (dev->mc_count > port->adapter->max_mc_mac) {
+               if (netdev_mc_count(dev) > port->adapter->max_mc_mac) {
                        ehea_info("Mcast registration limit reached (0x%llx). "
                                  "Use ALLMULTI!",
                                  port->adapter->max_mc_mac);
                        goto out;
                }
 
-               for (i = 0, k_mcl_entry = dev->mc_list; i < dev->mc_count; i++,
-                            k_mcl_entry = k_mcl_entry->next)
+               netdev_for_each_mc_addr(k_mcl_entry, dev)
                        ehea_add_multicast_entry(port, k_mcl_entry->dmi_addr);
 
        }