]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: use DECLARE_EWMA for mesh_fail_avg
authorManoharan, Rajkumar <rmanohar@qca.qualcomm.com>
Tue, 14 Feb 2017 20:27:16 +0000 (12:27 -0800)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 6 Mar 2017 08:21:21 +0000 (09:21 +0100)
commit4c6009dc6ca835a6a67892de2447f9dd245649b4
treea65b5465141c89095abf3a7021019b1aeeafba57
parent65a4c9ddb5b3e4dd7781971e5188e79fc4f15e6b
mac80211: use DECLARE_EWMA for mesh_fail_avg

As moving average is not considering fractional part, it will
get stuck at the same level after certain state. For example,
with current values, it can get stuck at 96. Fortunately the
current threshold 95%, but if it were increased to 96 or more
mesh paths would never be deactivated. Fix failure average
movement by using EWMA helpers, which does take into account
fractional parts.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
[johannes: pick a larger EWMA factor for more precision with
 the limited range that we will feed into it, adjust to new API]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mesh_hwmp.c
net/mac80211/mesh_pathtbl.c
net/mac80211/sta_info.h