aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Oh <peter.oh@bowerswilkins.com>2018-04-18 21:14:18 (GMT)
committerJouni Malinen <j@w1.fi>2019-01-06 21:43:40 (GMT)
commit806db174fd9addcd17c629a1b6464e8971c38614 (patch)
tree6f97304a09e2467bc5a9b7d448e0ea2e2d48dfe3
parent06809f618da896c0d49b4ab395e5bb4d2fb9cbfb (diff)
downloadhostap-806db174fd9addcd17c629a1b6464e8971c38614.zip
hostap-806db174fd9addcd17c629a1b6464e8971c38614.tar.gz
hostap-806db174fd9addcd17c629a1b6464e8971c38614.tar.bz2
mesh: Add VHT_CHANWIDTH_USE_HT to max_oper_chwidth
Channel width in VHT mode refers HT capability when the width goes down to below 80 MHz, hence add checking HT channel width to its max operation channel width. So that mesh has capability to select bandwidth below 80 MHz. Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
-rw-r--r--wpa_supplicant/config.c1
-rw-r--r--wpa_supplicant/config_file.c2
-rw-r--r--wpa_supplicant/config_ssid.h1
-rw-r--r--wpa_supplicant/mesh.c3
-rw-r--r--wpa_supplicant/wpa_supplicant.c3
5 files changed, 8 insertions, 2 deletions
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index 7a95ea4..bfca69f 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -2903,6 +2903,7 @@ void wpa_config_set_network_defaults(struct wpa_ssid *ssid)
ssid->mka_priority = DEFAULT_PRIO_NOT_KEY_SERVER;
#endif /* CONFIG_MACSEC */
ssid->mac_addr = -1;
+ ssid->max_oper_chwidth = DEFAULT_MAX_OPER_CHWIDTH;
}
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index 98aae87..73fcf2c 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -838,7 +838,7 @@ static void wpa_config_write_network(FILE *f, struct wpa_ssid *ssid)
INT(vht);
INT_DEF(ht, 1);
INT(ht40);
- INT(max_oper_chwidth);
+ INT_DEF(max_oper_chwidth, DEFAULT_MAX_OPER_CHWIDTH);
INT(vht_center_freq1);
INT(vht_center_freq2);
INT(pbss);
diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
index 6cf6557..9abecc0 100644
--- a/wpa_supplicant/config_ssid.h
+++ b/wpa_supplicant/config_ssid.h
@@ -39,6 +39,7 @@
#define DEFAULT_AMPDU_FACTOR -1 /* no change */
#define DEFAULT_AMPDU_DENSITY -1 /* no change */
#define DEFAULT_USER_SELECTED_SIM 1
+#define DEFAULT_MAX_OPER_CHWIDTH -1
struct psk_list_entry {
struct dl_list list;
diff --git a/wpa_supplicant/mesh.c b/wpa_supplicant/mesh.c
index f2f0961..dd6aad6 100644
--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
@@ -332,7 +332,8 @@ static int wpa_supplicant_mesh_init(struct wpa_supplicant *wpa_s,
if (ssid->ht40)
conf->secondary_channel = ssid->ht40;
if (conf->hw_mode == HOSTAPD_MODE_IEEE80211A && ssid->vht) {
- conf->vht_oper_chwidth = ssid->max_oper_chwidth;
+ if (ssid->max_oper_chwidth != DEFAULT_MAX_OPER_CHWIDTH)
+ conf->vht_oper_chwidth = ssid->max_oper_chwidth;
switch (conf->vht_oper_chwidth) {
case VHT_CHANWIDTH_80MHZ:
case VHT_CHANWIDTH_80P80MHZ:
diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 9ca2c6b..feeafc6 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -2352,6 +2352,9 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
vht_caps |= VHT_CAP_SUPP_CHAN_WIDTH_160MHZ;
seg0 = 114;
}
+ } else if (ssid->max_oper_chwidth == VHT_CHANWIDTH_USE_HT) {
+ chwidth = VHT_CHANWIDTH_USE_HT;
+ seg0 = vht80[j] + 2;
}
if (hostapd_set_freq_params(&vht_freq, mode->mode, freq->freq,