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>
This commit is contained in:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user