diff options
author | Felix Fietkau <nbd@nbd.name> | 2016-12-14 20:47:00 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-12-15 11:07:52 +0100 |
commit | 4f0bc9c61bae9c74ffcf5dbdbd241cbf0ec3a44e (patch) | |
tree | 663224eb02449823db0b3ccef21d8deb14867194 /net/mac80211/rc80211_minstrel.c | |
parent | 0217eefa64509d63fbe8d1205310bafb2355cf4d (diff) | |
download | blackbird-op-linux-4f0bc9c61bae9c74ffcf5dbdbd241cbf0ec3a44e.tar.gz blackbird-op-linux-4f0bc9c61bae9c74ffcf5dbdbd241cbf0ec3a44e.zip |
mac80211: minstrel: store probability variance instead of standard deviation
This avoids the costly int_sqrt calls in the statistics update and moves
it to the debugfs code instead.
This also fixes an overflow in the previous standard deviation
calculation.
Signed-off-by: Thomas Huehn <thomas.huehn@evernet-eg.de>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rc80211_minstrel.c')
-rw-r--r-- | net/mac80211/rc80211_minstrel.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c index a284ea08f048..11a4cc393a98 100644 --- a/net/mac80211/rc80211_minstrel.c +++ b/net/mac80211/rc80211_minstrel.c @@ -168,10 +168,10 @@ minstrel_calc_rate_stats(struct minstrel_rate_stats *mrs) mrs->prob_ewma = cur_prob; } else { /* update exponential weighted moving variance */ - mrs->prob_ewmsd = minstrel_ewmsd(mrs->prob_ewmsd, - cur_prob, - mrs->prob_ewma, - EWMA_LEVEL); + mrs->prob_ewmv = minstrel_ewmv(mrs->prob_ewmv, + cur_prob, + mrs->prob_ewma, + EWMA_LEVEL); /*update exponential weighted moving avarage */ mrs->prob_ewma = minstrel_ewma(mrs->prob_ewma, |