Search Linux Wireless

Re: signed vs unsigned bug in ath9k

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 08, 2009 at 09:42:10AM -0500, John W. Linville wrote:
> 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.
> 

Grand.  Sorry for the noise.  We static checker people are all finding the same
bugs...

I have been trying to buy enough wifi cards to download the latest git, but 
apparently the English gentleman who generates them has been on a week
long drinking binge.  I have been here asking about it on five days out of the 
last seven...  :/

regards,
dan carpenter

> Hth!
> 
> John
> -- 
> John W. Linville		Someday the world will need a hero, and you
> linville@xxxxxxxxxxxxx			might be all we have.  Be ready.
--
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

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux