diff options
author | Johannes Berg <johannes.berg@intel.com> | 2015-07-13 12:26:46 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-08-14 17:49:53 +0200 |
commit | 40d9a38ad3b7029be9c278738b67cbdb6349ce85 (patch) | |
tree | e71dd40eb0afb147df45a91d36cb69faa3630880 /net/mac80211/sta_info.h | |
parent | 2377799c084d86d22074cd4acd20edc32024d669 (diff) |
mac80211: use DECLARE_EWMA
Instead of using the out-of-line average calculation, use the new
DECLARE_EWMA() macro to declare a signal EWMA, and use that.
This actually *reduces* the code size slightly (on x86-64) while
also reducing the station info size by 80 bytes.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/sta_info.h')
-rw-r--r-- | net/mac80211/sta_info.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index 1d2805c598c0..b087c71ff7fe 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h @@ -320,6 +320,8 @@ struct mesh_sta { unsigned int fail_avg; }; +DECLARE_EWMA(signal, 1024, 8) + /** * struct sta_info - STA information * @@ -462,12 +464,12 @@ struct sta_info { unsigned long rx_fragments; unsigned long rx_dropped; int last_signal; - struct ewma avg_signal; + struct ewma_signal avg_signal; int last_ack_signal; u8 chains; s8 chain_signal_last[IEEE80211_MAX_CHAINS]; - struct ewma chain_signal_avg[IEEE80211_MAX_CHAINS]; + struct ewma_signal chain_signal_avg[IEEE80211_MAX_CHAINS]; /* Plus 1 for non-QoS frames */ __le16 last_seq_ctrl[IEEE80211_NUM_TIDS + 1]; |