2011-11-08 08:53:32

by Rajkumar Manoharan

[permalink] [raw]
Subject: [PATCH 4/4] ath9k_hw: Fix tx power settings for AR9003

Retriving tx power for 2x2 and 3x3 chainmask is not handled
properly. While calculating tx power for 2x2, 3 dBm was reduced
and for 3x3, 5 dBm was reduced which should be added back when
retriving.

Cc: Paul Stewart <[email protected]>
Signed-off-by: Rajkumar Manoharan <[email protected]>
---
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index ee9c09b..d2e4f28 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -5059,6 +5059,21 @@ static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah,
regulatory->max_power_level = targetPowerValT2[i];
}

+ switch (ar5416_get_ntxchains(ah->txchainmask)) {
+ case 1:
+ break;
+ case 2:
+ regulatory->max_power_level += INCREASE_MAXPOW_BY_TWO_CHAIN;
+ break;
+ case 3:
+ regulatory->max_power_level += INCREASE_MAXPOW_BY_THREE_CHAIN;
+ break;
+ default:
+ ath_dbg(ath9k_hw_common(ah), ATH_DBG_EEPROM,
+ "Invalid chainmask configuration\n");
+ break;
+ }
+
if (test)
return;

--
1.7.7.2



2011-11-10 09:42:06

by Rajkumar Manoharan

[permalink] [raw]
Subject: Re: [PATCH 4/4] ath9k_hw: Fix tx power settings for AR9003

On Tue, Nov 08, 2011 at 02:22:48PM +0530, Rajkumar Manoharan wrote:
> Retriving tx power for 2x2 and 3x3 chainmask is not handled
> properly. While calculating tx power for 2x2, 3 dBm was reduced
> and for 3x3, 5 dBm was reduced which should be added back when
> retriving.
>
> Cc: Paul Stewart <[email protected]>
> Signed-off-by: Rajkumar Manoharan <[email protected]>
> ---
> drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 15 +++++++++++++++
> 1 files changed, 15 insertions(+), 0 deletions(-)
John,

Drop this one. Will sent v2 patch.

--
Rajkumar