Commit fb5a2dcb authored by Sujith Manoharan's avatar Sujith Manoharan Committed by John W. Linville

ath9k: Add support for AR9485 1.2

Signed-off-by: default avatarSujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent e979a8ab
...@@ -153,7 +153,7 @@ static void ar9003_hw_init_mode_regs(struct ath_hw *ah) ...@@ -153,7 +153,7 @@ static void ar9003_hw_init_mode_regs(struct ath_hw *ah)
if (!ah->is_clk_25mhz) if (!ah->is_clk_25mhz)
INIT_INI_ARRAY(&ah->iniAdditional, INIT_INI_ARRAY(&ah->iniAdditional,
ar9340_1p0_radio_core_40M); ar9340_1p0_radio_core_40M);
} else if (AR_SREV_9485_11(ah)) { } else if (AR_SREV_9485_11_OR_LATER(ah)) {
/* mac */ /* mac */
INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE],
ar9485_1_1_mac_core); ar9485_1_1_mac_core);
...@@ -424,7 +424,7 @@ static void ar9003_tx_gain_table_mode0(struct ath_hw *ah) ...@@ -424,7 +424,7 @@ static void ar9003_tx_gain_table_mode0(struct ath_hw *ah)
else if (AR_SREV_9340(ah)) else if (AR_SREV_9340(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain, INIT_INI_ARRAY(&ah->iniModesTxGain,
ar9340Modes_lowest_ob_db_tx_gain_table_1p0); ar9340Modes_lowest_ob_db_tx_gain_table_1p0);
else if (AR_SREV_9485_11(ah)) else if (AR_SREV_9485_11_OR_LATER(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain, INIT_INI_ARRAY(&ah->iniModesTxGain,
ar9485_modes_lowest_ob_db_tx_gain_1_1); ar9485_modes_lowest_ob_db_tx_gain_1_1);
else if (AR_SREV_9550(ah)) else if (AR_SREV_9550(ah))
...@@ -458,7 +458,7 @@ static void ar9003_tx_gain_table_mode1(struct ath_hw *ah) ...@@ -458,7 +458,7 @@ static void ar9003_tx_gain_table_mode1(struct ath_hw *ah)
else if (AR_SREV_9340(ah)) else if (AR_SREV_9340(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain, INIT_INI_ARRAY(&ah->iniModesTxGain,
ar9340Modes_high_ob_db_tx_gain_table_1p0); ar9340Modes_high_ob_db_tx_gain_table_1p0);
else if (AR_SREV_9485_11(ah)) else if (AR_SREV_9485_11_OR_LATER(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain, INIT_INI_ARRAY(&ah->iniModesTxGain,
ar9485Modes_high_ob_db_tx_gain_1_1); ar9485Modes_high_ob_db_tx_gain_1_1);
else if (AR_SREV_9580(ah)) else if (AR_SREV_9580(ah))
...@@ -492,7 +492,7 @@ static void ar9003_tx_gain_table_mode2(struct ath_hw *ah) ...@@ -492,7 +492,7 @@ static void ar9003_tx_gain_table_mode2(struct ath_hw *ah)
else if (AR_SREV_9340(ah)) else if (AR_SREV_9340(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain, INIT_INI_ARRAY(&ah->iniModesTxGain,
ar9340Modes_low_ob_db_tx_gain_table_1p0); ar9340Modes_low_ob_db_tx_gain_table_1p0);
else if (AR_SREV_9485_11(ah)) else if (AR_SREV_9485_11_OR_LATER(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain, INIT_INI_ARRAY(&ah->iniModesTxGain,
ar9485Modes_low_ob_db_tx_gain_1_1); ar9485Modes_low_ob_db_tx_gain_1_1);
else if (AR_SREV_9580(ah)) else if (AR_SREV_9580(ah))
...@@ -517,7 +517,7 @@ static void ar9003_tx_gain_table_mode3(struct ath_hw *ah) ...@@ -517,7 +517,7 @@ static void ar9003_tx_gain_table_mode3(struct ath_hw *ah)
else if (AR_SREV_9340(ah)) else if (AR_SREV_9340(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain, INIT_INI_ARRAY(&ah->iniModesTxGain,
ar9340Modes_high_power_tx_gain_table_1p0); ar9340Modes_high_power_tx_gain_table_1p0);
else if (AR_SREV_9485_11(ah)) else if (AR_SREV_9485_11_OR_LATER(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain, INIT_INI_ARRAY(&ah->iniModesTxGain,
ar9485Modes_high_power_tx_gain_1_1); ar9485Modes_high_power_tx_gain_1_1);
else if (AR_SREV_9580(ah)) else if (AR_SREV_9580(ah))
...@@ -552,7 +552,7 @@ static void ar9003_tx_gain_table_mode4(struct ath_hw *ah) ...@@ -552,7 +552,7 @@ static void ar9003_tx_gain_table_mode4(struct ath_hw *ah)
static void ar9003_tx_gain_table_mode5(struct ath_hw *ah) static void ar9003_tx_gain_table_mode5(struct ath_hw *ah)
{ {
if (AR_SREV_9485_11(ah)) if (AR_SREV_9485_11_OR_LATER(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain, INIT_INI_ARRAY(&ah->iniModesTxGain,
ar9485Modes_green_ob_db_tx_gain_1_1); ar9485Modes_green_ob_db_tx_gain_1_1);
else if (AR_SREV_9340(ah)) else if (AR_SREV_9340(ah))
...@@ -571,7 +571,7 @@ static void ar9003_tx_gain_table_mode6(struct ath_hw *ah) ...@@ -571,7 +571,7 @@ static void ar9003_tx_gain_table_mode6(struct ath_hw *ah)
if (AR_SREV_9340(ah)) if (AR_SREV_9340(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain, INIT_INI_ARRAY(&ah->iniModesTxGain,
ar9340Modes_low_ob_db_and_spur_tx_gain_table_1p0); ar9340Modes_low_ob_db_and_spur_tx_gain_table_1p0);
else if (AR_SREV_9485_11(ah)) else if (AR_SREV_9485_11_OR_LATER(ah))
INIT_INI_ARRAY(&ah->iniModesTxGain, INIT_INI_ARRAY(&ah->iniModesTxGain,
ar9485Modes_green_spur_ob_db_tx_gain_1_1); ar9485Modes_green_spur_ob_db_tx_gain_1_1);
else if (AR_SREV_9580(ah)) else if (AR_SREV_9580(ah))
...@@ -611,7 +611,7 @@ static void ar9003_rx_gain_table_mode0(struct ath_hw *ah) ...@@ -611,7 +611,7 @@ static void ar9003_rx_gain_table_mode0(struct ath_hw *ah)
else if (AR_SREV_9340(ah)) else if (AR_SREV_9340(ah))
INIT_INI_ARRAY(&ah->iniModesRxGain, INIT_INI_ARRAY(&ah->iniModesRxGain,
ar9340Common_rx_gain_table_1p0); ar9340Common_rx_gain_table_1p0);
else if (AR_SREV_9485_11(ah)) else if (AR_SREV_9485_11_OR_LATER(ah))
INIT_INI_ARRAY(&ah->iniModesRxGain, INIT_INI_ARRAY(&ah->iniModesRxGain,
ar9485_common_rx_gain_1_1); ar9485_common_rx_gain_1_1);
else if (AR_SREV_9550(ah)) { else if (AR_SREV_9550(ah)) {
...@@ -644,7 +644,7 @@ static void ar9003_rx_gain_table_mode1(struct ath_hw *ah) ...@@ -644,7 +644,7 @@ static void ar9003_rx_gain_table_mode1(struct ath_hw *ah)
else if (AR_SREV_9340(ah)) else if (AR_SREV_9340(ah))
INIT_INI_ARRAY(&ah->iniModesRxGain, INIT_INI_ARRAY(&ah->iniModesRxGain,
ar9340Common_wo_xlna_rx_gain_table_1p0); ar9340Common_wo_xlna_rx_gain_table_1p0);
else if (AR_SREV_9485_11(ah)) else if (AR_SREV_9485_11_OR_LATER(ah))
INIT_INI_ARRAY(&ah->iniModesRxGain, INIT_INI_ARRAY(&ah->iniModesRxGain,
ar9485Common_wo_xlna_rx_gain_1_1); ar9485Common_wo_xlna_rx_gain_1_1);
else if (AR_SREV_9462_21(ah)) else if (AR_SREV_9462_21(ah))
......
...@@ -1449,7 +1449,7 @@ static void ar9003_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable) ...@@ -1449,7 +1449,7 @@ static void ar9003_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable)
regval |= (ant_div_ctl1 & 0x3f) << AR_ANT_DIV_CTRL_ALL_S; regval |= (ant_div_ctl1 & 0x3f) << AR_ANT_DIV_CTRL_ALL_S;
REG_WRITE(ah, AR_PHY_MC_GAIN_CTRL, regval); REG_WRITE(ah, AR_PHY_MC_GAIN_CTRL, regval);
if (AR_SREV_9485_11(ah)) { if (AR_SREV_9485_11_OR_LATER(ah)) {
/* /*
* Enable LNA diversity. * Enable LNA diversity.
*/ */
......
...@@ -893,9 +893,9 @@ ...@@ -893,9 +893,9 @@
#define AR_SREV_9485(_ah) \ #define AR_SREV_9485(_ah) \
(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9485)) (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9485))
#define AR_SREV_9485_11(_ah) \ #define AR_SREV_9485_11_OR_LATER(_ah) \
(AR_SREV_9485(_ah) && \ (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9485) && \
((_ah)->hw_version.macRev == AR_SREV_REVISION_9485_11)) ((_ah)->hw_version.macRev >= AR_SREV_REVISION_9485_11))
#define AR_SREV_9485_OR_LATER(_ah) \ #define AR_SREV_9485_OR_LATER(_ah) \
(((_ah)->hw_version.macVersion >= AR_SREV_VERSION_9485)) (((_ah)->hw_version.macVersion >= AR_SREV_VERSION_9485))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment