aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2012-11-13 01:03:53 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-11-16 14:29:11 -0500
commit57527f8d4d71b5167a02fb6713857f55d3974748 (patch)
treed01ec106619e598a02656f9d3d67dd027ff51f9c /drivers/net/wireless/ath/ath9k
parentf3684343060636491d337e716f08834523cef722 (diff)
ath9k_hw: Program filter coefficients correctly
2484 Mhz (Japan) usage requires filter coefficients to be programmed in the CCK TX FIR registers. This is required for AR9331, AR9485 and AR9462. Fix this and also remove a few useless macros and a duplicate variable. 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')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_hw.c22
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_phy.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9485_initvals.h2
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h1
4 files changed, 16 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_hw.c b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
index 0693cd95b746..74fd3977feeb 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
@@ -35,12 +35,6 @@
35 */ 35 */
36static void ar9003_hw_init_mode_regs(struct ath_hw *ah) 36static void ar9003_hw_init_mode_regs(struct ath_hw *ah)
37{ 37{
38#define AR9462_BB_CTX_COEFJ(x) \
39 ar9462_##x##_baseband_core_txfir_coeff_japan_2484
40
41#define AR9462_BBC_TXIFR_COEFFJ \
42 ar9462_2p0_baseband_core_txfir_coeff_japan_2484
43
44 if (AR_SREV_9330_11(ah)) { 38 if (AR_SREV_9330_11(ah)) {
45 /* mac */ 39 /* mac */
46 INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], 40 INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE],
@@ -70,6 +64,10 @@ static void ar9003_hw_init_mode_regs(struct ath_hw *ah)
70 INIT_INI_ARRAY(&ah->iniModesTxGain, 64 INIT_INI_ARRAY(&ah->iniModesTxGain,
71 ar9331_modes_lowest_ob_db_tx_gain_1p1); 65 ar9331_modes_lowest_ob_db_tx_gain_1p1);
72 66
67 /* Japan 2484 Mhz CCK */
68 INIT_INI_ARRAY(&ah->iniCckfirJapan2484,
69 ar9331_1p1_baseband_core_txfir_coeff_japan_2484);
70
73 /* additional clock settings */ 71 /* additional clock settings */
74 if (ah->is_clk_25mhz) 72 if (ah->is_clk_25mhz)
75 INIT_INI_ARRAY(&ah->iniAdditional, 73 INIT_INI_ARRAY(&ah->iniAdditional,
@@ -106,6 +104,10 @@ static void ar9003_hw_init_mode_regs(struct ath_hw *ah)
106 INIT_INI_ARRAY(&ah->iniModesTxGain, 104 INIT_INI_ARRAY(&ah->iniModesTxGain,
107 ar9331_modes_lowest_ob_db_tx_gain_1p2); 105 ar9331_modes_lowest_ob_db_tx_gain_1p2);
108 106
107 /* Japan 2484 Mhz CCK */
108 INIT_INI_ARRAY(&ah->iniCckfirJapan2484,
109 ar9331_1p2_baseband_core_txfir_coeff_japan_2484);
110
109 /* additional clock settings */ 111 /* additional clock settings */
110 if (ah->is_clk_25mhz) 112 if (ah->is_clk_25mhz)
111 INIT_INI_ARRAY(&ah->iniAdditional, 113 INIT_INI_ARRAY(&ah->iniAdditional,
@@ -180,6 +182,10 @@ static void ar9003_hw_init_mode_regs(struct ath_hw *ah)
180 INIT_INI_ARRAY(&ah->iniModesTxGain, 182 INIT_INI_ARRAY(&ah->iniModesTxGain,
181 ar9485_modes_lowest_ob_db_tx_gain_1_1); 183 ar9485_modes_lowest_ob_db_tx_gain_1_1);
182 184
185 /* Japan 2484 Mhz CCK */
186 INIT_INI_ARRAY(&ah->iniCckfirJapan2484,
187 ar9485_1_1_baseband_core_txfir_coeff_japan_2484);
188
183 /* Load PCIE SERDES settings from INI */ 189 /* Load PCIE SERDES settings from INI */
184 190
185 /* Awake Setting */ 191 /* Awake Setting */
@@ -229,9 +235,7 @@ static void ar9003_hw_init_mode_regs(struct ath_hw *ah)
229 ar9462_modes_fast_clock_2p0); 235 ar9462_modes_fast_clock_2p0);
230 236
231 INIT_INI_ARRAY(&ah->iniCckfirJapan2484, 237 INIT_INI_ARRAY(&ah->iniCckfirJapan2484,
232 AR9462_BB_CTX_COEFJ(2p0)); 238 ar9462_2p0_baseband_core_txfir_coeff_japan_2484);
233
234 INIT_INI_ARRAY(&ah->ini_japan2484, AR9462_BBC_TXIFR_COEFFJ);
235 } else if (AR_SREV_9550(ah)) { 239 } else if (AR_SREV_9550(ah)) {
236 /* mac */ 240 /* mac */
237 INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], 241 INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE],
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
index 759f5f5a7154..ce19c09fa8e8 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -784,7 +784,7 @@ static int ar9003_hw_process_ini(struct ath_hw *ah,
784 REG_WRITE_ARRAY(&ah->iniAdditional, 1, regWrites); 784 REG_WRITE_ARRAY(&ah->iniAdditional, 1, regWrites);
785 785
786 if (chan->channel == 2484) 786 if (chan->channel == 2484)
787 ar9003_hw_prog_ini(ah, &ah->ini_japan2484, 1); 787 ar9003_hw_prog_ini(ah, &ah->iniCckfirJapan2484, 1);
788 788
789 if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) 789 if (AR_SREV_9462(ah) || AR_SREV_9565(ah))
790 REG_WRITE(ah, AR_GLB_SWREG_DISCONT_MODE, 790 REG_WRITE(ah, AR_GLB_SWREG_DISCONT_MODE,
diff --git a/drivers/net/wireless/ath/ath9k/ar9485_initvals.h b/drivers/net/wireless/ath/ath9k/ar9485_initvals.h
index 02e4d977bd44..a3710f3bb90c 100644
--- a/drivers/net/wireless/ath/ath9k/ar9485_initvals.h
+++ b/drivers/net/wireless/ath/ath9k/ar9485_initvals.h
@@ -1060,4 +1060,6 @@ static const u32 ar9485_1_1_mac_core[][2] = {
1060 {0x000083d0, 0x000301ff}, 1060 {0x000083d0, 0x000301ff},
1061}; 1061};
1062 1062
1063#define ar9485_1_1_baseband_core_txfir_coeff_japan_2484 ar9462_2p0_baseband_core_txfir_coeff_japan_2484
1064
1063#endif /* INITVALS_9485_H */ 1065#endif /* INITVALS_9485_H */
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index bdabbda5a83e..3636dabf03e1 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -875,7 +875,6 @@ struct ath_hw {
875 struct ar5416IniArray iniModesTxGain; 875 struct ar5416IniArray iniModesTxGain;
876 struct ar5416IniArray iniCckfirNormal; 876 struct ar5416IniArray iniCckfirNormal;
877 struct ar5416IniArray iniCckfirJapan2484; 877 struct ar5416IniArray iniCckfirJapan2484;
878 struct ar5416IniArray ini_japan2484;
879 struct ar5416IniArray iniModes_9271_ANI_reg; 878 struct ar5416IniArray iniModes_9271_ANI_reg;
880 struct ar5416IniArray ini_radio_post_sys2ant; 879 struct ar5416IniArray ini_radio_post_sys2ant;
881 880