aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/scan.c
diff options
context:
space:
mode:
authorBen Rosenfeld <ben.rosenfeld@intel.com>2016-02-29 12:30:04 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-03 15:10:26 (GMT)
commita805731086c3c99fde971e6a62a3fd2eebaf2b8c (patch)
treed273d2bb60b6064685a2da7320b426d3002db150 /wpa_supplicant/scan.c
parent7441698fcf564645e5f62904d3ca44af957060f4 (diff)
downloadhostap-a805731086c3c99fde971e6a62a3fd2eebaf2b8c.zip
hostap-a805731086c3c99fde971e6a62a3fd2eebaf2b8c.tar.gz
hostap-a805731086c3c99fde971e6a62a3fd2eebaf2b8c.tar.bz2
P2P: Abort ongoing scan when p2p_find is stopped
When p2p_find is stopped, send request to the driver in order to cancel an ongoing scan if there is one. Signed-off-by: Ben Rosenfeld <ben.rosenfeld@intel.com>
Diffstat (limited to 'wpa_supplicant/scan.c')
-rw-r--r--wpa_supplicant/scan.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c
index 2ce3929..3463dd9 100644
--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -2544,7 +2544,13 @@ int wpas_mac_addr_rand_scan_set(struct wpa_supplicant *wpa_s,
int wpas_abort_ongoing_scan(struct wpa_supplicant *wpa_s)
{
- if (wpa_s->scan_work && wpa_s->own_scan_running) {
+ int scan_work = !!wpa_s->scan_work;
+
+#ifdef CONFIG_P2P
+ scan_work |= !!wpa_s->p2p_scan_work;
+#endif /* CONFIG_P2P */
+
+ if (scan_work && wpa_s->own_scan_running) {
wpa_dbg(wpa_s, MSG_DEBUG, "Abort an ongoing scan");
return wpa_drv_abort_scan(wpa_s);
}