[rt2x00-users] [PATCH 2/5] rt2x00: Fix channel configuration for RF3052
Helmut Schaa
helmut.schaa at googlemail.com
Mon Aug 23 14:11:45 UTC 2010
Am Monday 23 August 2010 schrieb Ivo van Doorn:
> We missed a check for RF3052 in the config_channel
> configuration function. As a result the channel is not
> properly configured for RF3052 devices. This also
> requires rt2800_config_channel_rf3xxx to support 5GHz
> channels, so we must apply the TXPOWER_A_TO_DEV and
> TXPOWER_G_TO_DEV conversions during rt2800_config_channel()
>
> Signed-off-by: Ivo van Doorn <IvDoorn at gmail.com>
> ---
[...]
>
> + if (rf->channel <= 14) {
> + info->tx_power1 = TXPOWER_G_TO_DEV(info->tx_power1);
> + info->tx_power2 = TXPOWER_G_TO_DEV(info->tx_power2);
> + } else {
> + info->tx_power1 = TXPOWER_A_TO_DEV(info->tx_power1);
> + info->tx_power2 = TXPOWER_A_TO_DEV(info->tx_power2);
> + }
> +
This looks a bit strange? This will overwrite tx_powerX with the converted
value and during the next invocation it will convert the converted value
again.
Can't we use a local tx_powerX variable to hold the value and pass it to the
rt2800_config_channel_rf* functions as arguments?
Helmut
More information about the users
mailing list