[RFC] P2P: remove unneeded go_neg_peer check

Johannes Berg johannes
Fri Dec 10 04:32:15 PST 2010


From: Johannes Berg <johannes.berg at intel.com>

When the GO negotiation peer is assigned,
the state also cannot be IDLE, SEARCH or
LISTEN_ONLY.

Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
Hopefully? If this can happen I'm confused ...


 src/p2p/p2p_pd.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/p2p/p2p_pd.c b/src/p2p/p2p_pd.c
index 55341aa..6b6bb49 100644
--- a/src/p2p/p2p_pd.c
+++ b/src/p2p/p2p_pd.c
@@ -332,9 +332,8 @@ int p2p_prov_disc_req(struct p2p_data *p2p, const u8 *peer_addr,
 	else
 		dev->flags &= ~P2P_DEV_PD_FOR_JOIN;
 
-	if (p2p->go_neg_peer ||
-	    (p2p->state != P2P_IDLE && p2p->state != P2P_SEARCH &&
-	     p2p->state != P2P_LISTEN_ONLY)) {
+	if (p2p->state != P2P_IDLE && p2p->state != P2P_SEARCH &&
+	    p2p->state != P2P_LISTEN_ONLY) {
 		wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG, "P2P: Busy with other "
 			"operations; postpone Provision Discovery Request "
 			"with " MACSTR " (config methods 0x%x)",
-- 
1.7.2.3






More information about the Hostap mailing list