include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / net / ibm_newemac / core.c
index fb5e019169eef75baa4a0679deab781b34fc4dee..dd873cc41c2b718262c053642593c5461134f458 100644 (file)
@@ -39,6 +39,7 @@
 #include <linux/bitops.h>
 #include <linux/workqueue.h>
 #include <linux/of.h>
+#include <linux/slab.h>
 
 #include <asm/processor.h>
 #include <asm/io.h>
@@ -391,11 +392,11 @@ static void emac_hash_mc(struct emac_instance *dev)
        struct dev_mc_list *dmi;
        int i;
 
-       DBG(dev, "hash_mc %d" NL, dev->ndev->mc_count);
+       DBG(dev, "hash_mc %d" NL, netdev_mc_count(dev->ndev));
 
        memset(gaht_temp, 0, sizeof (gaht_temp));
 
-       for (dmi = dev->ndev->mc_list; dmi; dmi = dmi->next) {
+       netdev_for_each_mc_addr(dmi, dev->ndev) {
                int slot, reg, mask;
                DBG2(dev, "mc %pM" NL, dmi->dmi_addr);
 
@@ -425,9 +426,9 @@ static inline u32 emac_iff2rmr(struct net_device *ndev)
        if (ndev->flags & IFF_PROMISC)
                r |= EMAC_RMR_PME;
        else if (ndev->flags & IFF_ALLMULTI ||
-                        (ndev->mc_count > EMAC_XAHT_SLOTS(dev)))
+                        (netdev_mc_count(ndev) > EMAC_XAHT_SLOTS(dev)))
                r |= EMAC_RMR_PMME;
-       else if (ndev->mc_count > 0)
+       else if (!netdev_mc_empty(ndev))
                r |= EMAC_RMR_MAE;
 
        return r;