summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
diff options
context:
space:
mode:
authorMohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>2011-06-21 13:21:46 +0400
committerJohn W. Linville <linville@tuxdriver.com>2011-06-23 00:09:48 +0400
commit7952ca5b20e1d54a3bfdfd976086c6f9df5873a2 (patch)
tree540bf358207066968d3f896911bf26bc4b877f14 /drivers/net/wireless/ath/ath9k/ar9003_paprd.c
parent9720bb3ab0b80659c63ed337eab66104a4156db0 (diff)
downloadlinux-7952ca5b20e1d54a3bfdfd976086c6f9df5873a2.tar.xz
ath9k_hw: Fix calculation of PAPRD training power at 5Ghz
higher the chainmask, lesser the power_delta to be added to the paprd_training_power Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar9003_paprd.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_paprd.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
index fc9c08f513cf..8f6d11dfa371 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
@@ -83,7 +83,23 @@ static int ar9003_get_training_power_5g(struct ath_hw *ah)
if (delta > scale)
return -1;
- power += 2 * get_streams(common->tx_chainmask);
+ switch (get_streams(common->tx_chainmask)) {
+ case 1:
+ delta = 6;
+ break;
+ case 2:
+ delta = 4;
+ break;
+ case 3:
+ delta = 2;
+ break;
+ default:
+ delta = 0;
+ ath_dbg(common, ATH_DBG_CALIBRATE,
+ "Invalid tx-chainmask: %u\n", common->tx_chainmask);
+ }
+
+ power += delta;
return power;
}