aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJithu Jance <jithu@broadcom.com>2014-08-19 21:19:38 (GMT)
committerJouni Malinen <j@w1.fi>2015-10-06 20:11:45 (GMT)
commit434905e01173e44fad1264ba62c0854caea20bd1 (patch)
treed2dd4f7a08625e6b88b24af3ce9f09c2ffaab7a5
parente1a50207842606c16bfc8805a96f89333d6453cf (diff)
downloadhostap-android-l.zip
hostap-android-l.tar.gz
hostap-android-l.tar.bz2
P2P: Clear the discovery state incase of deffered GO Neg responseandroid-l
Bug: 17027752 Change-Id: I7d16080864264b838169f7b477598353c5d61d37 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
-rw-r--r--src/p2p/p2p.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index 767706c..5d6abe3 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -3572,8 +3572,17 @@ static void p2p_go_neg_resp_failure_cb(struct p2p_data *p2p, int success,
struct p2p_device *dev;
dev = p2p_get_device(p2p, addr);
if (dev &&
- dev->status == P2P_SC_FAIL_INFO_CURRENTLY_UNAVAILABLE)
+ dev->status == P2P_SC_FAIL_INFO_CURRENTLY_UNAVAILABLE) {
dev->flags |= P2P_DEV_PEER_WAITING_RESPONSE;
+ if ((p2p->state == P2P_SEARCH) ||
+ (p2p->state == P2P_LISTEN_ONLY)) {
+ /* Clear our search state or Listen state since
+ * now peer is awaiting response from our side.
+ */
+ p2p_dbg(p2p, "Clear the P2P discovery state");
+ p2p_stop_find(p2p);
+ }
+ }
}
if (p2p->state == P2P_SEARCH || p2p->state == P2P_SD_DURING_FIND)