From 3a2a7c3da64563bfff7a0f46e3654f54a1eacbd1 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 1 Mar 2013 11:53:46 +0200 Subject: [PATCH] P2P: Fix regression in GO Negotiation Commit fb8984fd6f4b49d9178dd87a880dd7add514b7d1 cleared wps_method to WPS_NOT_READY in p2p_stop_find_for_freq() as an attempt to clear authorization when a group formation is cancelled. However, this code path is hit also in cases where the user did not actually cancel anything (e.g., from p2p_process_go_neg_req()). As such, it is not fine to clear wps_method here even if it could be proper for some cases. For now, revert that part to avoid regressions and consider clearing wps_method on cancel separately. Signed-hostap: Jouni Malinen --- src/p2p/p2p.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index a1fb7e49f..15df215e3 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -1130,10 +1130,8 @@ void p2p_stop_find_for_freq(struct p2p_data *p2p, int freq) p2p_set_state(p2p, P2P_IDLE); p2p_free_req_dev_types(p2p); p2p->start_after_scan = P2P_AFTER_SCAN_NOTHING; - if (p2p->go_neg_peer) { + if (p2p->go_neg_peer) p2p->go_neg_peer->flags &= ~P2P_DEV_PEER_WAITING_RESPONSE; - p2p->go_neg_peer->wps_method = WPS_NOT_READY; - } p2p->go_neg_peer = NULL; p2p->sd_peer = NULL; p2p->invite_peer = NULL;