diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-06-25 16:57:29 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-25 17:07:29 -0400 |
commit | 0530bd4a6cc3c04d1e621299e05d2da2c99736c4 (patch) | |
tree | e332d9e3531dbfdb9c219c91f12271370342b7b6 /drivers/net/wireless/rt2x00 | |
parent | 24e095cdc2d7781e756b052291ef0ca7c9edac93 (diff) |
rt2x00: rt2800lib: fix default TX power check for RT55xx
commit 0847beb2865f5ef1c8626ec1a37def18f3d6c41a upstream.
The code writes the default_power2 value into the TX field
of the RFCSR50 register, however the condition in the if
statement uses default_power1. Due to this, wrong TX power
value might be written into the register.
Use the correct value in the condition to fix the issue.
Compile tested only.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800lib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 519914f33b43..705aa3386ee0 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
@@ -2392,7 +2392,7 @@ static void rt2800_config_channel_rf55xx(struct rt2x00_dev *rt2x00dev, | |||
2392 | rt2800_rfcsr_write(rt2x00dev, 49, rfcsr); | 2392 | rt2800_rfcsr_write(rt2x00dev, 49, rfcsr); |
2393 | 2393 | ||
2394 | rt2800_rfcsr_read(rt2x00dev, 50, &rfcsr); | 2394 | rt2800_rfcsr_read(rt2x00dev, 50, &rfcsr); |
2395 | if (info->default_power1 > power_bound) | 2395 | if (info->default_power2 > power_bound) |
2396 | rt2x00_set_field8(&rfcsr, RFCSR50_TX, power_bound); | 2396 | rt2x00_set_field8(&rfcsr, RFCSR50_TX, power_bound); |
2397 | else | 2397 | else |
2398 | rt2x00_set_field8(&rfcsr, RFCSR50_TX, info->default_power2); | 2398 | rt2x00_set_field8(&rfcsr, RFCSR50_TX, info->default_power2); |