summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJithu Jance <jithu@broadcom.com>2014-08-19 14:19:38 -0700
committerJouni Malinen <j@w1.fi>2015-10-06 23:11:45 +0300
commit434905e01173e44fad1264ba62c0854caea20bd1 (patch)
treed2dd4f7a08625e6b88b24af3ce9f09c2ffaab7a5
parente1a50207842606c16bfc8805a96f89333d6453cf (diff)
downloadhostap-android-l.tar.gz
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 767706c01..5d6abe301 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)