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/vmxnet3/vmxnet3_drv.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'drivers/net/vmxnet3') diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index ee1b397417f3..cff3485d9673 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c @@ -1675,15 +1675,12 @@ vmxnet3_copy_mc(struct net_device *netdev) /* We may be called with BH disabled */ buf = kmalloc(sz, GFP_ATOMIC); if (buf) { - int i; - struct dev_mc_list *mc = netdev->mc_list; + struct dev_mc_list *mc; + int i = 0; - for (i = 0; i < netdev_mc_count(netdev); i++) { - BUG_ON(!mc); - memcpy(buf + i * ETH_ALEN, mc->dmi_addr, + netdev_for_each_mc_addr(mc, netdev) + memcpy(buf + i++ * ETH_ALEN, mc->dmi_addr, ETH_ALEN); - mc = mc->next; - } } } return buf; -- cgit v1.2.3