aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ap.c
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>2012-08-15 19:53:01 (GMT)
committerJouni Malinen <j@w1.fi>2012-08-15 19:53:01 (GMT)
commit7aeac98509092116085150d76de55c08465ef681 (patch)
tree4ab83aa89aa040f9677f20bcafe498fcca2b52e3 /wpa_supplicant/ap.c
parent931228aa10ef33279ad632ac04ef56b8a954e7f2 (diff)
downloadhostap-7aeac98509092116085150d76de55c08465ef681.zip
hostap-7aeac98509092116085150d76de55c08465ef681.tar.gz
hostap-7aeac98509092116085150d76de55c08465ef681.tar.bz2
P2P: Enable 40 MHz support for autonomous P2P group addition
Add optional "ht40" argument for p2p_group_add command to enable 40 MHz in 5GHz band. This configures the secondary channel, when HT support is enabled and if the HW supports 40 MHz channel width. Signed-hostap: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/ap.c')
-rw-r--r--wpa_supplicant/ap.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index 948e2e4..19b1069 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -99,6 +99,18 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
if (!no_ht && mode && mode->ht_capab) {
conf->ieee80211n = 1;
+#ifdef CONFIG_P2P
+ if (conf->hw_mode == HOSTAPD_MODE_IEEE80211A &&
+ (mode->ht_capab &
+ HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET) &&
+ ssid->ht40)
+ conf->secondary_channel =
+ wpas_p2p_get_ht40_mode(wpa_s, mode,
+ conf->channel);
+ if (conf->secondary_channel)
+ conf->ht_capab |=
+ HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET;
+#endif /* CONFIG_P2P */
/*
* white-list capabilities that won't cause issues