aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ap.c
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2015-02-18 02:35:12 (GMT)
committerJouni Malinen <j@w1.fi>2015-02-21 14:07:53 (GMT)
commit0b8bcaa50fdaa3940606a38177477241a3a5c5d6 (patch)
tree3469f07e398a26ef53e7a0ad5886f06a97dcb679 /wpa_supplicant/ap.c
parentc77ffc6dafe7909f62c0a5f437a439670b089554 (diff)
downloadhostap-0b8bcaa50fdaa3940606a38177477241a3a5c5d6.zip
hostap-0b8bcaa50fdaa3940606a38177477241a3a5c5d6.tar.gz
hostap-0b8bcaa50fdaa3940606a38177477241a3a5c5d6.tar.bz2
P2P: Allow configuring CTWindow when working as GO
Read p2p_go_ctwindow (0-127 TUs) from the config file, and pass it to the driver on GO start. Use p2p_go_ctwindow=0 (no CTWindow) by default. Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Diffstat (limited to 'wpa_supplicant/ap.c')
-rw-r--r--wpa_supplicant/ap.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index fca2137..f2c60e7 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -265,6 +265,17 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
else if (wpa_s->conf->beacon_int)
conf->beacon_int = wpa_s->conf->beacon_int;
+#ifdef CONFIG_P2P
+ if (wpa_s->conf->p2p_go_ctwindow > conf->beacon_int) {
+ wpa_printf(MSG_INFO,
+ "CTWindow (%d) is bigger than beacon interval (%d) - avoid configuring it",
+ wpa_s->conf->p2p_go_ctwindow, conf->beacon_int);
+ conf->p2p_go_ctwindow = 0;
+ } else {
+ conf->p2p_go_ctwindow = wpa_s->conf->p2p_go_ctwindow;
+ }
+#endif /* CONFIG_P2P */
+
if ((bss->wpa & 2) && bss->rsn_pairwise == 0)
bss->rsn_pairwise = bss->wpa_pairwise;
bss->wpa_group = wpa_select_ap_group_cipher(bss->wpa, bss->wpa_pairwise,