On Fri, Apr 27, 2012 at 03:26:38PM +0300, Bartosz.Markowski@tieto.com wrote:
> When AP signal level is poor, and we lose connection due to e.g.> beacon losses, there's a chance we will try to auto-reconnect to> this AP right after and whole sequence will repeat multiple times.> > This patch adds an option for users to set signal level threshold in> .conf file and skip auto-reconnect, at least until the signal pass> this threshold.
> diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c> @@ -717,6 +717,13 @@ static struct wpa_ssid * wpa_scan_res_match(struct wpa_supplicant *wpa_s,> + if (wpa_s->reassociated_connection &&> + wpa_s->conf->reauth_threshold &&> + (bss->level < wpa_s->conf->reauth_threshold)) {> + wpa_dbg(wpa_s, MSG_DEBUG, " skip - signal to low");> + continue;> + }
That wpa_s->reassociated_connection does not work for figuring out
whether this is a reconnection since it does not seem to be cleared
anywhere (well, ignoring the AP-mode-disable case). I'm actually tempted
to just remove it now that I went through how it is used..
In other words, this would prevent connection below the reauth_threshold
limit even in cases where this is an initial connection to a network.
Was that the purpose of this change or was this supposed to only remove
the continued attempts to reconnect after getting disconnected?

Hi Jouni,
Intention was to prevent the continued attempts to reconnect after getting disconnected, e.g. on a network border.
Regards,
Bartosz
-----Original Message-----
From: hostap-bounces@lists.shmoo.com [mailto:hostap-bounces@lists.shmoo.com] On Behalf Of Jouni Malinen
Sent: 24 czerwca 2012 00:18
To: hostap@lists.shmoo.com
Subject: Re: [PATCH] Adds signal threshold option for auto-reconnect scenarios
That wpa_s->reassociated_connection does not work for figuring out whether this is a reconnection since it does not seem to be cleared anywhere (well, ignoring the AP-mode-disable case). I'm actually tempted to just remove it now that I went through how it is used..
In other words, this would prevent connection below the reauth_threshold limit even in cases where this is an initial connection to a network.
Was that the purpose of this change or was this supposed to only remove the continued attempts to reconnect after getting disconnected?