ath9k: Use correct PCIE initvals for AR9485
PATCH v2 1/1 ath9k: Use correct PCIE initvals for AR9485
From: Sujith Manoharan <[email protected]>
Currently, the PLL is turned off for AR9485 when switching to a low power state, but AR9485 has an issue where the card will become unresponsive if left idle for a long time without any traffic. To fix this, force the PLL to always be on using a different initval array, ar9485_1_1_pll_on_cdr_on_clkreq_disable_L1.
This is done for most of the AR9485 based cards like HB125, WB225 etc. but certain models require the feature to be turned off. Identify such cards and use default values for them.
Signed-off-by Sujith Manoharan <[email protected]>
--- drivers/net/wireless/ath/ath9k/ar9003_hw.c | 22 +++--- drivers/net/wireless/ath/ath9k/ar9485_initvals.h | 42 ++++-------- drivers/net/wireless/ath/ath9k/ath9k.h | 21 +++--- drivers/net/wireless/ath/ath9k/hw.h | 1 + drivers/net/wireless/ath/ath9k/init.c | 5 ++ drivers/net/wireless/ath/ath9k/pci.c | 87 ++++++++++++++++++++++++ 6 files changed, 129 insertions(+), 49 deletions(-)
drivers/net/wireless/ath/ath9k/ar9003_hw.c +11 -11
@@ -187,17 +187,17 @@ static void ar9003_hw_init_mode_regs(struct ath_hw *ah)INIT_INI_ARRAY (&ah->iniCckfirJapan2484, ar9485_1_1_baseband_core_txfir_coeff_japan_2484); -/* Load PCIE SERDES settings from INI */ - -/* Awake Setting */ - -INIT_INI_ARRAY (&ah->iniPcieSerdes, - ar9485_1_1_pcie_phy_clkreq_disable_L1); - -/* Sleep Setting */ - -INIT_INI_ARRAY (&ah->iniPcieSerdesLowPower, - ar9485_1_1_pcie_phy_clkreq_disable_L1); +if (ah->config.no_pll_pwrsave) { +INIT_INI_ARRAY (&ah->iniPcieSerdes, + ar9485_1_1_pcie_phy_clkreq_disable_L1); +INIT_INI_ARRAY (&ah->iniPcieSerdesLowPower, + ar9485_1_1_pcie_phy_clkreq_disable_L1); + }else { +INIT_INI_ARRAY (&ah->iniPcieSerdes, + ar9485_1_1_pll_on_cdr_on_clkreq_disable_L1); +INIT_INI_ARRAY (&ah->iniPcieSerdesLowPower, + ar9485_1_1_pll_on_cdr_on_clkreq_disable_L1); + } }else if (AR_SREV_9462_21 (ah)) {INIT_INI_ARRAY (&ah->iniMac[ATH_INI_CORE ], ar9462_2p1_mac_core);
drivers/net/wireless/ath/ath9k/ar9485_initvals.h +14 -28
64 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/ath9k.h +11 -10
@@ -660,16 +660,17 @@ void ath_ant_comb_scan(struct ath_softc *sc, struct ath_rx_status *rs);/* Main driver core */ /********************/ -#define ATH9K_PCI_CUS198 0x0001 -#define ATH9K_PCI_CUS230 0x0002 -#define ATH9K_PCI_CUS217 0x0004 -#define ATH9K_PCI_CUS252 0x0008 -#define ATH9K_PCI_WOW 0x0010 -#define ATH9K_PCI_BT_ANT_DIV 0x0020 -#define ATH9K_PCI_D3_L1_WAR 0x0040 -#define ATH9K_PCI_AR9565_1ANT 0x0080 -#define ATH9K_PCI_AR9565_2ANT 0x0100 -#define ATH9K_PCI_KILLER 0x0200 +#define ATH9K_PCI_CUS198 0x0001 +#define ATH9K_PCI_CUS230 0x0002 +#define ATH9K_PCI_CUS217 0x0004 +#define ATH9K_PCI_CUS252 0x0008 +#define ATH9K_PCI_WOW 0x0010 +#define ATH9K_PCI_BT_ANT_DIV 0x0020 +#define ATH9K_PCI_D3_L1_WAR 0x0040 +#define ATH9K_PCI_AR9565_1ANT 0x0080 +#define ATH9K_PCI_AR9565_2ANT 0x0100 +#define ATH9K_PCI_KILLER 0x0200 +#define ATH9K_PCI_NO_PLL_PWRSAVE 0x0400/* * Default cache line size, in bytes.
drivers/net/wireless/ath/ath9k/hw.h +1 -0
@@ -315,6 +315,7 @@ struct ath9k_ops_config {u32 ant_ctrl_comm2g_switch_enable;bool xatten_margin_cfg;bool alt_mingainidx; +bool no_pll_pwrsave; };enum ath9k_int {
drivers/net/wireless/ath/ath9k/init.c +5 -0
@@ -612,6 +612,11 @@ static void ath9k_init_platform(struct ath_softc *sc) ah->config.pcie_waen =0x0040473b ;ath_info (common,"Enable WAR for ASPM D3/L1\n" ); } + +if (sc->driver_data &ATH9K_PCI_NO_PLL_PWRSAVE ) { + ah->config.no_pll_pwrsave = true; +ath_info (common,"Disable PLL PowerSave\n" ); + } } static void ath9k_eeprom_request_cb(const struct firmware *eeprom_blob,
drivers/net/wireless/ath/ath9k/pci.c +87 -0
93 lines not on this page · raw message
Signature · 1 line
1.8.4.2