aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ap.c
diff options
context:
space:
mode:
authorAvraham Stern <avraham.stern@intel.com>2015-10-14 09:26:30 (GMT)
committerJouni Malinen <j@w1.fi>2015-10-14 18:09:41 (GMT)
commit0aed3f5a8019db2f1bbe802a4543fba90af58e13 (patch)
tree8e60735cd69f617c51a3c7060721c1ed3023686c /wpa_supplicant/ap.c
parent1d61a8efee98a5ba8fd5978fb096d255bdfa87b1 (diff)
downloadhostap-0aed3f5a8019db2f1bbe802a4543fba90af58e13.zip
hostap-0aed3f5a8019db2f1bbe802a4543fba90af58e13.tar.gz
hostap-0aed3f5a8019db2f1bbe802a4543fba90af58e13.tar.bz2
P2P: Set CTWindow only for P2P GO
CTWindow was set for all AP interfaces if the driver supports it and this parameter is set in wpa_supplicant configuration. This results in failing to start an AP that is not a P2P GO as this setting is rejected by the driver. Fix that by setting the CTWindow only for P2P GO interface. Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Diffstat (limited to 'wpa_supplicant/ap.c')
-rw-r--r--wpa_supplicant/ap.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index 26ac703..cefb3dc 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -301,13 +301,17 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
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;
+ if (ssid->mode == WPAS_MODE_P2P_GO ||
+ ssid->mode == WPAS_MODE_P2P_GROUP_FORMATION) {
+ 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 */