From: Jiri Pirko <jpirko@redhat.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net
Subject: [PATCH net-next-2.6 3/4] net: dm9601: convert to use mc helpers
Date: Fri, 5 Feb 2010 13:51:24 +0100 [thread overview]
Message-ID: <20100205125124.GA7968@psychotron.redhat.com> (raw)
In-Reply-To: <20100205124623.GD2650@psychotron.redhat.com>
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
---
drivers/net/usb/dm9601.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c
index 3d406f9..c820fec 100644
--- a/drivers/net/usb/dm9601.c
+++ b/drivers/net/usb/dm9601.c
@@ -381,13 +381,13 @@ static void dm9601_set_multicast(struct net_device *net)
if (net->flags & IFF_PROMISC) {
rx_ctl |= 0x02;
- } else if (net->flags & IFF_ALLMULTI || net->mc_count > DM_MAX_MCAST) {
+ } else if (net->flags & IFF_ALLMULTI ||
+ netdev_mc_count(net) > DM_MAX_MCAST) {
rx_ctl |= 0x04;
- } else if (net->mc_count) {
- struct dev_mc_list *mc_list = net->mc_list;
- int i;
+ } else if (!netdev_mc_empty(net)) {
+ struct dev_mc_list *mc_list;
- for (i = 0; i < net->mc_count; i++, mc_list = mc_list->next) {
+ netdev_for_each_mc_addr(mc_list, net) {
u32 crc = ether_crc(ETH_ALEN, mc_list->dmi_addr) >> 26;
hashes[crc >> 3] |= 1 << (crc & 0x7);
}
--
1.6.6
next prev parent reply other threads:[~2010-02-05 12:51 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 ` [PATCH net-next-2.6 2/4] net: 8139too: " Jiri Pirko
2010-02-05 12:51 ` Jiri Pirko [this message]
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=20100205125124.GA7968@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).