diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-02-24 00:17:07 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-26 11:07:31 +0100 |
commit | 567ec874d15b478c8eda7e9a5d2dcb05f13f1fb5 (patch) | |
tree | e0c22740e44eca6f035e7dccbcff114a72d007a3 /drivers/net/vmxnet3 | |
parent | net: convert multiple drivers to use netdev_for_each_mc_addr, part5 V2 (diff) | |
download | linux-567ec874d15b478c8eda7e9a5d2dcb05f13f1fb5.tar.xz linux-567ec874d15b478c8eda7e9a5d2dcb05f13f1fb5.zip |
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; |