rt2800: validate step value for temperature compensation
authorStanislaw Gruszka <sgruszka@redhat.com>
Thu, 25 Oct 2012 07:51:39 +0000 (09:51 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 16 Nov 2012 16:47:01 +0000 (16:47 +0000)
commita34f5ed64db4412c1f1cd13b11ca3bc7a88d4066
treef60fc5e78d95c15fb4c0eb1c4415bc0040838e07
parentde1e9234c8d6aa740d2c8b6df0bca372663481d9
rt2800: validate step value for temperature compensation

commit bf7e1abe434ba9e22e8dc04a4cba4ab504b788b8 upstream.

Some hardware has correct (!= 0xff) value of tssi_bounds[4] in the
EEPROM, but step is equal to 0xff. This results on ridiculous delta
calculations and completely broke TX power settings.

Reported-and-tested-by: Pavel Lucik <pavel.lucik@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/wireless/rt2x00/rt2800lib.c