diff options
author | Julan Hsu <julanhsu@google.com> | 2019-01-16 02:31:56 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2019-01-19 11:55:54 +0300 |
commit | 67fc05549cdb39f9e02ec4af5cc94509b1f89754 (patch) | |
tree | 090ab56101d263a01c167d3dc809415c4227819d /net/mac80211/cfg.c | |
parent | 540bbcb930ed2fc9d6a57e0babea00027a7ecc67 (diff) | |
download | linux-67fc05549cdb39f9e02ec4af5cc94509b1f89754.tar.xz |
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.c | 5 |
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: |