Re: [PATCH] supplicant: Allow disabling reassoc based on scan results.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2016-03-22 at 19:12 -0400, greearb@xxxxxxxxxxxxxxx wrote:
> From: Ben Greear <greearb@xxxxxxxxxxxxxxx>
> 
> This gives configurable control over whether to consider
> roaming based on scan results.  I find this useful when
> doing explicit roaming tests, where I do not want scan
> requests to cause the roam automatically.

Manually triggered ones, or *all* scan requests even background ones?

Dan

> Signed-off-by: Ben Greear <greearb@xxxxxxxxxxxxxxx>
> ---
>  wpa_supplicant/config.c | 6 ++++++
>  wpa_supplicant/config.h | 9 +++++++++
>  wpa_supplicant/events.c | 6 ++++++
>  3 files changed, 21 insertions(+)
> 
> diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
> index 83703a0..298d910 100644
> --- a/wpa_supplicant/config.c
> +++ b/wpa_supplicant/config.c
> @@ -3644,6 +3644,9 @@ struct wpa_config *
> wpa_config_alloc_empty(const char *ctrl_interface,
>  	if (driver_param)
>  		config->driver_param = os_strdup(driver_param);
>  
> +#ifndef CONFIG_NO_ROAMING
> +	config->disable_ess_roaming = DEFAULT_DISABLE_ESS_ROAMING;
> +#endif
>  	config->concurrent_assoc_ok = DEFAULT_CONCURRENT_ASSOC_OK;
>  	config->accept_external_scan_results =
> DEFAULT_ACCEPT_EXTERNAL_SCAN_RESULTS;
>  
> @@ -4335,6 +4338,9 @@ static const struct global_parse_data
> global_fields[] = {
>  	{ INT(sched_scan_interval), 0 },
>  	{ INT(tdls_external_control), 0},
>  	{ STR(osu_dir), 0 },
> +#ifndef CONFIG_NO_ROAMING
> +	{ INT(disable_ess_roaming), 0 },
> +#endif
>  	{ INT(concurrent_assoc_ok), 0 },
>  	{ INT(accept_external_scan_results), 0 },
>  	{ STR(wowlan_triggers), 0 },
> diff --git a/wpa_supplicant/config.h b/wpa_supplicant/config.h
> index 81ed410..b04f4a5 100644
> --- a/wpa_supplicant/config.h
> +++ b/wpa_supplicant/config.h
> @@ -33,6 +33,7 @@
>  #define DEFAULT_BSS_EXPIRATION_SCAN_COUNT 2
>  #define DEFAULT_MIN_SCAN_GAP 0
>  #define DEFAULT_MAX_ASSOC_PER_SCAN 25
> +#define DEFAULT_DISABLE_ESS_ROAMING 0
>  #define DEFAULT_CONCURRENT_ASSOC_OK 0
>  #define DEFAULT_ACCEPT_EXTERNAL_SCAN_RESULTS 0
>  #define DEFAULT_MAX_NUM_STA 128
> @@ -857,6 +858,14 @@ struct wpa_config {
>  	 */
>  	unsigned int changed_parameters;
>  
> +#ifndef CONFIG_NO_ROAMING
> +	/* If CONFIG_NO_ROAMING is not enabled, then scan results
> will
> +	 * be used to automatically roam.  Allow disabling this
> automated
> +	 * roaming without having to re-build the binary.
> +	 */
> +	int disable_ess_roaming;
> +#endif
> +
>  	/* By default, scans are no longer shared once one of the
> stations starts
>  	 * to associate.  This makes bringing up lots of vifs take a
> long time.
>  	 * This override below lets us propagate scans even if a
> station is
> diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
> index 1adf57d..2d2c29e 100644
> --- a/wpa_supplicant/events.c
> +++ b/wpa_supplicant/events.c
> @@ -1391,6 +1391,12 @@ static int wpa_supplicant_need_to_roam(struct
> wpa_supplicant *wpa_s,
>  		return 1; /* current BSS not seen in the last scan
> */
>  
>  #ifndef CONFIG_NO_ROAMING
> +	if (wpa_s->conf->disable_ess_roaming) {
> +		wpa_dbg(wpa_s, MSG_DEBUG,
> +			"NOT considering within-ESS reassociation,
> disable_ess_roaming is true");
> +		return 0;
> +	}
> +
>  	wpa_dbg(wpa_s, MSG_DEBUG, "Considering within-ESS
> reassociation");
>  	wpa_dbg(wpa_s, MSG_DEBUG, "Current BSS: " MACSTR
>  		" level=%d snr=%d est_throughput=%u",

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap




[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux