aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smc9194.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/smc9194.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/smc9194.c')
-rw-r--r--drivers/net/smc9194.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/smc9194.c b/drivers/net/smc9194.c
index 934a12012829..3f2f7843aa4e 100644
--- a/drivers/net/smc9194.c
+++ b/drivers/net/smc9194.c
@@ -64,7 +64,6 @@ static const char version[] =
64#include <linux/interrupt.h> 64#include <linux/interrupt.h>
65#include <linux/ioport.h> 65#include <linux/ioport.h>
66#include <linux/in.h> 66#include <linux/in.h>
67#include <linux/slab.h>
68#include <linux/string.h> 67#include <linux/string.h>
69#include <linux/init.h> 68#include <linux/init.h>
70#include <linux/crc32.h> 69#include <linux/crc32.h>
@@ -434,18 +433,18 @@ static void smc_shutdown( int ioaddr )
434*/ 433*/
435 434
436 435
437static void smc_setmulticast( int ioaddr, int count, struct dev_mc_list * addrs ) { 436static void smc_setmulticast(int ioaddr, struct net_device *dev)
437{
438 int i; 438 int i;
439 unsigned char multicast_table[ 8 ]; 439 unsigned char multicast_table[ 8 ];
440 struct dev_mc_list * cur_addr; 440 struct dev_mc_list *cur_addr;
441 /* table for flipping the order of 3 bits */ 441 /* table for flipping the order of 3 bits */
442 unsigned char invert3[] = { 0, 4, 2, 6, 1, 5, 3, 7 }; 442 unsigned char invert3[] = { 0, 4, 2, 6, 1, 5, 3, 7 };
443 443
444 /* start with a table of all zeros: reject all */ 444 /* start with a table of all zeros: reject all */
445 memset( multicast_table, 0, sizeof( multicast_table ) ); 445 memset( multicast_table, 0, sizeof( multicast_table ) );
446 446
447 cur_addr = addrs; 447 netdev_for_each_mc_addr(cur_addr, dev) {
448 for ( i = 0; i < count ; i ++, cur_addr = cur_addr->next ) {
449 int position; 448 int position;
450 449
451 /* do we have a pointer here? */ 450 /* do we have a pointer here? */
@@ -1050,7 +1049,7 @@ static int __init smc_probe(struct net_device *dev, int ioaddr)
1050 memset(netdev_priv(dev), 0, sizeof(struct smc_local)); 1049 memset(netdev_priv(dev), 0, sizeof(struct smc_local));
1051 1050
1052 /* Grab the IRQ */ 1051 /* Grab the IRQ */
1053 retval = request_irq(dev->irq, &smc_interrupt, 0, DRV_NAME, dev); 1052 retval = request_irq(dev->irq, smc_interrupt, 0, DRV_NAME, dev);
1054 if (retval) { 1053 if (retval) {
1055 printk("%s: unable to get IRQ %d (irqval=%d).\n", DRV_NAME, 1054 printk("%s: unable to get IRQ %d (irqval=%d).\n", DRV_NAME,
1056 dev->irq, retval); 1055 dev->irq, retval);
@@ -1542,7 +1541,7 @@ static void smc_set_multicast_list(struct net_device *dev)
1542 /* We just get all multicast packets even if we only want them 1541 /* We just get all multicast packets even if we only want them
1543 . from one source. This will be changed at some future 1542 . from one source. This will be changed at some future
1544 . point. */ 1543 . point. */
1545 else if (dev->mc_count ) { 1544 else if (!netdev_mc_empty(dev)) {
1546 /* support hardware multicasting */ 1545 /* support hardware multicasting */
1547 1546
1548 /* be sure I get rid of flags I might have set */ 1547 /* 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)
1550 ioaddr + RCR ); 1549 ioaddr + RCR );
1551 /* NOTE: this has to set the bank, so make sure it is the 1550 /* NOTE: this has to set the bank, so make sure it is the
1552 last thing called. The bank is set to zero at the top */ 1551 last thing called. The bank is set to zero at the top */
1553 smc_setmulticast( ioaddr, dev->mc_count, dev->mc_list ); 1552 smc_setmulticast(ioaddr, dev);
1554 } 1553 }
1555 else { 1554 else {
1556 outw( inw( ioaddr + RCR ) & ~(RCR_PROMISC | RCR_ALMUL), 1555 outw( inw( ioaddr + RCR ) & ~(RCR_PROMISC | RCR_ALMUL),