Thread (255 messages) 255 messages, 5 authors, 2013-01-14
STALE4945d REVIEWED: 1 (0M)

1 review trailer.

[PATCH 028/241] rt2800: validate step value for temperature compensation

From: Herton Ronaldo Krzesinski <hidden>
Date: 2012-12-13 15:07:24
Also in: lkml
Subsystem: networking drivers (wireless), the rest · Maintainers: Johannes Berg, Linus Torvalds

3.5.7.2 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Stanislaw Gruszka <redacted>

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 <redacted>
Signed-off-by: Stanislaw Gruszka <redacted>
Acked-by: Ivo van Doorn <redacted>
Signed-off-by: John W. Linville <redacted>
Signed-off-by: Herton Ronaldo Krzesinski <redacted>
---
 drivers/net/wireless/rt2x00/rt2800lib.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index dfc90d3..a15bf1c 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -2255,7 +2255,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.9.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help