aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorBruno Randolf <br1@einfach.org>2010-11-15 20:58:48 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-11-18 14:22:20 -0500
commit86107fd170bc379869250eb7e1bd393a3a70e8ae (patch)
tree579ee24be87e94246450420f4de57d8eda942848 /net/wireless
parenteef39befaae2a1559efe197d795c376a317af2af (diff)
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>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/nl80211.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 605553842226..d06a40d17002 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1872,6 +1872,9 @@ static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq,
1872 if (sinfo->filled & STATION_INFO_SIGNAL) 1872 if (sinfo->filled & STATION_INFO_SIGNAL)
1873 NLA_PUT_U8(msg, NL80211_STA_INFO_SIGNAL, 1873 NLA_PUT_U8(msg, NL80211_STA_INFO_SIGNAL,
1874 sinfo->signal); 1874 sinfo->signal);
1875 if (sinfo->filled & STATION_INFO_SIGNAL_AVG)
1876 NLA_PUT_U8(msg, NL80211_STA_INFO_SIGNAL_AVG,
1877 sinfo->signal_avg);
1875 if (sinfo->filled & STATION_INFO_TX_BITRATE) { 1878 if (sinfo->filled & STATION_INFO_TX_BITRATE) {
1876 txrate = nla_nest_start(msg, NL80211_STA_INFO_TX_BITRATE); 1879 txrate = nla_nest_start(msg, NL80211_STA_INFO_TX_BITRATE);
1877 if (!txrate) 1880 if (!txrate)