Return-path: Received: from mail.atheros.com ([12.36.123.2]:32413 "EHLO mail.atheros.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753136AbZHGEPW (ORCPT ); Fri, 7 Aug 2009 00:15:22 -0400 Received: from mail.atheros.com ([10.10.20.105]) by sidewinder.atheros.com for ; Thu, 06 Aug 2009 21:15:23 -0700 From: Sujith MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Message-ID: <19067.43624.740010.151237@gargle.gargle.HOWL> Date: Fri, 7 Aug 2009 09:45:36 +0530 To: CC: Subject: [PATCH 12/12] ath9k: Update beacon RSSI Sender: linux-wireless-owner@vger.kernel.org List-ID: ANI uses the beacon RSSI for its operation. Update this properly. Signed-off-by: Sujith --- drivers/net/wireless/ath/ath9k/recv.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index f6a8b1c..1a08c69 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -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; -- 1.6.4