Patchwork [3.5.y.z,extended,stable] Patch "rt2800: validate step value for temperature compensation" has been added to staging queue

mail settings
Submitter Herton Ronaldo Krzesinski
Date Dec. 5, 2012, 10:31 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/204009/
State New
Headers show


Herton Ronaldo Krzesinski - Dec. 5, 2012, 10:31 p.m.
This is a note to let you know that I have just added a patch titled

    rt2800: validate step value for temperature compensation

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From ed3f47909659b8d2b88c01b3a722d5a5889b1300 Mon Sep 17 00:00:00 2001
From: Stanislaw Gruszka <>
Date: Thu, 25 Oct 2012 09:51:39 +0200
Subject: [PATCH] rt2800: validate step value for temperature compensation
X-Extended-Stable: 3.5

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 <>
Signed-off-by: Stanislaw Gruszka <>
Acked-by: Ivo van Doorn <>
Signed-off-by: John W. Linville <>
Signed-off-by: Herton Ronaldo Krzesinski <>
 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;