]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Fix regression in GO Negotiation
authorJouni Malinen <jouni@qca.qualcomm.com>
Fri, 1 Mar 2013 09:53:46 +0000 (11:53 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 1 Mar 2013 09:53:46 +0000 (11:53 +0200)
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 <jouni@qca.qualcomm.com>

src/p2p/p2p.c

index a1fb7e49ffd645177fe9e9cd3277eb4782a513bc..15df215e3465ca0d554b3660284b17974096a79c 100644 (file)
@@ -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;