[PATCH 01/23] P2P: Cancel extended listen on p2p_flush()

Ilan Peer ilan.peer
Thu Sep 24 10:37:51 PDT 2015


From: Andrei Otcheretianski <andrei.otcheretianski at intel.com>

It is expected that p2p_flush() should stop any ongoing p2p operation.
However, this was not the case with extended listen which was not cancelled
on p2p_flush() flows. Fix this, by cancelling the extended listen in
p2p_flush().

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski at intel.com>
---
 src/p2p/p2p.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index 767706c..c876f19 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -2944,7 +2944,6 @@ void p2p_deinit(struct p2p_data *p2p)
 	wpabuf_free(p2p->wfd_coupled_sink_info);
 #endif /* CONFIG_WIFI_DISPLAY */
 
-	eloop_cancel_timeout(p2p_ext_listen_timeout, p2p, NULL);
 	eloop_cancel_timeout(p2p_scan_timeout, p2p, NULL);
 	eloop_cancel_timeout(p2p_go_neg_start, p2p, NULL);
 	eloop_cancel_timeout(p2p_go_neg_wait_timeout, p2p, NULL);
@@ -2971,6 +2970,8 @@ void p2p_deinit(struct p2p_data *p2p)
 void p2p_flush(struct p2p_data *p2p)
 {
 	struct p2p_device *dev, *prev;
+
+	p2p_ext_listen(p2p, 0, 0);
 	p2p_stop_find(p2p);
 	dl_list_for_each_safe(dev, prev, &p2p->devices, struct p2p_device,
 			      list) {
-- 
1.9.1




More information about the Hostap mailing list