From: Masashi Honma <masashi.honma@gmail.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org, Masashi Honma <masashi.honma@gmail.com>
Subject: [PATCH v2] mac80211: Use rssi_threshold even though user_mpm=1
Date: Fri, 17 Mar 2017 14:59:44 +0900 [thread overview]
Message-ID: <1489730384-2799-1-git-send-email-masashi.honma@gmail.com> (raw)
In-Reply-To: <1489629438-7087-1-git-send-email-masashi.honma@gmail.com>
Previously the meshcfg.rssi_threshold did not work with user_mpm=1.
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
---
net/mac80211/mesh.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 6e7b6a0..281d834 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -1100,8 +1100,14 @@ static void ieee80211_mesh_rx_bcn_presp(struct ieee80211_sub_if_data *sdata,
if (!channel || channel->flags & IEEE80211_CHAN_DISABLED)
return;
- if (mesh_matches_local(sdata, &elems))
- mesh_neighbour_update(sdata, mgmt->sa, &elems);
+ if (mesh_matches_local(sdata, &elems)) {
+ mpl_dbg(sdata, "rssi_threshold=%d,rx_status->signal=%d\n",
+ sdata->u.mesh.mshcfg.rssi_threshold, rx_status->signal);
+ if (!sdata->u.mesh.user_mpm ||
+ sdata->u.mesh.mshcfg.rssi_threshold == 0 ||
+ sdata->u.mesh.mshcfg.rssi_threshold < rx_status->signal)
+ mesh_neighbour_update(sdata, mgmt->sa, &elems);
+ }
if (ifmsh->sync_ops)
ifmsh->sync_ops->rx_bcn_presp(sdata,
--
2.7.4
next prev parent reply other threads:[~2017-03-17 6:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-16 1:57 [PATCH 1/2] nl80211: Use signed function for a signed variable Masashi Honma
2017-03-16 1:57 ` [PATCH 2/2] mac80211: Drop new node with weak power Masashi Honma
2017-03-16 10:03 ` Johannes Berg
2017-03-17 5:56 ` Masashi Honma
2017-03-17 12:28 ` Johannes Berg
2017-03-20 6:39 ` Masashi Honma
2017-03-29 8:26 ` Johannes Berg
2017-03-16 9:55 ` [PATCH 1/2] nl80211: Use signed function for a signed variable Johannes Berg
2017-03-17 5:59 ` Masashi Honma [this message]
2017-03-26 20:53 ` [PATCH v2] mac80211: Use rssi_threshold even though user_mpm=1 Masashi Honma
2017-03-29 8:29 ` 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=1489730384-2799-1-git-send-email-masashi.honma@gmail.com \
--to=masashi.honma@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.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).