rt2x00: rt2800lib: fix default TX power values for RT3593
commitfc739cfe0f305647677edbf99a76d9ece96e3795
authorGabor Juhos <juhosg@openwrt.org>
Mon, 8 Jul 2013 14:08:24 +0000 (8 16:08 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 22 Jul 2013 20:54:32 +0000 (22 16:54 -0400)
tree4f321a971a6a685ad0bb8220d82880bc82482674
parent97aa03f15e83174df74aa468eea127c5cee480f0
rt2x00: rt2800lib: fix default TX power values for RT3593

The TX power values in the EEPROM are using
a different format for the RT3593 chip. The
default TX power value uses bits 0..4 only.
Bits 5..8 contains value for fine grained
power control. Additionally, the lower and
upper limits of the TX power values are the
same for both bands.

Improve the rt2800_txpower_to_dev function,
in order to compute the correct default power
values for the RT3593 chip as well.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800.h
drivers/net/wireless/rt2x00/rt2800lib.c