diff options
Diffstat (limited to 'drivers/net/smc9194.c')
-rw-r--r-- | drivers/net/smc9194.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/smc9194.c b/drivers/net/smc9194.c index ee1487791d5..9e5e9e792e8 100644 --- a/drivers/net/smc9194.c +++ b/drivers/net/smc9194.c | |||
@@ -417,7 +417,7 @@ static void smc_shutdown( int ioaddr ) | |||
417 | 417 | ||
418 | 418 | ||
419 | /* | 419 | /* |
420 | . Function: smc_setmulticast( int ioaddr, int count, dev_mc_list * adds ) | 420 | . Function: smc_setmulticast( int ioaddr, struct net_device *dev ) |
421 | . Purpose: | 421 | . Purpose: |
422 | . This sets the internal hardware table to filter out unwanted multicast | 422 | . This sets the internal hardware table to filter out unwanted multicast |
423 | . packets before they take up memory. | 423 | . packets before they take up memory. |
@@ -438,26 +438,23 @@ static void smc_setmulticast(int ioaddr, struct net_device *dev) | |||
438 | { | 438 | { |
439 | int i; | 439 | int i; |
440 | unsigned char multicast_table[ 8 ]; | 440 | unsigned char multicast_table[ 8 ]; |
441 | struct dev_mc_list *cur_addr; | 441 | struct netdev_hw_addr *ha; |
442 | /* table for flipping the order of 3 bits */ | 442 | /* table for flipping the order of 3 bits */ |
443 | unsigned char invert3[] = { 0, 4, 2, 6, 1, 5, 3, 7 }; | 443 | unsigned char invert3[] = { 0, 4, 2, 6, 1, 5, 3, 7 }; |
444 | 444 | ||
445 | /* start with a table of all zeros: reject all */ | 445 | /* start with a table of all zeros: reject all */ |
446 | memset( multicast_table, 0, sizeof( multicast_table ) ); | 446 | memset( multicast_table, 0, sizeof( multicast_table ) ); |
447 | 447 | ||
448 | netdev_for_each_mc_addr(cur_addr, dev) { | 448 | netdev_for_each_mc_addr(ha, dev) { |
449 | int position; | 449 | int position; |
450 | 450 | ||
451 | /* do we have a pointer here? */ | ||
452 | if ( !cur_addr ) | ||
453 | break; | ||
454 | /* make sure this is a multicast address - shouldn't this | 451 | /* make sure this is a multicast address - shouldn't this |
455 | be a given if we have it here ? */ | 452 | be a given if we have it here ? */ |
456 | if ( !( *cur_addr->dmi_addr & 1 ) ) | 453 | if (!(*ha->addr & 1)) |
457 | continue; | 454 | continue; |
458 | 455 | ||
459 | /* only use the low order bits */ | 456 | /* only use the low order bits */ |
460 | position = ether_crc_le(6, cur_addr->dmi_addr) & 0x3f; | 457 | position = ether_crc_le(6, ha->addr) & 0x3f; |
461 | 458 | ||
462 | /* do some messy swapping to put the bit in the right spot */ | 459 | /* do some messy swapping to put the bit in the right spot */ |
463 | multicast_table[invert3[position&7]] |= | 460 | multicast_table[invert3[position&7]] |= |