]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/net/smc9194.c
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[net-next-2.6.git] / drivers / net / smc9194.c
index 8371b82323ac68795b6f6199142eb3a2243589ca..3f2f7843aa4eacb86fc2923dec080695fd67647c 100644 (file)
@@ -64,7 +64,6 @@ static const char version[] =
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/in.h>
-#include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/init.h>
 #include <linux/crc32.h>
@@ -434,18 +433,18 @@ static void smc_shutdown( int ioaddr )
 */
 
 
-static void smc_setmulticast( int ioaddr, int count, struct dev_mc_list * addrs ) {
+static void smc_setmulticast(int ioaddr, struct net_device *dev)
+{
        int                     i;
        unsigned char           multicast_table[ 8 ];
-       struct dev_mc_list      * cur_addr;
+       struct dev_mc_list *cur_addr;
        /* table for flipping the order of 3 bits */
        unsigned char invert3[] = { 0, 4, 2, 6, 1, 5, 3, 7 };
 
        /* start with a table of all zeros: reject all */
        memset( multicast_table, 0, sizeof( multicast_table ) );
 
-       cur_addr = addrs;
-       for ( i = 0; i < count ; i ++, cur_addr = cur_addr->next  ) {
+       netdev_for_each_mc_addr(cur_addr, dev) {
                int position;
 
                /* do we have a pointer here? */
@@ -1542,7 +1541,7 @@ static void smc_set_multicast_list(struct net_device *dev)
        /* We just get all multicast packets even if we only want them
         . from one source.  This will be changed at some future
         . point. */
-       else if (dev->mc_count )  {
+       else if (!netdev_mc_empty(dev)) {
                /* support hardware multicasting */
 
                /* be sure I get rid of flags I might have set */
@@ -1550,7 +1549,7 @@ static void smc_set_multicast_list(struct net_device *dev)
                        ioaddr + RCR );
                /* NOTE: this has to set the bank, so make sure it is the
                   last thing called.  The bank is set to zero at the top */
-               smc_setmulticast( ioaddr, dev->mc_count, dev->mc_list );
+               smc_setmulticast(ioaddr, dev);
        }
        else  {
                outw( inw( ioaddr + RCR ) & ~(RCR_PROMISC | RCR_ALMUL),