X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=drivers%2Fnet%2Fsmc9194.c;h=f9a960e7fc1fdc351e69f34bb74c694560f77235;hb=e1572c5eeca8ef87a250322364584458b2dadb35;hp=8371b82323ac68795b6f6199142eb3a2243589ca;hpb=6eb7365db6f3a4a9d8d9922bb0b800f9cbaad641;p=cascardo%2Flinux.git diff --git a/drivers/net/smc9194.c b/drivers/net/smc9194.c index 8371b82323ac..f9a960e7fc1f 100644 --- a/drivers/net/smc9194.c +++ b/drivers/net/smc9194.c @@ -434,18 +434,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 +1542,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 +1550,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),