diff options
author | Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> | 2011-06-21 14:51:46 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-22 16:09:48 -0400 |
commit | 7952ca5b20e1d54a3bfdfd976086c6f9df5873a2 (patch) | |
tree | 540bf358207066968d3f896911bf26bc4b877f14 | |
parent | 9720bb3ab0b80659c63ed337eab66104a4156db0 (diff) | |
download | blackbird-op-linux-7952ca5b20e1d54a3bfdfd976086c6f9df5873a2.tar.gz blackbird-op-linux-7952ca5b20e1d54a3bfdfd976086c6f9df5873a2.zip |
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>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_paprd.c | 18 |
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; } |