From: Larry Finger Date: Tue, 28 Aug 2007 21:01:55 +0000 (-0400) Subject: [MAC80211]: Remove overly sticky averaging filters for rssi, signal, noise X-Git-Tag: v3.12-rc1~26468^2~720 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6c55aa97359af4b503a8baf914de48f2406a895f;p=kernel%2Fkernel-generic.git [MAC80211]: Remove overly sticky averaging filters for rssi, signal, noise The current version of wireless statistics contains a bug in the averaging that makes the numbers be too sticky and not react to small changes. This patch removes all averaging. Signed-off-by: Larry Finger Signed-off-by: Jiri Benc Signed-off-by: John W. Linville Signed-off-by: Johannes Berg Acked-by: Michael Wu Signed-off-by: John W. Linville Signed-off-by: David S. Miller --- diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index ba94f58..e2c6f5c 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -485,12 +485,9 @@ ieee80211_rx_h_sta_process(struct ieee80211_txrx_data *rx) sta->rx_fragments++; sta->rx_bytes += rx->skb->len; - sta->last_rssi = (sta->last_rssi * 15 + - rx->u.rx.status->ssi) / 16; - sta->last_signal = (sta->last_signal * 15 + - rx->u.rx.status->signal) / 16; - sta->last_noise = (sta->last_noise * 15 + - rx->u.rx.status->noise) / 16; + sta->last_rssi = rx->u.rx.status->ssi; + sta->last_signal = rx->u.rx.status->signal; + sta->last_noise = rx->u.rx.status->noise; if (!(rx->fc & IEEE80211_FCTL_MOREFRAGS)) { /* Change STA power saving mode only in the end of a frame