diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2009-12-01 10:46:43 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-02 03:35:51 -0500 |
commit | caaddaf83501c79fe11b183c8972e60d8b7d5d56 (patch) | |
tree | 5ddaf752e1a4622e969dea9d3e8ec76ac655f767 /drivers/net/e1000e/82571.c | |
parent | ff9c38bba37937adb909cceb2a6521f2e92e17c6 (diff) |
e1000e: provide family-specific functions to manage VLAN filter arrays
The two MAC-families that have VLAN filter table register arrays manage
each a bit differently from one another, so provide family-specific
functions for managing the register arrays and function pointers to access
the appropriate function. Also make sure attempts to access these
register arrays are not done on parts not supporting that feature.
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/82571.c')
-rw-r--r-- | drivers/net/e1000e/82571.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/e1000e/82571.c b/drivers/net/e1000e/82571.c index 62bbc6e0a76a..8ea3ed7e5364 100644 --- a/drivers/net/e1000e/82571.c +++ b/drivers/net/e1000e/82571.c | |||
@@ -65,6 +65,7 @@ static s32 e1000_fix_nvm_checksum_82571(struct e1000_hw *hw); | |||
65 | static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw); | 65 | static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw); |
66 | static s32 e1000_setup_link_82571(struct e1000_hw *hw); | 66 | static s32 e1000_setup_link_82571(struct e1000_hw *hw); |
67 | static void e1000_clear_hw_cntrs_82571(struct e1000_hw *hw); | 67 | static void e1000_clear_hw_cntrs_82571(struct e1000_hw *hw); |
68 | static void e1000_clear_vfta_82571(struct e1000_hw *hw); | ||
68 | static bool e1000_check_mng_mode_82574(struct e1000_hw *hw); | 69 | static bool e1000_check_mng_mode_82574(struct e1000_hw *hw); |
69 | static s32 e1000_led_on_82574(struct e1000_hw *hw); | 70 | static s32 e1000_led_on_82574(struct e1000_hw *hw); |
70 | static void e1000_put_hw_semaphore_82571(struct e1000_hw *hw); | 71 | static void e1000_put_hw_semaphore_82571(struct e1000_hw *hw); |
@@ -949,7 +950,7 @@ static s32 e1000_init_hw_82571(struct e1000_hw *hw) | |||
949 | 950 | ||
950 | /* Disabling VLAN filtering */ | 951 | /* Disabling VLAN filtering */ |
951 | e_dbg("Initializing the IEEE VLAN\n"); | 952 | e_dbg("Initializing the IEEE VLAN\n"); |
952 | e1000e_clear_vfta(hw); | 953 | mac->ops.clear_vfta(hw); |
953 | 954 | ||
954 | /* Setup the receive address. */ | 955 | /* Setup the receive address. */ |
955 | /* | 956 | /* |
@@ -1128,13 +1129,13 @@ static void e1000_initialize_hw_bits_82571(struct e1000_hw *hw) | |||
1128 | } | 1129 | } |
1129 | 1130 | ||
1130 | /** | 1131 | /** |
1131 | * e1000e_clear_vfta - Clear VLAN filter table | 1132 | * e1000_clear_vfta_82571 - Clear VLAN filter table |
1132 | * @hw: pointer to the HW structure | 1133 | * @hw: pointer to the HW structure |
1133 | * | 1134 | * |
1134 | * Clears the register array which contains the VLAN filter table by | 1135 | * Clears the register array which contains the VLAN filter table by |
1135 | * setting all the values to 0. | 1136 | * setting all the values to 0. |
1136 | **/ | 1137 | **/ |
1137 | void e1000e_clear_vfta(struct e1000_hw *hw) | 1138 | static void e1000_clear_vfta_82571(struct e1000_hw *hw) |
1138 | { | 1139 | { |
1139 | u32 offset; | 1140 | u32 offset; |
1140 | u32 vfta_value = 0; | 1141 | u32 vfta_value = 0; |
@@ -1656,6 +1657,8 @@ static struct e1000_mac_operations e82571_mac_ops = { | |||
1656 | /* .led_on: mac type dependent */ | 1657 | /* .led_on: mac type dependent */ |
1657 | .led_off = e1000e_led_off_generic, | 1658 | .led_off = e1000e_led_off_generic, |
1658 | .update_mc_addr_list = e1000_update_mc_addr_list_82571, | 1659 | .update_mc_addr_list = e1000_update_mc_addr_list_82571, |
1660 | .write_vfta = e1000_write_vfta_generic, | ||
1661 | .clear_vfta = e1000_clear_vfta_82571, | ||
1659 | .reset_hw = e1000_reset_hw_82571, | 1662 | .reset_hw = e1000_reset_hw_82571, |
1660 | .init_hw = e1000_init_hw_82571, | 1663 | .init_hw = e1000_init_hw_82571, |
1661 | .setup_link = e1000_setup_link_82571, | 1664 | .setup_link = e1000_setup_link_82571, |