rt2800: validate step value for temperature compensation
PATCH 1/1 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]>
Signed-off-by Stanislaw Gruszka <[email protected]>
--- drivers/net/wireless/rt2x00/rt2800lib.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/net/wireless/rt2x00/rt2800lib.c +1 -1
@@ -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 ;/*
Signature · 1 line
1.7.1
Quoted 7 lines · Stanislaw Gruszka
Some hardware has correct (!=
0xff) value of tssi_bounds[4] in the EEPROM, but step is equal to0xff. This results on ridiculous delta calculations and completely broke TX power settings.Reported-and-tested-by Pavel Lucik <[email protected]>Signed-off-by Stanislaw Gruszka <[email protected]>
Acked-by Ivo van Doorn <[email protected]>
Quoted 24 lines
--- drivers/net/wireless/rt2x00/rt2800lib.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/net/wireless/rt2x00/rt2800lib.c +1
-2@@ -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 ;/* -- 1.7.1
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html