aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/p2p_supplicant.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/p2p_supplicant.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/p2p_supplicant.c')
-rw-r--r--wpa_supplicant/p2p_supplicant.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 3e31f41..cf2653d 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -2389,6 +2389,10 @@ static void wpas_dev_lost(void *ctx, const u8 *dev_addr)
static void wpas_find_stopped(void *ctx)
{
struct wpa_supplicant *wpa_s = ctx;
+
+ if (wpa_s->p2p_scan_work && wpas_abort_ongoing_scan(wpa_s) < 0)
+ wpa_printf(MSG_DEBUG, "P2P: Abort ongoing scan failed");
+
wpa_msg_global(wpa_s, MSG_INFO, P2P_EVENT_FIND_STOPPED);
wpas_notify_p2p_find_stopped(wpa_s);
}