diff options
author | Johannes Berg <johannes.berg@intel.com> | 2017-02-15 09:49:26 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-03-02 08:32:46 +0100 |
commit | eb1e011a14748a1d9df9a7d7df9a5711721a1bdb (patch) | |
tree | 599710c96a23bcbc25423cb0a99696dd0b257c7b /net/mac80211 | |
parent | 48cac18ecf1de82f76259a54402c3adb7839ad01 (diff) | |
download | linux-eb1e011a14748a1d9df9a7d7df9a5711721a1bdb.tar.gz linux-eb1e011a14748a1d9df9a7d7df9a5711721a1bdb.tar.bz2 linux-eb1e011a14748a1d9df9a7d7df9a5711721a1bdb.zip |
average: change to declare precision, not factor
Declaring the factor is counter-intuitive, and people are prone
to using small(-ish) values even when that makes no sense.
Change the DECLARE_EWMA() macro to take the fractional precision,
in bits, rather than a factor, and update all users.
While at it, add some more documentation.
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 2 | ||||
-rw-r--r-- | net/mac80211/sta_info.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 159a1a733725..0e718437d080 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -428,7 +428,7 @@ struct ieee80211_sta_tx_tspec { bool downgraded; }; -DECLARE_EWMA(beacon_signal, 16, 4) +DECLARE_EWMA(beacon_signal, 4, 4) struct ieee80211_if_managed { struct timer_list timer; diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index 15599c70a38f..e65cda34d2bc 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h @@ -372,7 +372,7 @@ struct mesh_sta { unsigned int fail_avg; }; -DECLARE_EWMA(signal, 1024, 8) +DECLARE_EWMA(signal, 10, 8) struct ieee80211_sta_rx_stats { unsigned long packets; |