From: Jiri Pirko <jpirko@redhat.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net
Subject: [PATCH net-next-2.6 2/4] net: 8139too: convert to use mc helpers
Date: Fri, 5 Feb 2010 13:48:11 +0100 [thread overview]
Message-ID: <20100205124810.GF2650@psychotron.redhat.com> (raw)
In-Reply-To: <20100205124623.GD2650@psychotron.redhat.com>
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
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 321e73a..c7d6f09 100644
--- a/drivers/net/8139too.c
+++ b/drivers/net/8139too.c
@@ -2509,7 +2509,7 @@ static void __set_rx_mode (struct net_device *dev)
struct rtl8139_private *tp = netdev_priv(dev);
void __iomem *ioaddr = tp->mmio_addr;
u32 mc_filter[2]; /* Multicast hash filter */
- int i, rx_mode;
+ int rx_mode;
u32 tmp;
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)
AcceptBroadcast | AcceptMulticast | AcceptMyPhys |
AcceptAllPhys;
mc_filter[1] = mc_filter[0] = 0xffffffff;
- } else if ((dev->mc_count > multicast_filter_limit) ||
+ } else if ((netdev_mc_count(dev) > multicast_filter_limit) ||
(dev->flags & IFF_ALLMULTI)) {
/* Too many to filter perfectly -- accept all multicasts. */
rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys;
@@ -2530,8 +2530,7 @@ static void __set_rx_mode (struct net_device *dev)
struct dev_mc_list *mclist;
rx_mode = AcceptBroadcast | AcceptMyPhys;
mc_filter[1] = mc_filter[0] = 0;
- for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count;
- i++, mclist = mclist->next) {
+ netdev_for_each_mc_addr(mclist, dev) {
int bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26;
mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31);
--
1.6.6
next prev parent reply other threads:[~2010-02-05 12:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-05 12:46 [PATCH net-next-2.6 0/4] net: convert to use mc helpers round 1 Jiri Pirko
2010-02-05 12:47 ` [PATCH net-next-2.6 1/4] net: 8139cp: convert to use mc helpers Jiri Pirko
2010-02-05 12:48 ` Jiri Pirko [this message]
2010-02-05 12:51 ` [PATCH net-next-2.6 3/4] net: dm9601: " Jiri Pirko
2010-02-05 12:52 ` [PATCH net-next-2.6 4/4] net: e1000e: " Jiri Pirko
2010-02-05 16:58 ` [PATCH net-next-2.6 0/4] net: convert to use mc helpers round 1 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100205124810.GF2650@psychotron.redhat.com \
--to=jpirko@redhat.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).