aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Oh <peter.oh@bowerswilkins.com>2018-04-18 21:14:19 (GMT)
committerJouni Malinen <j@w1.fi>2019-01-06 21:49:40 (GMT)
commite5a9b1e8a3a50098af3e0caed0c9327037c8ec5e (patch)
treed61bfca3720626928c619c3bc2a3006f269f2778
parent806db174fd9addcd17c629a1b6464e8971c38614 (diff)
downloadhostap-e5a9b1e8a3a50098af3e0caed0c9327037c8ec5e.zip
hostap-e5a9b1e8a3a50098af3e0caed0c9327037c8ec5e.tar.gz
hostap-e5a9b1e8a3a50098af3e0caed0c9327037c8ec5e.tar.bz2
mesh: Implement use of VHT20 config in mesh mode
Mesh in VHT mode is supposed to be able to use any bandwidth that VHT supports, but there was no way to set VHT20 although there are parameters that are supposed to be used. This commit along then previous commit for VHT_CHANWIDTH_USE_HT makes mesh configuration available to use any bandwidth with combinations of existing parameters like shown below. VHT80: default do not set any parameters VHT40: max_oper_chwidth = 0 VHT20: max_oper_chwidth = 0 disable_ht40 = 1 HT40: disable_vht = 1 HT20: disable_ht40 = 1 disable HT: disable_ht = 1 Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
-rw-r--r--wpa_supplicant/wpa_supplicant.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index feeafc6..1132df2 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2191,9 +2191,14 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
if (pri_chan->flag & (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR))
return;
+ freq->channel = pri_chan->chan;
+
#ifdef CONFIG_HT_OVERRIDES
- if (ssid->disable_ht40)
- return;
+ if (ssid->disable_ht40) {
+ if (ssid->disable_vht)
+ return;
+ goto skip_ht40;
+ }
#endif /* CONFIG_HT_OVERRIDES */
/* Check/setup HT40+/HT40- */
@@ -2218,8 +2223,6 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
if (sec_chan->flag & (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR))
return;
- freq->channel = pri_chan->chan;
-
if (ht40 == -1) {
if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS))
return;
@@ -2263,6 +2266,9 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
wpa_scan_results_free(scan_res);
}
+#ifdef CONFIG_HT_OVERRIDES
+skip_ht40:
+#endif /* CONFIG_HT_OVERRIDES */
wpa_printf(MSG_DEBUG,
"IBSS/mesh: setup freq channel %d, sec_channel_offset %d",
freq->channel, freq->sec_channel_offset);
@@ -2355,6 +2361,10 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
} else if (ssid->max_oper_chwidth == VHT_CHANWIDTH_USE_HT) {
chwidth = VHT_CHANWIDTH_USE_HT;
seg0 = vht80[j] + 2;
+#ifdef CONFIG_HT_OVERRIDES
+ if (ssid->disable_ht40)
+ seg0 = 0;
+#endif /* CONFIG_HT_OVERRIDES */
}
if (hostapd_set_freq_params(&vht_freq, mode->mode, freq->freq,