aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e/lib.c
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2009-12-01 10:46:43 -0500
committerDavid S. Miller <davem@davemloft.net>2009-12-02 03:35:51 -0500
commitcaaddaf83501c79fe11b183c8972e60d8b7d5d56 (patch)
tree5ddaf752e1a4622e969dea9d3e8ec76ac655f767 /drivers/net/e1000e/lib.c
parentff9c38bba37937adb909cceb2a6521f2e92e17c6 (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/lib.c')
-rw-r--r--drivers/net/e1000e/lib.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/net/e1000e/lib.c b/drivers/net/e1000e/lib.c
index f690a1055b41..e3976ea668d0 100644
--- a/drivers/net/e1000e/lib.c
+++ b/drivers/net/e1000e/lib.c
@@ -82,7 +82,24 @@ s32 e1000e_get_bus_info_pcie(struct e1000_hw *hw)
82} 82}
83 83
84/** 84/**
85 * e1000e_write_vfta - Write value to VLAN filter table 85 * e1000_clear_vfta_generic - Clear VLAN filter table
86 * @hw: pointer to the HW structure
87 *
88 * Clears the register array which contains the VLAN filter table by
89 * setting all the values to 0.
90 **/
91void e1000_clear_vfta_generic(struct e1000_hw *hw)
92{
93 u32 offset;
94
95 for (offset = 0; offset < E1000_VLAN_FILTER_TBL_SIZE; offset++) {
96 E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, offset, 0);
97 e1e_flush();
98 }
99}
100
101/**
102 * e1000_write_vfta_generic - Write value to VLAN filter table
86 * @hw: pointer to the HW structure 103 * @hw: pointer to the HW structure
87 * @offset: register offset in VLAN filter table 104 * @offset: register offset in VLAN filter table
88 * @value: register value written to VLAN filter table 105 * @value: register value written to VLAN filter table
@@ -90,7 +107,7 @@ s32 e1000e_get_bus_info_pcie(struct e1000_hw *hw)
90 * Writes value at the given offset in the register array which stores 107 * Writes value at the given offset in the register array which stores
91 * the VLAN filter table. 108 * the VLAN filter table.
92 **/ 109 **/
93void e1000e_write_vfta(struct e1000_hw *hw, u32 offset, u32 value) 110void e1000_write_vfta_generic(struct e1000_hw *hw, u32 offset, u32 value)
94{ 111{
95 E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, offset, value); 112 E1000_WRITE_REG_ARRAY(hw, E1000_VFTA, offset, value);
96 e1e_flush(); 113 e1e_flush();