aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/p2p_supplicant.c
diff options
context:
space:
mode:
authorIlan Peer <ilan.peer@intel.com>2015-11-22 13:57:51 (GMT)
committerJouni Malinen <j@w1.fi>2015-11-22 19:49:19 (GMT)
commited7820b4845721bb0c0b145c1205dab31d737475 (patch)
tree06512b636580ff544f7e7142b14d3c30e21dc75a /wpa_supplicant/p2p_supplicant.c
parent6cbbae2cf8ae8380ed542e1bda72ec923697ea7a (diff)
downloadhostap-ed7820b4845721bb0c0b145c1205dab31d737475.zip
hostap-ed7820b4845721bb0c0b145c1205dab31d737475.tar.gz
hostap-ed7820b4845721bb0c0b145c1205dab31d737475.tar.bz2
P2P: Add a testing option to force P2P GO CSA
Add a testing option to force a P2P GO CSA on successful invitation to join an active P2P GO. 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 88c90d0..ea4bd0e 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -3113,8 +3113,22 @@ static void wpas_invitation_result(void *ctx, int status, const u8 *bssid,
*/
if (status == P2P_SC_SUCCESS &&
group_if && group_if->current_ssid &&
- group_if->current_ssid->mode == WPAS_MODE_P2P_GO)
+ group_if->current_ssid->mode == WPAS_MODE_P2P_GO) {
os_get_reltime(&wpa_s->global->p2p_go_wait_client);
+#ifdef CONFIG_TESTING_OPTIONS
+ if (group_if->p2p_go_csa_on_inv) {
+ wpa_printf(MSG_DEBUG,
+ "Testing: force P2P GO CSA after invitation");
+ eloop_cancel_timeout(
+ wpas_p2p_reconsider_moving_go,
+ wpa_s, NULL);
+ eloop_register_timeout(
+ 0, 50000,
+ wpas_p2p_reconsider_moving_go,
+ wpa_s, NULL);
+ }
+#endif /* CONFIG_TESTING_OPTIONS */
+ }
return;
}