From: Larry Finger <larry.finger@lwfinger.net>
To: "Cahill, Ben M" <ben.m.cahill@intel.com>
Cc: Jiri Benc <jbenc@suse.cz>,
benmcahill@gmail.com, flamingice@sourmilk.net,
linux-wireless@vger.kernel.org
Subject: [RFC/T] mac80211: Remove overly "sticky" averaging filters for rssi, signal, noise.
Date: Fri, 13 Jul 2007 13:52:15 -0500 [thread overview]
Message-ID: <4697C9DF.2030200@lwfinger.net> (raw)
In-Reply-To: <4220499A1B034C4FA93B547BA01E1FF0017461F8@orsmsx413.amr.corp.intel.com>
[-- Attachment #1: Type: text/plain, Size: 1439 bytes --]
As has been discussed on the wireless list, the averaging in the current version
of mac80211 has a bug. This trial patch is to see if removing averaging leads to
wireless statistics that are too jittery to be useful.
If you are using a mac80211-based driver, please test and report your findings.
Thanks,
Larry
------ patch follows ------
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
test patch removes all averaging for testing if averaging is needed.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
Index: wireless-dev/net/mac80211/ieee80211.c
===================================================================
--- wireless-dev.orig/net/mac80211/ieee80211.c
+++ wireless-dev/net/mac80211/ieee80211.c
@@ -3615,12 +3615,9 @@ ieee80211_rx_h_sta_process(struct ieee80
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
---
[-- Attachment #2: mac80211_no_average --]
[-- Type: text/plain, Size: 1088 bytes --]
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
test patch removes all averaging for testing if averaging is needed.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
Index: wireless-dev/net/mac80211/ieee80211.c
===================================================================
--- wireless-dev.orig/net/mac80211/ieee80211.c
+++ wireless-dev/net/mac80211/ieee80211.c
@@ -3615,12 +3615,9 @@ ieee80211_rx_h_sta_process(struct ieee80
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
next prev parent reply other threads:[~2007-07-13 18:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-10 23:05 [PATCH 1/1] mac80211: Replace overly "sticky" averaging filters for rssi, signal, noise benmcahill
2007-07-11 0:25 ` Jiri Benc
2007-07-11 4:59 ` Cahill, Ben M
2007-07-12 22:03 ` Johannes Berg
2007-07-13 15:23 ` Jiri Benc
2007-07-13 17:54 ` Larry Finger
2007-07-13 18:19 ` Cahill, Ben M
2007-07-13 18:52 ` Larry Finger [this message]
2007-07-25 18:52 ` [RFC/T] mac80211: Remove " Cahill, Ben M
2007-07-12 21:15 ` [PATCH 1/1] mac80211: Replace " Johannes Berg
2007-07-25 18:50 ` [PATCH 1/1] mac80211: Replace overly "sticky" averagingfilters " Cahill, Ben M
2007-07-26 15:17 ` Johannes Berg
2007-07-26 16:41 ` [PATCH 1/1] mac80211: Replace overly "sticky" averagingfiltersfor " Cahill, Ben M
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4697C9DF.2030200@lwfinger.net \
--to=larry.finger@lwfinger.net \
--cc=ben.m.cahill@intel.com \
--cc=benmcahill@gmail.com \
--cc=flamingice@sourmilk.net \
--cc=jbenc@suse.cz \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.