diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-23 23:17:07 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-26 02:07:31 -0800 |
commit | 567ec874d15b478c8eda7e9a5d2dcb05f13f1fb5 (patch) | |
tree | e0c22740e44eca6f035e7dccbcff114a72d007a3 /drivers/net/vmxnet3 | |
parent | f9dcbcc9e338d08c0f7de7eba4eaafbbb7f81249 (diff) |
net: convert multiple drivers to use netdev_for_each_mc_addr, part6
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vmxnet3')
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_drv.c | 11 |
1 files changed, 4 insertions, 7 deletions
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; |