diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-04 21:48:11 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-05 11:58:39 -0500 |
commit | 6d55ad4a534e7de3417819c6e894ff1c0a38f626 (patch) | |
tree | 104078a83aee2811eae8426114bbbde300080d53 | |
parent | a56ed41d94f80e4342116318754878a045835f40 (diff) |
net: 8139too: convert to use mc helpers
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/8139too.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index 321e73aabb2b..c7d6f094cc7a 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c | |||
@@ -2509,7 +2509,7 @@ static void __set_rx_mode (struct net_device *dev) | |||
2509 | struct rtl8139_private *tp = netdev_priv(dev); | 2509 | struct rtl8139_private *tp = netdev_priv(dev); |
2510 | void __iomem *ioaddr = tp->mmio_addr; | 2510 | void __iomem *ioaddr = tp->mmio_addr; |
2511 | u32 mc_filter[2]; /* Multicast hash filter */ | 2511 | u32 mc_filter[2]; /* Multicast hash filter */ |
2512 | int i, rx_mode; | 2512 | int rx_mode; |
2513 | u32 tmp; | 2513 | u32 tmp; |
2514 | 2514 | ||
2515 | pr_debug("%s: rtl8139_set_rx_mode(%4.4x) done -- Rx config %8.8lx.\n", | 2515 | pr_debug("%s: rtl8139_set_rx_mode(%4.4x) done -- Rx config %8.8lx.\n", |
@@ -2521,7 +2521,7 @@ static void __set_rx_mode (struct net_device *dev) | |||
2521 | AcceptBroadcast | AcceptMulticast | AcceptMyPhys | | 2521 | AcceptBroadcast | AcceptMulticast | AcceptMyPhys | |
2522 | AcceptAllPhys; | 2522 | AcceptAllPhys; |
2523 | mc_filter[1] = mc_filter[0] = 0xffffffff; | 2523 | mc_filter[1] = mc_filter[0] = 0xffffffff; |
2524 | } else if ((dev->mc_count > multicast_filter_limit) || | 2524 | } else if ((netdev_mc_count(dev) > multicast_filter_limit) || |
2525 | (dev->flags & IFF_ALLMULTI)) { | 2525 | (dev->flags & IFF_ALLMULTI)) { |
2526 | /* Too many to filter perfectly -- accept all multicasts. */ | 2526 | /* Too many to filter perfectly -- accept all multicasts. */ |
2527 | rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; | 2527 | rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; |
@@ -2530,8 +2530,7 @@ static void __set_rx_mode (struct net_device *dev) | |||
2530 | struct dev_mc_list *mclist; | 2530 | struct dev_mc_list *mclist; |
2531 | rx_mode = AcceptBroadcast | AcceptMyPhys; | 2531 | rx_mode = AcceptBroadcast | AcceptMyPhys; |
2532 | mc_filter[1] = mc_filter[0] = 0; | 2532 | mc_filter[1] = mc_filter[0] = 0; |
2533 | for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count; | 2533 | netdev_for_each_mc_addr(mclist, dev) { |
2534 | i++, mclist = mclist->next) { | ||
2535 | int bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26; | 2534 | int bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26; |
2536 | 2535 | ||
2537 | mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31); | 2536 | mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31); |