]> git.baikalelectronics.ru Git - kernel.git/commit
ath9k: fix TX power reporting on AR9003 chips
authorGabor Juhos <juhosg@openwrt.org>
Wed, 18 Apr 2012 20:23:38 +0000 (22:23 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 23 Apr 2012 19:34:06 +0000 (15:34 -0400)
commitf0490d87b1a76d9d5ca34f2193c5ea52f38d76b7
tree640d28f99e4eb1f9dfb45e6f3468b8541224bc03
parentc862fd1da0f51e67ca4e490ddc7e51827ebcd72e
ath9k: fix TX power reporting on AR9003 chips

The current code unconditionally reads the target
power values for all modes from the EEPROM. However
In 'ar9003_hw_set_power_per_rate_table' the regulatory
caps are applied only on a mode specific subset of the
power values.

The reported TX power level is calculated from the
maximum of the power values. Because some of these
values are uncapped in certain cases, the reported
TX power will be wrong.

On the older chipset, we don't have such problems
because only the mode specific subset of the power
levels are retrieved from the EEPROM on those. Do
the same for the AR9003 chips to fix the issue.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c