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.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Bruno Randolf
2010-11-16 10:58:48 +09:00
committed by John W. Linville
parent eef39befaa
commit 86107fd170
8 changed files with 18 additions and 1 deletions

View File

@ -244,6 +244,8 @@ struct sta_info *sta_info_alloc(struct ieee80211_sub_if_data *sdata,
sta->local = local;
sta->sdata = sdata;
ewma_init(&sta->avg_signal, 1000, 8);
if (sta_prepare_rate_control(local, sta, gfp)) {
kfree(sta);
return NULL;