aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJulan Hsu <julanhsu@google.com>2019-01-15 15:31:56 -0800
committerJohannes Berg <johannes.berg@intel.com>2019-01-19 09:55:54 +0100
commit67fc05549cdb39f9e02ec4af5cc94509b1f89754 (patch)
tree090ab56101d263a01c167d3dc809415c4227819d /net/mac80211/cfg.c
parentnl80211/mac80211: mesh: add mesh path change count to mpath info (diff)
downloadlinux-dev-67fc05549cdb39f9e02ec4af5cc94509b1f89754.tar.xz
linux-dev-67fc05549cdb39f9e02ec4af5cc94509b1f89754.zip
mac80211: mesh: use average bitrate for link metric calculation
Use bitrate moving average to smooth out link metric and stablize path selection. Signed-off-by: Julan Hsu <julanhsu@google.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index e5e0f100389c..80d8ebc30ded 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1231,6 +1231,11 @@ static void sta_apply_mesh_params(struct ieee80211_local *local,
ieee80211_mps_sta_status_update(sta);
changed |= ieee80211_mps_set_sta_local_pm(sta,
sdata->u.mesh.mshcfg.power_mode);
+
+ ewma_mesh_tx_rate_avg_init(&sta->mesh->tx_rate_avg);
+ /* init at low value */
+ ewma_mesh_tx_rate_avg_add(&sta->mesh->tx_rate_avg, 10);
+
break;
case NL80211_PLINK_LISTEN:
case NL80211_PLINK_BLOCKED: