aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/p2p_supplicant.c
diff options
context:
space:
mode:
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>2015-09-08 09:46:19 (GMT)
committerJouni Malinen <j@w1.fi>2015-10-03 17:22:09 (GMT)
commit3bafb0d842a9c5b07f66eda43a100a8af1fd0bba (patch)
tree2d7551d0e0ddb9f6fae533f37540b99244a5917b /wpa_supplicant/p2p_supplicant.c
parent4e0ab656d29d7f838bc49d8d5b78c67f94193cb2 (diff)
downloadhostap-3bafb0d842a9c5b07f66eda43a100a8af1fd0bba.zip
hostap-3bafb0d842a9c5b07f66eda43a100a8af1fd0bba.tar.gz
hostap-3bafb0d842a9c5b07f66eda43a100a8af1fd0bba.tar.bz2
P2P: Trigger channel selection correctly during CSA
Do not consider moving GOs to a new channel if one of them is in the middle of CSA. In addition, call wpas_p2p_update_channel_list() after EVENT_CH_SWITCH is handled. Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Diffstat (limited to 'wpa_supplicant/p2p_supplicant.c')
-rw-r--r--wpa_supplicant/p2p_supplicant.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index dbfae3e..5ca058a 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -8667,6 +8667,13 @@ static void wpas_p2p_move_go(void *eloop_ctx, void *timeout_ctx)
wpas_p2p_go_update_common_freqs(wpa_s);
+ /* Do not move GO in the middle of a CSA */
+ if (hostapd_csa_in_progress(wpa_s->ap_iface)) {
+ wpa_printf(MSG_DEBUG,
+ "P2P: CSA is in progress - not moving GO");
+ return;
+ }
+
/*
* First, try a channel switch flow. If it is not supported or fails,
* take down the GO and bring it up again.
@@ -8777,6 +8784,16 @@ static void wpas_p2p_consider_moving_one_go(struct wpa_supplicant *wpa_s,
return;
}
+ /*
+ * Do not consider moving GO if it is in the middle of a CSA. When the
+ * CSA is finished this flow should be retriggered.
+ */
+ if (hostapd_csa_in_progress(wpa_s->ap_iface)) {
+ wpa_dbg(wpa_s, MSG_DEBUG,
+ "P2P: Not initiating a GO frequency change - CSA is in progress");
+ return;
+ }
+
if (invalid_freq && !wpas_p2p_disallowed_freq(wpa_s->global, freq))
timeout = P2P_GO_FREQ_CHANGE_TIME;
else