aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/p2p_supplicant.c
diff options
context:
space:
mode:
authorIlan Peer <ilan.peer@intel.com>2015-11-22 13:57:50 (GMT)
committerJouni Malinen <j@w1.fi>2015-11-22 19:46:43 (GMT)
commit6cbbae2cf8ae8380ed542e1bda72ec923697ea7a (patch)
tree744b66387014ceca8129607f75054a84dafce385 /wpa_supplicant/p2p_supplicant.c
parent845d48c133acd0cad54bd99dda1541e76d41224f (diff)
downloadhostap-6cbbae2cf8ae8380ed542e1bda72ec923697ea7a.zip
hostap-6cbbae2cf8ae8380ed542e1bda72ec923697ea7a.tar.gz
hostap-6cbbae2cf8ae8380ed542e1bda72ec923697ea7a.tar.bz2
P2P: Set p2p_go_wait_client in invitation_result() cb
When an invitation to join an existing group is accepted by the peer device, set p2p_go_wait_client to the current time so that wpas_p2p_in_progress() would return != 0, thus preventing P2P CSA, scanning etc., that would interfere with the peer device connection. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Diffstat (limited to 'wpa_supplicant/p2p_supplicant.c')
-rw-r--r--wpa_supplicant/p2p_supplicant.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 4e27c87..88c90d0 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -3099,9 +3099,23 @@ static void wpas_invitation_result(void *ctx, int status, const u8 *bssid,
wpa_printf(MSG_DEBUG, "P2P: Invitation result - status=%d peer=" MACSTR,
status, MAC2STR(peer));
if (wpa_s->pending_invite_ssid_id == -1) {
+ struct wpa_supplicant *group_if =
+ wpa_s->global->p2p_invite_group;
+
if (status == P2P_SC_FAIL_UNKNOWN_GROUP)
wpas_remove_persistent_client(wpa_s, peer);
- return; /* Invitation to active group */
+
+ /*
+ * Invitation to an active group. If this is successful and we
+ * are the GO, set the client wait to postpone some concurrent
+ * operations and to allow provisioning and connection to happen
+ * more quickly.
+ */
+ if (status == P2P_SC_SUCCESS &&
+ group_if && group_if->current_ssid &&
+ group_if->current_ssid->mode == WPAS_MODE_P2P_GO)
+ os_get_reltime(&wpa_s->global->p2p_go_wait_client);
+ return;
}
if (status == P2P_SC_FAIL_INFO_CURRENTLY_UNAVAILABLE) {