diff options
author | Bruno Randolf <br1@einfach.org> | 2010-12-02 11:12:43 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-07 22:09:12 +0100 |
commit | 541a45a142df281c974d74eac2066138fc107b23 (patch) | |
tree | b96f4808c3f17f2f560db9569ca2b08dba9eab67 /net/mac80211/rx.c | |
parent | iwlwifi: jiffies based tx queues watchdog (diff) | |
download | linux-541a45a142df281c974d74eac2066138fc107b23.tar.xz linux-541a45a142df281c974d74eac2066138fc107b23.zip |
nl80211/mac80211: Report signal average
Extend nl80211 to report an exponential weighted moving average (EWMA) of the
signal value. Since the signal value usually fluctuates between different
packets, an average can be more useful than the value of the last packet.
This uses the recently added generic EWMA library function.
--
v2: fix ABI breakage and change factor to be a power of 2.
Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 6289525c0998..2fe8f5f86499 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -1163,6 +1163,7 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx) sta->rx_fragments++; sta->rx_bytes += rx->skb->len; sta->last_signal = status->signal; + ewma_add(&sta->avg_signal, -status->signal); /* * Change STA power saving mode only at the end of a frame |