aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/ar9003_hw.c
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2013-12-06 05:58:45 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-12-09 15:37:58 -0500
commit0f978bfaf2600040f9826f394eb12e023bef3068 (patch)
tree57d58a226a986fc7cf0ed4db0c9d041d0f68884e /drivers/net/wireless/ath/ath9k/ar9003_hw.c
parent492f478d89b28c97166e4540aa13ac0e7abaa29f (diff)
ath9k: Use a separate TX gain table for WZR-HP-G450H
The Buffalo device WZR-HP-G450H uses the index 3 for TX gain, which is set to the high_power table currently. Later variants of the router use the same index, but instead refer to the low_ob_db gain table. This is not handled in the driver since there is no way to distinguish board revisions and the high_power table is used (incorrectly) for the newer variants. By default, devices based on AR9300 using the TX gain index 3 have to use the high_power table. To make sure that WZR-HP-G450H is not broken when the high_power table is updated, use a separate array based on information obtained from the platform data. The current situation where only the original variant of WZR-HP-G450H works properly stays unchanged. 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/ar9003_hw.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_hw.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_hw.c b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
index 4e8ae4a79dc0..29613ebbc5d7 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c
@@ -17,6 +17,7 @@
17#include "hw.h" 17#include "hw.h"
18#include "ar9003_mac.h" 18#include "ar9003_mac.h"
19#include "ar9003_2p2_initvals.h" 19#include "ar9003_2p2_initvals.h"
20#include "ar9003_buffalo_initvals.h"
20#include "ar9485_initvals.h" 21#include "ar9485_initvals.h"
21#include "ar9340_initvals.h" 22#include "ar9340_initvals.h"
22#include "ar9330_1p1_initvals.h" 23#include "ar9330_1p1_initvals.h"
@@ -592,9 +593,14 @@ static void ar9003_tx_gain_table_mode3(struct ath_hw *ah)
592 else if (AR_SREV_9565(ah)) 593 else if (AR_SREV_9565(ah))
593 INIT_INI_ARRAY(&ah->iniModesTxGain, 594 INIT_INI_ARRAY(&ah->iniModesTxGain,
594 ar9565_1p0_modes_high_power_tx_gain_table); 595 ar9565_1p0_modes_high_power_tx_gain_table);
595 else 596 else {
596 INIT_INI_ARRAY(&ah->iniModesTxGain, 597 if (ah->config.tx_gain_buffalo)
597 ar9300Modes_high_power_tx_gain_table_2p2); 598 INIT_INI_ARRAY(&ah->iniModesTxGain,
599 ar9300Modes_high_power_tx_gain_table_buffalo);
600 else
601 INIT_INI_ARRAY(&ah->iniModesTxGain,
602 ar9300Modes_high_power_tx_gain_table_2p2);
603 }
598} 604}
599 605
600static void ar9003_tx_gain_table_mode4(struct ath_hw *ah) 606static void ar9003_tx_gain_table_mode4(struct ath_hw *ah)