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>
This commit is contained in:
Masashi Honma 2017-04-04 07:28:35 +09:00 committed by Jouni Malinen
parent 481fecefec
commit 31a856a127
7 changed files with 24 additions and 2 deletions

View file

@ -1388,6 +1388,7 @@ struct wpa_driver_mesh_bss_params {
#define WPA_DRIVER_MESH_CONF_FLAG_PEER_LINK_TIMEOUT 0x00000002
#define WPA_DRIVER_MESH_CONF_FLAG_MAX_PEER_LINKS 0x00000004
#define WPA_DRIVER_MESH_CONF_FLAG_HT_OP_MODE 0x00000008
#define WPA_DRIVER_MESH_CONF_FLAG_RSSI_THRESHOLD 0x00000010
/*
* TODO: Other mesh configuration parameters would go here.
* See NL80211_MESHCONF_* for all the mesh config parameters.
@ -1396,6 +1397,7 @@ struct wpa_driver_mesh_bss_params {
int auto_plinks;
int peer_link_timeout;
int max_peer_links;
int rssi_threshold;
u16 ht_opmode;
};

View file

@ -8870,7 +8870,10 @@ static int nl80211_put_mesh_config(struct nl_msg *msg,
params->auto_plinks)) ||
((params->flags & WPA_DRIVER_MESH_CONF_FLAG_MAX_PEER_LINKS) &&
nla_put_u16(msg, NL80211_MESHCONF_MAX_PEER_LINKS,
params->max_peer_links)))
params->max_peer_links)) ||
((params->flags & WPA_DRIVER_MESH_CONF_FLAG_RSSI_THRESHOLD) &&
nla_put_u32(msg, NL80211_MESHCONF_RSSI_THRESHOLD,
params->rssi_threshold)))
return -1;
/*