mirror of
https://github.com/torvalds/linux.git
synced 2026-06-10 07:32:29 +02:00
rt2800: validate step value for temperature compensation
commit bf7e1abe43 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7bbaeecbff
commit
75d1ac720f
|
|
@ -2235,7 +2235,7 @@ static int rt2800_get_gain_calibration_delta(struct rt2x00_dev *rt2x00dev)
|
|||
/*
|
||||
* Check if temperature compensation is supported.
|
||||
*/
|
||||
if (tssi_bounds[4] == 0xff)
|
||||
if (tssi_bounds[4] == 0xff || step == 0xff)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user