From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Luigi Tarenga <luigi.tarenga@gmail.com>
Cc: Ivo van Doorn <IvDoorn@gmail.com>,
Gertjan van Wingerde <gwingerde@gmail.com>,
Helmut Schaa <helmut.schaa@googlemail.com>,
linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com
Subject: Re: [PATCH 3.2.2 1/1] rt2800lib: fix wrong -128dBm when signal is stronger than -12dBm
Date: Wed, 1 Feb 2012 16:33:29 +0100 [thread overview]
Message-ID: <20120201153249.GA16461@redhat.com> (raw)
In-Reply-To: <CAKkO-EhQJfKZKTPVZH5-RvPDa8BSrbktEBYPuAHHPvQfhYZzog@mail.gmail.com>
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@gmail.com>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
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.
prev parent reply other threads:[~2012-02-01 15:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-31 17:51 [PATCH 3.2.2 1/1] rt2800lib: fix wrong -128dBm when signal is stronger than -12dBm Luigi Tarenga
2012-02-01 15:33 ` Stanislaw Gruszka [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120201153249.GA16461@redhat.com \
--to=sgruszka@redhat.com \
--cc=IvDoorn@gmail.com \
--cc=gwingerde@gmail.com \
--cc=helmut.schaa@googlemail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=luigi.tarenga@gmail.com \
--cc=users@rt2x00.serialmonkey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).