aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/eeprom.c
diff options
context:
space:
mode:
authorNick Kossifidis <mick@madwifi-project.org>2009-08-09 20:26:55 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-08-14 09:13:55 -0400
commitc38e7a9348f725be0ea2493454db9e6d44fb7e0c (patch)
treee535611368ee9a99ceefea6f9089291224c46d9e /drivers/net/wireless/ath/ath5k/eeprom.c
parentd6756d0dc220c3d12e2c4c06ca97d1dbcb5edf4e (diff)
ath5k: Check EEPROM before tweaking SERDES
* Read PCI-E infos offset from EEPROM and if it points to serdes section (0x40), enable serdes programming (further tweaking of serdes values during attach). This follows Legacy and Sam's HAL sources. Signed-off-by: Nick Kossifidis <mickflemm@gmail.com> Acked-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/eeprom.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/eeprom.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath5k/eeprom.c b/drivers/net/wireless/ath/ath5k/eeprom.c
index c56b494d417a..8af477dd6fc7 100644
--- a/drivers/net/wireless/ath/ath5k/eeprom.c
+++ b/drivers/net/wireless/ath/ath5k/eeprom.c
@@ -167,6 +167,16 @@ ath5k_eeprom_init_header(struct ath5k_hw *ah)
167 ee->ee_rfkill_pin = (u8) AR5K_REG_MS(val, AR5K_EEPROM_RFKILL_GPIO_SEL); 167 ee->ee_rfkill_pin = (u8) AR5K_REG_MS(val, AR5K_EEPROM_RFKILL_GPIO_SEL);
168 ee->ee_rfkill_pol = val & AR5K_EEPROM_RFKILL_POLARITY ? true : false; 168 ee->ee_rfkill_pol = val & AR5K_EEPROM_RFKILL_POLARITY ? true : false;
169 169
170 /* Check if PCIE_OFFSET points to PCIE_SERDES_SECTION
171 * and enable serdes programming if needed.
172 *
173 * XXX: Serdes values seem to be fixed so
174 * no need to read them here, we write them
175 * during ath5k_hw_attach */
176 AR5K_EEPROM_READ(AR5K_EEPROM_PCIE_OFFSET, val);
177 ee->ee_serdes = (val == AR5K_EEPROM_PCIE_SERDES_SECTION) ?
178 true : false;
179
170 return 0; 180 return 0;
171} 181}
172 182