From 567ec874d15b478c8eda7e9a5d2dcb05f13f1fb5 Mon Sep 17 00:00:00 2001 From: Jiri Pirko Date: Tue, 23 Feb 2010 23:17:07 +0000 Subject: net: convert multiple drivers to use netdev_for_each_mc_addr, part6 Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller --- drivers/net/via-rhine.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/net/via-rhine.c') diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c index 85df7ac636b5..50f881aa3939 100644 --- a/drivers/net/via-rhine.c +++ b/drivers/net/via-rhine.c @@ -1705,11 +1705,9 @@ static void rhine_set_rx_mode(struct net_device *dev) rx_mode = 0x0C; } 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 bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26; mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31); -- cgit v1.2.3