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 regards, dan carpenter > > 209 !ds->ds_rxstat.rs_moreaggr) > > 210 ATH_RSSI_LPF(an->last_rssi, ds->ds_rxstat.rs_rssi); > > 211 last_rssi = an->last_rssi; > > 212 } > > > > I would normally just change the declaration to unsigned but it looks like > > someone may have chosen to have it signed on purpose. > > Yeah it comes from hardware. > > Luis -- 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