aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJithu Jance <jithu@broadcom.com>2014-01-15 15:52:51 +0530
committerSteve Kondik <shade@chemlab.org>2014-06-12 14:08:00 -0700
commit202938bee4d09a2886af70514b979571e72b2d19 (patch)
tree5f803f3a2eb3744867aacbf2e24c38b1a9178677
parent8aa9fe0efeb787d4694320c61be8e9fc225b3681 (diff)
downloadandroid_external_wpa_supplicant_8-202938bee4d09a2886af70514b979571e72b2d19.tar.gz
android_external_wpa_supplicant_8-202938bee4d09a2886af70514b979571e72b2d19.tar.bz2
android_external_wpa_supplicant_8-202938bee4d09a2886af70514b979571e72b2d19.zip
P2P: Don't expire the peer, if GO Negotiation is in progress
This adds one more case of active P2P peer detection so that p2p_expire_peers() cannot hit a case where a GO Negotiation peer would be removed. Signed-hostap: Jithu Jance <jithu@broadcom.com> Git-commit: a691d99ff58e7b0f6cbc2aacfbde7ac985538483 Git-repo : git://w1.fi/srv/git/hostap.git Change-Id: I0b81958298aecef1c42e0ab3fd3060cd0a10b3f3 CRs-fixed: 620842
-rw-r--r--src/p2p/p2p.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index ca3b7c5b..de19b48d 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -88,6 +88,15 @@ static void p2p_expire_peers(struct p2p_data *p2p)
if (dev->last_seen.sec + P2P_PEER_EXPIRATION_AGE >= now.sec)
continue;
+ if (dev == p2p->go_neg_peer) {
+ /*
+ * GO Negotiation is in progress with the peer, so
+ * don't expire the peer entry until GO Negotiation
+ * fails or times out.
+ */
+ continue;
+ }
+
if (p2p->cfg->go_connected &&
p2p->cfg->go_connected(p2p->cfg->cb_ctx,
dev->info.p2p_device_addr)) {