[PATCH v2 1/2] mesh: Make NL80211_MESHCONF_RSSI_THRESHOLD configurable

Jouni Malinen j at w1.fi
Sat Apr 1 01:45:32 PDT 2017


On Thu, Mar 30, 2017 at 03:53:45PM +0900, Masashi Honma wrote:
> On 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.

> diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
> @@ -8774,7 +8774,9 @@ 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)) ||
> +	    (nla_put_u32(msg, NL80211_MESHCONF_RSSI_THRESHOLD,
> +			 params->rssi_threshold)))
>  		return -1;

So this is going the opposite direction of what I was thinking of, i.e.,
hardcoding NL80211_MESHCONF_RSSI_THRESHOLD to be set regardless of
whether this was configured in wpa_supplicant. Do we really want to do
this instead of leaving the kernel to use its default value if the new
mesh_rssi_threshold parameter is not explicitly set?

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list