From f9dcbcc9e338d08c0f7de7eba4eaafbbb7f81249 Mon Sep 17 00:00:00 2001 From: Jiri Pirko Date: Tue, 23 Feb 2010 09:19:49 +0000 Subject: net: convert multiple drivers to use netdev_for_each_mc_addr, part5 V2 removed some needless checks and also corrected bug in lp486e (dmi was passed instead of dmi->dmi_addr) Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller --- drivers/net/pcnet32.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/net/pcnet32.c') diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index 63e03159daf7..084d78dd1637 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c @@ -2590,7 +2590,7 @@ static void pcnet32_load_multicast(struct net_device *dev) struct pcnet32_private *lp = netdev_priv(dev); volatile struct pcnet32_init_block *ib = lp->init_block; volatile __le16 *mcast_table = (__le16 *)ib->filter; - struct dev_mc_list *dmi = dev->mc_list; + struct dev_mc_list *dmi; unsigned long ioaddr = dev->base_addr; char *addrs; int i; @@ -2611,9 +2611,8 @@ static void pcnet32_load_multicast(struct net_device *dev) ib->filter[1] = 0; /* Add addresses */ - for (i = 0; i < netdev_mc_count(dev); i++) { + netdev_for_each_mc_addr(dmi, dev) { addrs = dmi->dmi_addr; - dmi = dmi->next; /* multicast address? */ if (!(*addrs & 1)) -- cgit v1.2.1