Fwd: PATCH: fix getting stuck in p2p_find after PD response

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

It is observed that p2p paring sometimes gets stuck after PD response
because the receiver
does not listen to the following GO-NEG-REQ packets anymore.

This results from removing p2p_check_after_scan_tx_continuation check.
If there is no further post-PD operations, it would get stuck in SEARCH state
unexpectedly since PD receiver does not continue receiving the
following requests.

Thank you for your time and consideration.

Best regards,
Jimmy
From 5ef7aadfa3f95fdc1778e5aa96222cd21d793fea Mon Sep 17 00:00:00 2001
From: Jimmy Chen <jimmycmchen@google.com>
Date: Tue, 15 Oct 2019 15:45:26 +0800
Subject: [PATCH] p2p: continue listening next request if no post-PD operations

If no post-provision discovery operations, it should continue listening
next request or this results in the p2p_find operation getting stopped
(stuck in SEARCH state) unexpectedly.

Bug: 141382930
Test: CtsVerifier - WiFi Direct
Change-Id: I3f4a5f2afcda24297beaef8a1d7e90c5e071e665
Signed-off-by: Jimmy Chen <jimmycmchen@google.com>
---
 src/p2p/p2p.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index e8e25380..03963123 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -3456,12 +3456,18 @@ static void p2p_prov_disc_resp_cb(struct p2p_data *p2p, int success)
 
 	p2p->pending_action_state = P2P_NO_PENDING_ACTION;
 
-	if (!success)
+	if (!success) {
+		if (p2p->state == P2P_SEARCH)
+			p2p_continue_find(p2p);
 		return;
+	}
 
 	if (!p2p->cfg->prov_disc_resp_cb ||
-	    p2p->cfg->prov_disc_resp_cb(p2p->cfg->cb_ctx) < 1)
+	    p2p->cfg->prov_disc_resp_cb(p2p->cfg->cb_ctx) < 1) {
+		if (p2p->state == P2P_SEARCH)
+			p2p_continue_find(p2p);
 		return;
+	}
 
 	p2p_dbg(p2p,
 		"Post-Provision Discovery operations started - do not try to continue other P2P operations");
-- 
2.23.0.700.g56cf767bdb-goog

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap

[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux