diff options
| author | Jouni Malinen <jouni@qca.qualcomm.com> | 2013-10-25 16:07:30 +0530 |
|---|---|---|
| committer | Sandeep Puligilla <spuligil@codeaurora.org> | 2013-10-25 16:07:42 +0530 |
| commit | d14765fb4313a79a45e15e72ee130a264d1b0f13 (patch) | |
| tree | 4844cdbe4a0273a089bed74b378bb5892730ea88 | |
| parent | 94719a1e8c45a208f73cda79f14fbb2dc5b69423 (diff) | |
| download | android_external_wpa_supplicant_8-d14765fb4313a79a45e15e72ee130a264d1b0f13.tar.gz android_external_wpa_supplicant_8-d14765fb4313a79a45e15e72ee130a264d1b0f13.tar.bz2 android_external_wpa_supplicant_8-d14765fb4313a79a45e15e72ee130a264d1b0f13.zip | |
Fix ENABLE_NETWORK not to reconnect in disconnected state
DISCONNECT followed by ENABLE_NETWORK ended up starting a scan for a new
connection due to wpa_supplicant_enable_one_network() setting
wpa_s->reassociate = 1. This was done regardless of wpa_s->disconnected
being 1 which should imply that wpa_supplicant should not try to connect
before asked explicitly with REASSOCIATE or RECONNECT.
Fix this by making ENABLE_NETWORK setting of reassociate = 1 and
starting of scans for connection conditional on wpa_s->disconnected ==
0. This will make ENABLE_NETWORK trigger a connection only if
wpa_supplicant is already in a state where it would try to connect if
there are any enabled networks.
Change-Id: I3f15688d7016551219182e6f8e751941b6340aa6
CRs-Fixed: 564226
Git-commit:d2592497624d7dff53e71cc01fc2d5db1e59733e
Git-repo: git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
| -rw-r--r-- | wpa_supplicant/wpa_supplicant.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c index 80f2d67d..bab3ccd1 100644 --- a/wpa_supplicant/wpa_supplicant.c +++ b/wpa_supplicant/wpa_supplicant.c @@ -1807,7 +1807,7 @@ static void wpa_supplicant_enable_one_network(struct wpa_supplicant *wpa_s, * Try to reassociate since there is no current configuration and a new * network was made available. */ - if (!wpa_s->current_ssid) + if (!wpa_s->current_ssid && !wpa_s->disconnected) wpa_s->reassociate = 1; } @@ -1828,7 +1828,7 @@ void wpa_supplicant_enable_network(struct wpa_supplicant *wpa_s, } else wpa_supplicant_enable_one_network(wpa_s, ssid); - if (wpa_s->reassociate) { + if (wpa_s->reassociate && !wpa_s->disconnected) { if (wpa_s->sched_scanning) { wpa_printf(MSG_DEBUG, "Stop ongoing sched_scan to add " "new network to scan filters"); |
