aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStanislaw Gruszka <[email protected]>2012-10-25 09:51:39 +0200
committerJohn W. Linville <[email protected]>2012-10-30 15:58:54 -0400
commitbf7e1abe434ba9e22e8dc04a4cba4ab504b788b8 (patch)
tree4d982297534533c44b659dfffcfba147d854b0df
parent8c6e30936a7893a85f6222084f0f26aceb81137a (diff)
rt2800: validate step value for temperature compensation
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 <[email protected]> Cc: [email protected] Signed-off-by: Stanislaw Gruszka <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index 01dc8891070c..59474ae0aec0 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -2449,7 +2449,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;
/*