From 4302b67e041ea81c8fc233bee1296516e1294a27 Mon Sep 17 00:00:00 2001 From: Jiri Pirko Date: Thu, 18 Feb 2010 03:34:54 +0000 Subject: 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 Signed-off-by: David S. Miller --- drivers/net/tulip/uli526x.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/net/tulip/uli526x.c') diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c index 216ceb3..0ab05af 100644 --- a/drivers/net/tulip/uli526x.c +++ b/drivers/net/tulip/uli526x.c @@ -1415,14 +1415,14 @@ static void send_filter_frame(struct net_device *dev, int mc_cnt) *suptr++ = 0xffff << FLT_SHIFT; /* fit the multicast address */ - for (mcptr = dev->mc_list, i = 0; i < mc_cnt; i++, mcptr = mcptr->next) { + netdev_for_each_mc_addr(mcptr, dev) { addrptr = (u16 *) mcptr->dmi_addr; *suptr++ = addrptr[0] << FLT_SHIFT; *suptr++ = addrptr[1] << FLT_SHIFT; *suptr++ = addrptr[2] << FLT_SHIFT; } - for (; i<14; i++) { + for (i = netdev_mc_count(dev); i < 14; i++) { *suptr++ = 0xffff << FLT_SHIFT; *suptr++ = 0xffff << FLT_SHIFT; *suptr++ = 0xffff << FLT_SHIFT; -- cgit v1.1