From 48e2f183cb1709600012265a2e723f45a350d5fe Mon Sep 17 00:00:00 2001 From: Jiri Pirko Date: Mon, 22 Feb 2010 09:22:26 +0000 Subject: net: convert multiple drivers to use netdev_for_each_mc_addr, part4 Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller --- drivers/net/hamachi.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/net/hamachi.c') diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c index c70b147b4feb..373546dd0831 100644 --- a/drivers/net/hamachi.c +++ b/drivers/net/hamachi.c @@ -1859,12 +1859,13 @@ static void set_rx_mode(struct net_device *dev) writew(0x000B, ioaddr + AddrMode); } else if (!netdev_mc_empty(dev)) { /* Must use the CAM filter. */ struct dev_mc_list *mclist; - int i; - for (i = 0, mclist = dev->mc_list; mclist && i < netdev_mc_count(dev); - i++, mclist = mclist->next) { + int i = 0; + + netdev_for_each_mc_addr(mclist, dev) { writel(*(u32*)(mclist->dmi_addr), ioaddr + 0x100 + i*8); writel(0x20000 | (*(u16*)&mclist->dmi_addr[4]), ioaddr + 0x104 + i*8); + i++; } /* Clear remaining entries. */ for (; i < 64; i++) -- cgit v1.2.1