diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2010-01-12 21:05:38 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-13 23:31:57 -0500 |
commit | ab8932f3e8e07df92d6ce3fa41f5af0dda865429 (patch) | |
tree | adfd802b04591e62b4743790ea8308f24f46d3e4 /drivers/net/e1000e/netdev.c | |
parent | f4d2dd4cd4d001f5dc20fc76c780c0c20c000c23 (diff) |
e1000e: genericize the update multicast address list
Make updating the multicast address list generic for all families and
enforce the requirement to update the entire multicast table array all at
once instead of piecemeal which causes problems on some parts.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.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/e1000e/netdev.c')
-rw-r--r-- | drivers/net/e1000e/netdev.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 0d5ef4c5c6db..3d57ca5482f4 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -2536,22 +2536,14 @@ static void e1000_configure_rx(struct e1000_adapter *adapter) | |||
2536 | * @hw: pointer to the HW structure | 2536 | * @hw: pointer to the HW structure |
2537 | * @mc_addr_list: array of multicast addresses to program | 2537 | * @mc_addr_list: array of multicast addresses to program |
2538 | * @mc_addr_count: number of multicast addresses to program | 2538 | * @mc_addr_count: number of multicast addresses to program |
2539 | * @rar_used_count: the first RAR register free to program | ||
2540 | * @rar_count: total number of supported Receive Address Registers | ||
2541 | * | 2539 | * |
2542 | * Updates the Receive Address Registers and Multicast Table Array. | 2540 | * Updates the Multicast Table Array. |
2543 | * The caller must have a packed mc_addr_list of multicast addresses. | 2541 | * The caller must have a packed mc_addr_list of multicast addresses. |
2544 | * The parameter rar_count will usually be hw->mac.rar_entry_count | ||
2545 | * unless there are workarounds that change this. Currently no func pointer | ||
2546 | * exists and all implementations are handled in the generic version of this | ||
2547 | * function. | ||
2548 | **/ | 2542 | **/ |
2549 | static void e1000_update_mc_addr_list(struct e1000_hw *hw, u8 *mc_addr_list, | 2543 | static void e1000_update_mc_addr_list(struct e1000_hw *hw, u8 *mc_addr_list, |
2550 | u32 mc_addr_count, u32 rar_used_count, | 2544 | u32 mc_addr_count) |
2551 | u32 rar_count) | ||
2552 | { | 2545 | { |
2553 | hw->mac.ops.update_mc_addr_list(hw, mc_addr_list, mc_addr_count, | 2546 | hw->mac.ops.update_mc_addr_list(hw, mc_addr_list, mc_addr_count); |
2554 | rar_used_count, rar_count); | ||
2555 | } | 2547 | } |
2556 | 2548 | ||
2557 | /** | 2549 | /** |
@@ -2567,7 +2559,6 @@ static void e1000_set_multi(struct net_device *netdev) | |||
2567 | { | 2559 | { |
2568 | struct e1000_adapter *adapter = netdev_priv(netdev); | 2560 | struct e1000_adapter *adapter = netdev_priv(netdev); |
2569 | struct e1000_hw *hw = &adapter->hw; | 2561 | struct e1000_hw *hw = &adapter->hw; |
2570 | struct e1000_mac_info *mac = &hw->mac; | ||
2571 | struct dev_mc_list *mc_ptr; | 2562 | struct dev_mc_list *mc_ptr; |
2572 | u8 *mta_list; | 2563 | u8 *mta_list; |
2573 | u32 rctl; | 2564 | u32 rctl; |
@@ -2609,15 +2600,14 @@ static void e1000_set_multi(struct net_device *netdev) | |||
2609 | mc_ptr = mc_ptr->next; | 2600 | mc_ptr = mc_ptr->next; |
2610 | } | 2601 | } |
2611 | 2602 | ||
2612 | e1000_update_mc_addr_list(hw, mta_list, i, 1, | 2603 | e1000_update_mc_addr_list(hw, mta_list, i); |
2613 | mac->rar_entry_count); | ||
2614 | kfree(mta_list); | 2604 | kfree(mta_list); |
2615 | } else { | 2605 | } else { |
2616 | /* | 2606 | /* |
2617 | * if we're called from probe, we might not have | 2607 | * if we're called from probe, we might not have |
2618 | * anything to do here, so clear out the list | 2608 | * anything to do here, so clear out the list |
2619 | */ | 2609 | */ |
2620 | e1000_update_mc_addr_list(hw, NULL, 0, 1, mac->rar_entry_count); | 2610 | e1000_update_mc_addr_list(hw, NULL, 0); |
2621 | } | 2611 | } |
2622 | } | 2612 | } |
2623 | 2613 | ||