diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-03-23 18:58:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-26 23:10:03 -0400 |
commit | 2853eb892edb6be1ea13787d0c24fb72c1d1cca5 (patch) | |
tree | 4e8e3ca0f53fbd08cf3d3514b83f5fd2482aed1d /drivers/net/ixgbe/ixgbe_common.c | |
parent | b79d1d54cf0672f764402fe4711ef5306f917bd3 (diff) |
ixgbe: convert to use netdev_for_each_mc_addr
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_common.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_common.c | 16 |
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..4d1c3a429457 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 | **/ |
1496 | s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list, | 1494 | s32 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 dev_addr_list *dmi; | ||
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(dmi, 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, dmi->dmi_addr); |
1518 | } | 1516 | } |
1519 | 1517 | ||
1520 | /* Enable mta */ | 1518 | /* Enable mta */ |