diff options
author | Bruno Randolf <br1@einfach.org> | 2010-12-02 19:12:43 +0900 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-07 16:09:12 -0500 |
commit | 541a45a142df281c974d74eac2066138fc107b23 (patch) | |
tree | b96f4808c3f17f2f560db9569ca2b08dba9eab67 /net/mac80211/sta_info.h | |
parent | 22de94de7de78b8de2fb1f2df5aa85b5556cfcfd (diff) | |
download | op-kernel-dev-541a45a142df281c974d74eac2066138fc107b23.zip op-kernel-dev-541a45a142df281c974d74eac2066138fc107b23.tar.gz |
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/sta_info.h')
-rw-r--r-- | net/mac80211/sta_info.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index 05f1130..fdca52c 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h @@ -13,6 +13,7 @@ #include <linux/types.h> #include <linux/if_ether.h> #include <linux/workqueue.h> +#include <linux/average.h> #include "key.h" /** @@ -223,6 +224,7 @@ enum plink_state { * @rx_fragments: number of received MPDUs * @rx_dropped: number of dropped MPDUs from this STA * @last_signal: signal of last received frame from this STA + * @avg_signal: moving average of signal of received frames from this STA * @last_seq_ctrl: last received seq/frag number from this STA (per RX queue) * @tx_filtered_count: number of frames the hardware filtered for this STA * @tx_retry_failed: number of frames that failed retry @@ -291,6 +293,7 @@ struct sta_info { unsigned long rx_fragments; unsigned long rx_dropped; int last_signal; + struct ewma avg_signal; __le16 last_seq_ctrl[NUM_RX_DATA_QUEUES]; /* Updated from TX status path only, no locking requirements */ |