On Tue, Jan 31, 2012 at 06:51:23PM +0100, Luigi Tarenga wrote: > This patch correct the type of variables containing the rssi > values read from the rxwi. > > In function rt2800_agc_to_rssi() 3 variables (rssi0, rssi1, rss2) > defined as int was assigned a 16bit signed values as unsigned. > From a test with a hi-gain antenna I verified that the rxwi > contains signed rssi values in the range -13/+81 (inclusive) > with 0 as an error condition. In case of negative values a > condition is triggered and the function return -128dBm while > the signal is at its maximum. This patch correct the cast so > negative values are not treated as very high positive values > (ex. -13 does not become 243). > > Signed-off-by: Luigi Tarenga <luigi.tarenga@xxxxxxxxx> Reviewed-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx> Description is a bit embroiled, but patch is correct. Since rssi value is exported to user space and can be use i.e to choose to withch AP try to associate, I think this is a -stable sutiable fix. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html