diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-18 03:34:54 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-18 14:47:50 -0800 |
commit | 4302b67e041ea81c8fc233bee1296516e1294a27 (patch) | |
tree | c6160bcf70f321c7436f34033d39180c9043bfd9 /drivers/net/tulip/winbond-840.c | |
parent | 5508590c193661bc1484ad7b952af5fceacea40d (diff) | |
download | linux-stable-4302b67e041ea81c8fc233bee1296516e1294a27.tar.gz linux-stable-4302b67e041ea81c8fc233bee1296516e1294a27.tar.bz2 linux-stable-4302b67e041ea81c8fc233bee1296516e1294a27.zip |
tulip: convert to use netdev_for_each_mc_addr
also bug in de2104x.c was corrected:
for (i = 0; i < 32; i++) loop should be outside mc_list iteration.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tulip/winbond-840.c')
-rw-r--r-- | drivers/net/tulip/winbond-840.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c index 98711a9f35ac..304f43866c44 100644 --- a/drivers/net/tulip/winbond-840.c +++ b/drivers/net/tulip/winbond-840.c @@ -1368,11 +1368,9 @@ static u32 __set_rx_mode(struct net_device *dev) rx_mode = RxAcceptBroadcast | AcceptMulticast | AcceptMyPhys; } else { struct dev_mc_list *mclist; - int i; + memset(mc_filter, 0, sizeof(mc_filter)); - for (i = 0, mclist = dev->mc_list; - mclist && i < netdev_mc_count(dev); - i++, mclist = mclist->next) { + netdev_for_each_mc_addr(mclist, dev) { int filterbit = (ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26) ^ 0x3F; filterbit &= 0x3f; mc_filter[filterbit >> 5] |= 1 << (filterbit & 31); |