aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igbvf/netdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/igbvf/netdev.c')
-rw-r--r--drivers/net/igbvf/netdev.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c
index 6029c400f2be..a77afd8a14bb 100644
--- a/drivers/net/igbvf/netdev.c
+++ b/drivers/net/igbvf/netdev.c
@@ -1413,15 +1413,9 @@ static void igbvf_set_multi(struct net_device *netdev)
1413 } 1413 }
1414 1414
1415 /* prepare a packed array of only addresses. */ 1415 /* prepare a packed array of only addresses. */
1416 mc_ptr = netdev->mc_list; 1416 i = 0;
1417 1417 netdev_for_each_mc_addr(mc_ptr, netdev)
1418 for (i = 0; i < netdev_mc_count(netdev); i++) { 1418 memcpy(mta_list + (i++ * ETH_ALEN), mc_ptr->dmi_addr, ETH_ALEN);
1419 if (!mc_ptr)
1420 break;
1421 memcpy(mta_list + (i*ETH_ALEN), mc_ptr->dmi_addr,
1422 ETH_ALEN);
1423 mc_ptr = mc_ptr->next;
1424 }
1425 1419
1426 hw->mac.ops.update_mc_addr_list(hw, mta_list, i, 0, 0); 1420 hw->mac.ops.update_mc_addr_list(hw, mta_list, i, 0, 0);
1427 kfree(mta_list); 1421 kfree(mta_list);