aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/sme.c
diff options
context:
space:
mode:
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>2014-02-13 09:24:00 (GMT)
committerJouni Malinen <j@w1.fi>2014-02-15 22:06:23 (GMT)
commitb3253ebb73d6d52ac636c5cc6d958955a5a98fca (patch)
treee89372485cb2632ccb34c9e46d0799c1f76a94f2 /wpa_supplicant/sme.c
parent55497a51a89d3708e9dbd7ced3e83fd80fa18a36 (diff)
downloadhostap-b3253ebb73d6d52ac636c5cc6d958955a5a98fca.zip
hostap-b3253ebb73d6d52ac636c5cc6d958955a5a98fca.tar.gz
hostap-b3253ebb73d6d52ac636c5cc6d958955a5a98fca.tar.bz2
wpa_supplicant: Complete radio works on disable event
While testing rfkill blocking of a scanning interface, it was seen that the ongoing scan never completes. This happens since EVENT_SCAN_RESULTS is discarded on a disabled interface. Fix this and also other possible radio work completion issues by removing all the radio works (including started) of the disabled interface. To be able to remove already started radio works, make their callbacks be reentrant with deinit flag (when the work is started), so each radio work should be able to handle its own termination. Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Diffstat (limited to 'wpa_supplicant/sme.c')
-rw-r--r--wpa_supplicant/sme.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/wpa_supplicant/sme.c b/wpa_supplicant/sme.c
index 451f5ae..e712ac4 100644
--- a/wpa_supplicant/sme.c
+++ b/wpa_supplicant/sme.c
@@ -444,6 +444,9 @@ static void sme_auth_start_cb(struct wpa_radio_work *work, int deinit)
struct wpa_supplicant *wpa_s = work->wpa_s;
if (deinit) {
+ if (work->started)
+ wpa_s->connect_work = NULL;
+
wpas_connect_work_free(cwork);
return;
}