2011-11-10 09:44:05

by Rajkumar Manoharan

[permalink] [raw]
Subject: [PATCH v2 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]>
---
v2: make use of the existing function

drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 2 ++
1 files changed, 2 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..a93bd63 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -5059,6 +5059,8 @@ static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah,
regulatory->max_power_level = targetPowerValT2[i];
}

+ ath9k_hw_update_regulatory_maxpower(ah);
+
if (test)
return;

--
1.7.7.3



2011-11-10 10:05:06

by Felix Fietkau

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

On 2011-11-10 10:44 AM, 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]>
I think the tx power reduction for 2x2/3x3 needs to be revisited. In the
discussion that led to Walsh spatial spreading being disabled you
mentioned this:

> In the FCC rulings, only transmissions that are completely non-coherent, are
> allowed to waive the array gain contribution to EIRP for multi-transmit configurations.
> The use of 2-stream with 2 transmit and use of 3-steam with 3 transmit qualifies
> for this spatial multiplexing MIMO classification as long as the streams are
> directly mapped to each radio (not Walsh spread prior to splitting to multiple radios)
So if I understand this issue correctly, Walsh spatial spreading was
disabled so that the tx power for 2x2 or 3x3 would not have to be
reduced by the array gain contribution - yet we're still doing that.

When Adrian pointed out that tx power is reduced based on the number of
chains, you mentioned this:
> Those pwrdecrease fields are applicable for AR9280 chips not for AR9003.

According to this patch, this doesn't seem to match what the code does,
though I didn't notice it back then.

So before we merge this patch, let's decide whether we actually need
this tx power reduction or not.

- Felix

2011-11-10 16:17:25

by Felix Fietkau

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

On 2011-11-10 11:04 AM, Felix Fietkau wrote:
> On 2011-11-10 10:44 AM, 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]>
> I think the tx power reduction for 2x2/3x3 needs to be revisited. In the
> discussion that led to Walsh spatial spreading being disabled you
> mentioned this:
>
>> In the FCC rulings, only transmissions that are completely non-coherent, are
>> allowed to waive the array gain contribution to EIRP for multi-transmit configurations.
>> The use of 2-stream with 2 transmit and use of 3-steam with 3 transmit qualifies
>> for this spatial multiplexing MIMO classification as long as the streams are
>> directly mapped to each radio (not Walsh spread prior to splitting to multiple radios)
> So if I understand this issue correctly, Walsh spatial spreading was
> disabled so that the tx power for 2x2 or 3x3 would not have to be
> reduced by the array gain contribution - yet we're still doing that.
>
> When Adrian pointed out that tx power is reduced based on the number of
> chains, you mentioned this:
>> Those pwrdecrease fields are applicable for AR9280 chips not for AR9003.
>
> According to this patch, this doesn't seem to match what the code does,
> though I didn't notice it back then.
>
> So before we merge this patch, let's decide whether we actually need
> this tx power reduction or not.
I just spent some time reading up on the FCC's MIMO test procedures and
it appears that I just got mixed up in the terminology earlier. The
patch should be merged as-is.

- Felix