From: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
To: <johannes@sipsolutions.net>
Cc: <linux-wireless@vger.kernel.org>, <rmanohar@codeaurora.org>,
Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Subject: [PATCH 2/2] mac80211: fix mesh fail_avg check
Date: Tue, 14 Feb 2017 12:27:17 -0800 [thread overview]
Message-ID: <1487104037-24941-2-git-send-email-rmanohar@qca.qualcomm.com> (raw)
In-Reply-To: <1487104037-24941-1-git-send-email-rmanohar@qca.qualcomm.com>
Mesh failure average never be more than 100. Only in case of
fixed path, average will be more than threshold limit (95%).
With recent EWMA changes it may go upto 99 as it is scaled to
100. It make sense to return maximum metric when average is
greater than threshold limit.
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
---
net/mac80211/mesh_hwmp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c
index d07ee3ca07ee..02c30a21eb66 100644
--- a/net/mac80211/mesh_hwmp.c
+++ b/net/mac80211/mesh_hwmp.c
@@ -339,7 +339,7 @@ static u32 airtime_link_metric_get(struct ieee80211_local *local,
if (rate) {
err = 0;
} else {
- if (fail_avg >= 100)
+ if (fail_avg >= 95)
return MAX_METRIC;
sta_set_rate_info_tx(sta, &sta->tx_stats.last_rate, &rinfo);
--
1.9.1
next prev parent reply other threads:[~2017-02-14 20:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-14 20:27 [PATCH 1/2] mac80211: use DECLARE_EWMA for mesh_fail_avg Rajkumar Manoharan
2017-02-14 20:27 ` Rajkumar Manoharan [this message]
2017-02-15 8:14 ` [PATCH 2/2] mac80211: fix mesh fail_avg check Johannes Berg
2017-02-15 8:13 ` [PATCH 1/2] mac80211: use DECLARE_EWMA for mesh_fail_avg Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1487104037-24941-2-git-send-email-rmanohar@qca.qualcomm.com \
--to=rmanohar@qca.qualcomm.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=rmanohar@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).