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