[rt2x00-users] rt2x00: Fix max TX power settings
Ivo Van Doorn
ivdoorn at gmail.com
Mon Aug 23 08:22:53 UTC 2010
>> > The above doesn't look correct for rt2800 devices. According to the legacy
>> > driver, the rf registers should always be feeded with the txpower calibration
>> > values read from the EEPROM. To select a different txpower, the TX_PWR_CFG_*
>> > registers should be used instead (see rt2800_config_txpower).
>> > Hence, NACK for rt2800.
>> Hmm, then we have a different problem as well. We are not sending the correct
>> values to mac80211, and neither do we get the correct values back.
> That's correct. But since we limit the txpower (per rate) set in
> rt2800_config_txpower to the EEPROM values we at least ensure that we don't
> run with more then 100% power. One effect is that on some cards we run with
> a much lower tx power than expected. This is still a bug.
Well it at least means that the user never gets what he configured due to the
missing dBm to mWatt conversion.
>> read the code
>> again, and the EEPROM seems to contain mWatt values while mac80211 works
>> only with dBm values. So we need to add some conversions.
> For rt2800 I would simply stick to the txpower1 and 2 values and write them
> during the channel change. And we should report the maximum per rate value as
> max txpower to mac80211. At least that would be consistent with what the legacy
> driver does.
That is not consistent and not possible either. mac80211 wants a per-channel
maximum value during init. It cannot be a per-rate TX power value.
legacy driver only seems to be interested in the percentage and never allows the
user to set the dBm or mWatt value directly.
> I'm not too sure about the values written in rt2800_config_txpower. It seems
> to me as if the calibraion values are in 2dB steps (7 means 14dB). Since only
> values between 0 and 15 are allowed this sounds reasonable. There are also some
> minor comments/code paths that indicate that the values are at least some sort
> of dB values.
7 means 14dBm, but isn't that the case because the minimum value is
-7? The BOOST
option converts everything. For the txpower value -7, the values which
are written are
power=0 and boost=0
for txpowers above 0, the power value is not converted but boost=1
More information about the users