ath9k: Update beacon RSSI
authorSujith <Sujith.Manoharan@atheros.com>
Fri, 7 Aug 2009 04:15:36 +0000 (09:45 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 14 Aug 2009 13:13:35 +0000 (09:13 -0400)
ANI uses the beacon RSSI for its operation.
Update this properly.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/recv.c

index f6a8b1c384ecb385ade2ed0717e986c394e190f3..1a08c694fe5d0edcdbf4b4fceb2643ddc0f1ba51 100644 (file)
@@ -252,6 +252,10 @@ static int ath_rx_prepare(struct sk_buff *skb, struct ath_desc *ds,
        else if (ds->ds_rxstat.rs_rssi > 127)
                ds->ds_rxstat.rs_rssi = 127;
 
+       /* Update Beacon RSSI, this is used by ANI. */
+       if (ieee80211_is_beacon(fc))
+               sc->nodestats.ns_avgbrssi = ds->ds_rxstat.rs_rssi;
+
        rx_status->mactime = ath_extend_tsf(sc, ds->ds_rxstat.rs_tstamp);
        rx_status->band = hw->conf.channel->band;
        rx_status->freq = hw->conf.channel->center_freq;