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/qlge/qlge_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/net/qlge') diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index c170349717c5..c26ec5d740f6 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c @@ -4270,8 +4270,8 @@ static void qlge_set_multicast_list(struct net_device *ndev) status = ql_sem_spinlock(qdev, SEM_MAC_ADDR_MASK); if (status) goto exit; - for (i = 0, mc_ptr = ndev->mc_list; mc_ptr; - i++, mc_ptr = mc_ptr->next) + i = 0; + netdev_for_each_mc_addr(mc_ptr, ndev) { if (ql_set_mac_addr_reg(qdev, (u8 *) mc_ptr->dmi_addr, MAC_ADDR_TYPE_MULTI_MAC, i)) { netif_err(qdev, hw, qdev->ndev, @@ -4279,6 +4279,8 @@ static void qlge_set_multicast_list(struct net_device *ndev) ql_sem_unlock(qdev, SEM_MAC_ADDR_MASK); goto exit; } + i++; + } ql_sem_unlock(qdev, SEM_MAC_ADDR_MASK); if (ql_set_routing_reg (qdev, RT_IDX_MCAST_MATCH_SLOT, RT_IDX_MCAST_MATCH, 1)) { -- cgit v1.2.2