aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/mesh.c
diff options
context:
space:
mode:
authorMasashi Honma <masashi.honma@gmail.com>2017-04-03 22:28:35 (GMT)
committerJouni Malinen <j@w1.fi>2017-05-08 13:23:02 (GMT)
commit31a856a127706c5047038ab0c7c5a07054432ebf (patch)
tree59a371e8c2866f675c9ec42f801c3568142311d6 /wpa_supplicant/mesh.c
parent481fecefec25cea2fdbd95de6f697290c21d47d8 (diff)
downloadhostap-31a856a127706c5047038ab0c7c5a07054432ebf.zip
hostap-31a856a127706c5047038ab0c7c5a07054432ebf.tar.gz
hostap-31a856a127706c5047038ab0c7c5a07054432ebf.tar.bz2
mesh: Make NL80211_MESHCONF_RSSI_THRESHOLD configurable
In some practical cases, it is useful to suppress joining to node in the distance. The new field mesh_rssi_threshold could be used as RSSI threshold for joining. Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
Diffstat (limited to 'wpa_supplicant/mesh.c')
-rw-r--r--wpa_supplicant/mesh.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c
index 01b657e..c0c8f91 100644
--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
@@ -413,6 +413,10 @@ int wpa_supplicant_join_mesh(struct wpa_supplicant *wpa_s,
else if (wpa_s->conf->dtim_period > 0)
params.dtim_period = wpa_s->conf->dtim_period;
params.conf.max_peer_links = wpa_s->conf->max_peer_links;
+ if (ssid->mesh_rssi_threshold < DEFAULT_MESH_RSSI_THRESHOLD) {
+ params.conf.rssi_threshold = ssid->mesh_rssi_threshold;
+ params.conf.flags |= WPA_DRIVER_MESH_CONF_FLAG_RSSI_THRESHOLD;
+ }
if (ssid->key_mgmt & WPA_KEY_MGMT_SAE) {
params.flags |= WPA_DRIVER_MESH_FLAG_SAE_AUTH;