diff options
Diffstat (limited to 'drivers/net/pcmcia/smc91c92_cs.c')
-rw-r--r-- | drivers/net/pcmcia/smc91c92_cs.c | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index aa57cfd1e3fb..5adc662c4bfb 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
@@ -1593,27 +1593,6 @@ static void smc_rx(struct net_device *dev) | |||
1593 | 1593 | ||
1594 | /*====================================================================== | 1594 | /*====================================================================== |
1595 | 1595 | ||
1596 | Calculate values for the hardware multicast filter hash table. | ||
1597 | |||
1598 | ======================================================================*/ | ||
1599 | |||
1600 | static void fill_multicast_tbl(int count, struct dev_mc_list *addrs, | ||
1601 | u_char *multicast_table) | ||
1602 | { | ||
1603 | struct dev_mc_list *mc_addr; | ||
1604 | |||
1605 | for (mc_addr = addrs; mc_addr && count-- > 0; mc_addr = mc_addr->next) { | ||
1606 | u_int position = ether_crc(6, mc_addr->dmi_addr); | ||
1607 | #ifndef final_version /* Verify multicast address. */ | ||
1608 | if ((mc_addr->dmi_addr[0] & 1) == 0) | ||
1609 | continue; | ||
1610 | #endif | ||
1611 | multicast_table[position >> 29] |= 1 << ((position >> 26) & 7); | ||
1612 | } | ||
1613 | } | ||
1614 | |||
1615 | /*====================================================================== | ||
1616 | |||
1617 | Set the receive mode. | 1596 | Set the receive mode. |
1618 | 1597 | ||
1619 | This routine is used by both the protocol level to notify us of | 1598 | This routine is used by both the protocol level to notify us of |
@@ -1636,9 +1615,17 @@ static void set_rx_mode(struct net_device *dev) | |||
1636 | } else if (dev->flags & IFF_ALLMULTI) | 1615 | } else if (dev->flags & IFF_ALLMULTI) |
1637 | rx_cfg_setting = RxStripCRC | RxEnable | RxAllMulti; | 1616 | rx_cfg_setting = RxStripCRC | RxEnable | RxAllMulti; |
1638 | else { | 1617 | else { |
1639 | if (dev->mc_count) { | 1618 | if (!netdev_mc_empty(dev)) { |
1640 | fill_multicast_tbl(dev->mc_count, dev->mc_list, | 1619 | struct dev_mc_list *mc_addr; |
1641 | (u_char *)multicast_table); | 1620 | |
1621 | netdev_for_each_mc_addr(mc_addr, dev) { | ||
1622 | u_int position = ether_crc(6, mc_addr->dmi_addr); | ||
1623 | #ifndef final_version /* Verify multicast address. */ | ||
1624 | if ((mc_addr->dmi_addr[0] & 1) == 0) | ||
1625 | continue; | ||
1626 | #endif | ||
1627 | multicast_table[position >> 29] |= 1 << ((position >> 26) & 7); | ||
1628 | } | ||
1642 | } | 1629 | } |
1643 | rx_cfg_setting = RxStripCRC | RxEnable; | 1630 | rx_cfg_setting = RxStripCRC | RxEnable; |
1644 | } | 1631 | } |