aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/vmxnet3
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/vmxnet3')
-rw-r--r--drivers/net/vmxnet3/vmxnet3_drv.c11
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)
1675 /* We may be called with BH disabled */ 1675 /* We may be called with BH disabled */
1676 buf = kmalloc(sz, GFP_ATOMIC); 1676 buf = kmalloc(sz, GFP_ATOMIC);
1677 if (buf) { 1677 if (buf) {
1678 int i; 1678 struct dev_mc_list *mc;
1679 struct dev_mc_list *mc = netdev->mc_list; 1679 int i = 0;
1680 1680
1681 for (i = 0; i < netdev_mc_count(netdev); i++) { 1681 netdev_for_each_mc_addr(mc, netdev)
1682 BUG_ON(!mc); 1682 memcpy(buf + i++ * ETH_ALEN, mc->dmi_addr,
1683 memcpy(buf + i * ETH_ALEN, mc->dmi_addr,
1684 ETH_ALEN); 1683 ETH_ALEN);
1685 mc = mc->next;
1686 }
1687 } 1684 }
1688 } 1685 }
1689 return buf; 1686 return buf;