From: Jouni Malinen Date: Tue, 15 May 2012 02:55:43 +0000 (-0400) Subject: P2P: Improve handling of p2p_connect-auto fallback X-Git-Tag: hostap_2_0~658 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b80eb89d8e21eb699d847bec226d897d9e92e0b8;p=thirdparty%2Fhostap.git P2P: Improve handling of p2p_connect-auto fallback Commit aa9bb7644b0f7acbc9403189f0c47c17079205bc improved robustness of p2p_connect-auto mechanism by using older scan results to help in determination whether the peer was operating a GO. Improve this by accepting new GO information from scan-for-WPS-provisioning results even if the GO is not yet ready for WPS. In addition, fix an issue where Provision Discovery exchange timeout could have left offchannel TX operation in progress when the fallback was used. Signed-hostap: Jouni Malinen --- diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 585384a3f..44aadf192 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -4844,6 +4844,7 @@ static void wpas_p2p_fallback_to_go_neg(struct wpa_supplicant *wpa_s, if (wpa_s->global->p2p_group_formation) group = wpa_s->global->p2p_group_formation; wpa_s = wpa_s->parent; + offchannel_send_action_done(wpa_s); if (group_added) wpas_p2p_group_delete(group, 1); wpa_dbg(wpa_s, MSG_DEBUG, "P2P: Fall back to GO Negotiation"); @@ -4861,6 +4862,9 @@ int wpas_p2p_scan_no_go_seen(struct wpa_supplicant *wpa_s) wpa_s->p2p_in_provisioning <= 5) return 0; + if (wpas_p2p_peer_go(wpa_s, wpa_s->pending_join_dev_addr) > 0) + return 0; /* peer operating as a GO */ + wpa_dbg(wpa_s, MSG_DEBUG, "P2P: GO not found for p2p_connect-auto - " "fallback to GO Negotiation"); wpas_p2p_fallback_to_go_neg(wpa_s, 1);