mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Signed-off-by: John W. Linville <[email protected]>
This commit is contained in:
parent
22de94de7d
commit
541a45a142
8 changed files with 18 additions and 1 deletions
|
|
@ -1896,6 +1896,9 @@ static int nl80211_send_station(struct sk_buff *msg, u32 pid, u32 seq,
|
|||
if (sinfo->filled & STATION_INFO_SIGNAL)
|
||||
NLA_PUT_U8(msg, NL80211_STA_INFO_SIGNAL,
|
||||
sinfo->signal);
|
||||
if (sinfo->filled & STATION_INFO_SIGNAL_AVG)
|
||||
NLA_PUT_U8(msg, NL80211_STA_INFO_SIGNAL_AVG,
|
||||
sinfo->signal_avg);
|
||||
if (sinfo->filled & STATION_INFO_TX_BITRATE) {
|
||||
txrate = nla_nest_start(msg, NL80211_STA_INFO_TX_BITRATE);
|
||||
if (!txrate)
|
||||
|
|
|
|||
Loading…
Reference in a new issue