aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ap.c
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2013-10-27 18:08:36 (GMT)
committerJouni Malinen <j@w1.fi>2013-10-27 18:08:36 (GMT)
commitca9bc5b5666a08c741ddd21c451ecb92aa33a11a (patch)
treef3ca6f3054f414b34fbecfbcce0a38afac9c7349 /wpa_supplicant/ap.c
parent20ea1ca406298d85eb30061b41cc25c050f69116 (diff)
downloadhostap-ca9bc5b5666a08c741ddd21c451ecb92aa33a11a.zip
hostap-ca9bc5b5666a08c741ddd21c451ecb92aa33a11a.tar.gz
hostap-ca9bc5b5666a08c741ddd21c451ecb92aa33a11a.tar.bz2
P2P: Add VHT support
Start GO with VHT support if VHT option was requested and the appropriate channels are available. Signed-hostap: Eliad Peller <eliadx.peller@intel.com>
Diffstat (limited to 'wpa_supplicant/ap.c')
-rw-r--r--wpa_supplicant/ap.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index fdbe248..b55c068 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -42,6 +42,31 @@ static void wpas_wps_ap_pin_timeout(void *eloop_data, void *user_ctx);
#endif /* CONFIG_WPS */
+static void wpas_conf_ap_vht(struct wpa_supplicant *wpa_s,
+ struct hostapd_config *conf,
+ struct hostapd_hw_modes *mode)
+{
+ u8 center_chan = 0;
+ u8 channel = conf->channel;
+
+ if (!conf->secondary_channel)
+ goto no_vht;
+
+ center_chan = wpas_p2p_get_vht80_center(wpa_s, mode, channel);
+ if (!center_chan)
+ goto no_vht;
+
+ /* Use 80 MHz channel */
+ conf->vht_oper_chwidth = 1;
+ conf->vht_oper_centr_freq_seg0_idx = center_chan;
+ return;
+
+no_vht:
+ conf->vht_oper_centr_freq_seg0_idx =
+ channel + conf->secondary_channel * 2;
+}
+
+
static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
struct wpa_ssid *ssid,
struct hostapd_config *conf)
@@ -114,6 +139,11 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
HT_CAP_INFO_SHORT_GI40MHZ |
HT_CAP_INFO_RX_STBC_MASK |
HT_CAP_INFO_MAX_AMSDU_SIZE);
+
+ if (mode->vht_capab && ssid->vht) {
+ conf->ieee80211ac = 1;
+ wpas_conf_ap_vht(wpa_s, conf, mode);
+ }
}
}
#endif /* CONFIG_IEEE80211N */