[PATCH 1/1] P2P: Don't expire the peer, if GO-NEG is in progress

Jithu Jance jithu
Wed Jan 15 02:22:51 PST 2014


Signed-hostap: Jithu Jance <jithu at broadcom.com>
---
 src/p2p/p2p.c |    9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c
index 083a156..e5877d7 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -56,6 +56,15 @@ static void p2p_expire_peers(struct p2p_data *p2p)
 		if (dev->last_seen.sec + P2P_PEER_EXPIRATION_AGE >= now.sec)
 			continue;

+		if (p2p->go_neg_peer && (os_memcmp(p2p->go_neg_peer->info.p2p_device_addr,
+				dev->info.p2p_device_addr, ETH_ALEN) == 0)) {
+			/*
+			 * GO Negotiation is in progress with the Peer. So don't expire the
+			 * Peer till GO-Neg fails or timeout happens
+			 */
+			continue;
+		}
+
 		if (p2p->cfg->go_connected &&
 		    p2p->cfg->go_connected(p2p->cfg->cb_ctx,
 					   dev->info.p2p_device_addr)) {
--
1.7.9.5




More information about the Hostap mailing list