diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2013-06-13 22:51:26 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-06-14 13:37:16 -0400 |
commit | 9b60b64bfe98b9cc01b21e6126819b11a0f0a971 (patch) | |
tree | 0bde3cc834ecfba014fd1e69c6f261be3eecb6f3 /drivers/net/wireless/ath/ath9k/init.c | |
parent | b9db44784723625a331a2c9139774d1202ebad24 (diff) | |
download | lwn-9b60b64bfe98b9cc01b21e6126819b11a0f0a971.tar.gz lwn-9b60b64bfe98b9cc01b21e6126819b11a0f0a971.zip |
ath9k: Add custom parameters for CUS198
CUS198 is a card based on AR9485. There are differences
between the base reference design HB125 and CUS198.
Identify such cards based on the PCI subsystem IDs and
set HW parameters appropriately.
Addresses this bug - https://bugzilla.kernel.org/show_bug.cgi?id=49201
Cc: jkp@iki.fi
Cc: gfmichaud@gmail.com
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/init.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 818f22daa8ba..7c2ed1cef9b7 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c @@ -513,6 +513,22 @@ static void ath9k_init_misc(struct ath_softc *sc) sc->spec_config.fft_period = 0xF; } +static void ath9k_init_platform(struct ath_softc *sc) +{ + struct ath_hw *ah = sc->sc_ah; + struct ath_common *common = ath9k_hw_common(ah); + + if (common->bus_ops->ath_bus_type != ATH_PCI) + return; + + if (sc->driver_data & ATH9K_PCI_CUS198) { + ah->config.xlna_gpio = 9; + ah->config.xatten_margin_cfg = true; + + ath_info(common, "Set parameters for CUS198\n"); + } +} + static void ath9k_eeprom_request_cb(const struct firmware *eeprom_blob, void *ctx) { @@ -605,6 +621,11 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, common->disable_ani = false; /* + * Platform quirks. + */ + ath9k_init_platform(sc); + + /* * Enable Antenna diversity only when BTCOEX is disabled * and the user manually requests the feature. */ |