diff options
author | Hu Wang <huw@qti.qualcomm.com> | 2017-03-01 14:39:30 (GMT) |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2017-03-01 14:39:30 (GMT) |
commit | 57d3c5913aa2789e06311b99c2ab2c453f1f29f7 (patch) | |
tree | d09d615eee21d859ee99a91fa2c9d4eabb537ef6 /wpa_supplicant/scan.c | |
parent | c97d7c2a60b2510a31bc5a0f58eaf533ee5bdf7f (diff) | |
download | hostap-57d3c5913aa2789e06311b99c2ab2c453f1f29f7.zip hostap-57d3c5913aa2789e06311b99c2ab2c453f1f29f7.tar.gz hostap-57d3c5913aa2789e06311b99c2ab2c453f1f29f7.tar.bz2 |
Clear scan_res_handler on no-retry failure
Previously it was possible for wpa_s->scan_res_handler to remain set to
its old value in case wpa_drv_scan() failed and no retry for the scan
trigger was scheduled (i.e., when last_scan_req == MANUAL_SCAN_REQ).
This could result in getting stuck with the next connection attempt
after a failed "SCAN TYPE=ONLY" operation when wpa_s->scan_res_handler
was set to scan_only_handler().
Fix this by clearing wpa_s->scan_res_handler if wpa_drv_scan() fails and
no retry is scheduled.
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/scan.c')
-rw-r--r-- | wpa_supplicant/scan.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index f3ff4cd..f59f5e8 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -208,6 +208,9 @@ static void wpas_trigger_scan_cb(struct wpa_radio_work *work, int deinit) /* Restore scan_req since we will try to scan again */ wpa_s->scan_req = wpa_s->last_scan_req; wpa_supplicant_req_scan(wpa_s, 1, 0); + } else if (wpa_s->scan_res_handler) { + /* Clear the scan_res_handler */ + wpa_s->scan_res_handler = NULL; } return; } |