All of lore.kernel.org
 help / color / mirror / Atom feed
From: John W. Linville <linville@tuxdriver.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] signed vs unsigned bug in ath9k
Date: Tue, 8 Dec 2009 09:42:10 -0500	[thread overview]
Message-ID: <20091208144209.GC15172@tuxdriver.com> (raw)
In-Reply-To: <20091208082031.GA29753@bicker>

On Tue, Dec 08, 2009 at 10:20:32AM +0200, Dan Carpenter wrote:
> On Mon, Dec 07, 2009 at 07:55:42AM -0800, Luis R. Rodriguez wrote:
> > On Mon, Dec 07, 2009 at 03:07:36AM -0800, Dan Carpenter wrote:
> > > drivers/net/wireless/ath/ath9k/recv.c
> > >    205          sta = ieee80211_find_sta(sc->hw, hdr->addr2);
> > >    206          if (sta) {
> > >    207                  an = (struct ath_node *) sta->drv_priv;
> > >    208                  if (ds->ds_rxstat.rs_rssi != ATH9K_RSSI_BAD &&
> > > 
> > > ds->ds_rxstat.rs_rssi is a signed 8 bit so it will never be == ATH9K_RSSI_BAD.
> > 
> > ATH9K_RSSI_BAD is -128 and the minimum value for int8_t is -128 so why is it a bug?
> > 
> 
> It could be that someone fixed this already in the net tree?  In mainline it's still
> positive 128.
> 
> #define ATH9K_RSSI_BAD                  0x80

I queued a patch to fix that for 2.6.33.

Hth!

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville at tuxdriver.com			might be all we have.  Be ready.

WARNING: multiple messages have this Message-ID (diff)
From: "John W. Linville" <linville@tuxdriver.com>
To: Dan Carpenter <error27@gmail.com>
Cc: "Luis R. Rodriguez" <lrodriguez@atheros.com>,
	"ath9k-devel@lists.ath9k.org" <ath9k-devel@lists.ath9k.org>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	Luis Rodriguez <Luis.Rodriguez@Atheros.com>,
	Jouni Malinen <Jouni.Malinen@Atheros.com>,
	Vasanth Thiagarajan <Vasanth.Thiagarajan@Atheros.com>,
	Senthilkumar Balasubramanian
	<Senthilkumar.Balasubramanian@Atheros.com>,
	Sujith Manoharan <Sujith.Manoharan@Atheros.com>
Subject: Re: signed vs unsigned bug in ath9k
Date: Tue, 8 Dec 2009 09:42:10 -0500	[thread overview]
Message-ID: <20091208144209.GC15172@tuxdriver.com> (raw)
In-Reply-To: <20091208082031.GA29753@bicker>

On Tue, Dec 08, 2009 at 10:20:32AM +0200, Dan Carpenter wrote:
> On Mon, Dec 07, 2009 at 07:55:42AM -0800, Luis R. Rodriguez wrote:
> > On Mon, Dec 07, 2009 at 03:07:36AM -0800, Dan Carpenter wrote:
> > > drivers/net/wireless/ath/ath9k/recv.c
> > >    205          sta = ieee80211_find_sta(sc->hw, hdr->addr2);
> > >    206          if (sta) {
> > >    207                  an = (struct ath_node *) sta->drv_priv;
> > >    208                  if (ds->ds_rxstat.rs_rssi != ATH9K_RSSI_BAD &&
> > > 
> > > ds->ds_rxstat.rs_rssi is a signed 8 bit so it will never be == ATH9K_RSSI_BAD.
> > 
> > ATH9K_RSSI_BAD is -128 and the minimum value for int8_t is -128 so why is it a bug?
> > 
> 
> It could be that someone fixed this already in the net tree?  In mainline it's still
> positive 128.
> 
> #define ATH9K_RSSI_BAD                  0x80

I queued a patch to fix that for 2.6.33.

Hth!

John
-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

  reply	other threads:[~2009-12-08 14:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-07 11:07 [ath9k-devel] signed vs unsigned bug in ath9k Dan Carpenter
2009-12-07 15:55 ` Luis R. Rodriguez
2009-12-08  8:20   ` Dan Carpenter
2009-12-08  8:20     ` Dan Carpenter
2009-12-08 14:42     ` John W. Linville [this message]
2009-12-08 14:42       ` John W. Linville
2009-12-08 16:08       ` [ath9k-devel] " Dan Carpenter
2009-12-08 16:08         ` Dan Carpenter

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=20091208144209.GC15172@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=ath9k-devel@lists.ath9k.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.