aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_common.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_common.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c
index eb49020903c1..6eb5814ca7da 100644
--- a/drivers/net/ixgbe/ixgbe_common.c
+++ b/drivers/net/ixgbe/ixgbe_common.c
@@ -1484,26 +1484,24 @@ static void ixgbe_set_mta(struct ixgbe_hw *hw, u8 *mc_addr)
1484/** 1484/**
1485 * ixgbe_update_mc_addr_list_generic - Updates MAC list of multicast addresses 1485 * ixgbe_update_mc_addr_list_generic - Updates MAC list of multicast addresses
1486 * @hw: pointer to hardware structure 1486 * @hw: pointer to hardware structure
1487 * @mc_addr_list: the list of new multicast addresses 1487 * @netdev: pointer to net device structure
1488 * @mc_addr_count: number of addresses
1489 * @next: iterator function to walk the multicast address list
1490 * 1488 *
1491 * The given list replaces any existing list. Clears the MC addrs from receive 1489 * The given list replaces any existing list. Clears the MC addrs from receive
1492 * address registers and the multicast table. Uses unused receive address 1490 * address registers and the multicast table. Uses unused receive address
1493 * registers for the first multicast addresses, and hashes the rest into the 1491 * registers for the first multicast addresses, and hashes the rest into the
1494 * multicast table. 1492 * multicast table.
1495 **/ 1493 **/
1496s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list, 1494s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw,
1497 u32 mc_addr_count, ixgbe_mc_addr_itr next) 1495 struct net_device *netdev)
1498{ 1496{
1497 struct netdev_hw_addr *ha;
1499 u32 i; 1498 u32 i;
1500 u32 vmdq;
1501 1499
1502 /* 1500 /*
1503 * Set the new number of MC addresses that we are being requested to 1501 * Set the new number of MC addresses that we are being requested to
1504 * use. 1502 * use.
1505 */ 1503 */
1506 hw->addr_ctrl.num_mc_addrs = mc_addr_count; 1504 hw->addr_ctrl.num_mc_addrs = netdev_mc_count(netdev);
1507 hw->addr_ctrl.mta_in_use = 0; 1505 hw->addr_ctrl.mta_in_use = 0;
1508 1506
1509 /* Clear the MTA */ 1507 /* Clear the MTA */
@@ -1512,9 +1510,9 @@ s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list,
1512 IXGBE_WRITE_REG(hw, IXGBE_MTA(i), 0); 1510 IXGBE_WRITE_REG(hw, IXGBE_MTA(i), 0);
1513 1511
1514 /* Add the new addresses */ 1512 /* Add the new addresses */
1515 for (i = 0; i < mc_addr_count; i++) { 1513 netdev_for_each_mc_addr(ha, netdev) {
1516 hw_dbg(hw, " Adding the multicast addresses:\n"); 1514 hw_dbg(hw, " Adding the multicast addresses:\n");
1517 ixgbe_set_mta(hw, next(hw, &mc_addr_list, &vmdq)); 1515 ixgbe_set_mta(hw, ha->addr);
1518 } 1516 }
1519 1517
1520 /* Enable mta */ 1518 /* Enable mta */