From a3c2d12aadd5f90104dc04b3e2db1d246d578444 Mon Sep 17 00:00:00 2001 From: "Kanchanapally, Vidyullatha" Date: Mon, 19 Oct 2015 19:30:34 +0530 Subject: Abort an ongoing scan before connect Connect radio work is sometimes delayed for a considerable duration if there is an ongoing scan radio work. To avoid these delays abort the ongoing scan on that interface before queuing a connect request. Upon a scan done indication from the driver, connect radio work will be scheduled. Signed-off-by: Jouni Malinen Git-commit: 4ead7cfd5d7dfe2f80ffe5b744291b2e149321eb Git-repo : git://w1.fi/srv/git/hostap.git Change-Id: I51d1ea7ba07585d103db88fb9f4819e55c462cfb CRs-fixed: 930855 --- wpa_supplicant/scan.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'wpa_supplicant/scan.c') diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index 00d2b5e1..58b6561d 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -2459,3 +2459,14 @@ int wpas_mac_addr_rand_scan_set(struct wpa_supplicant *wpa_s, wpa_s->mac_addr_rand_enable |= type; return 0; } + + +int wpas_abort_ongoing_scan(struct wpa_supplicant *wpa_s) +{ + if (wpa_s->scan_work && wpa_s->own_scan_running) { + wpa_dbg(wpa_s, MSG_DEBUG, "Abort an ongoing scan"); + return wpa_drv_abort_scan(wpa_s); + } + + return 0; +} -- cgit v1.2.3