Skip to content

Commit

Permalink
[MAC80211]: Remove overly sticky averaging filters for rssi, signal, …
Browse files Browse the repository at this point in the history
…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 <Larry.Finger@lwfinger.net>
Signed-off-by: Jiri Benc <jbenc@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Larry Finger authored and David S. Miller committed Oct 10, 2007
1 parent e7a64f1 commit 6c55aa9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6c55aa9

Please sign in to comment.