1 From 838225f2319348e430b553fd9bb3680bd7434ae3 Mon Sep 17 00:00:00 2001
2 From: Peter Oh <peter.oh@bowerswilkins.com>
3 Date: Wed, 18 Apr 2018 14:14:18 -0700
4 Subject: [PATCH 1/2] mesh: add VHT_CHANWIDTH_USE_HT to max_oper_chwidth
6 Channel width in VHT mode refers HT capability when
7 the width goes down to below 80MHz, hence add checking
8 HT channel width to its max operation channel width.
9 So that mesh has capable to select bandwidth below 80Mhz.
11 Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
13 wpa_supplicant/config.c | 1 +
14 wpa_supplicant/config_ssid.h | 1 +
15 wpa_supplicant/wpa_supplicant.c | 3 +++
16 3 files changed, 5 insertions(+)
18 --- a/wpa_supplicant/config.c
19 +++ b/wpa_supplicant/config.c
20 @@ -2802,6 +2802,7 @@ void wpa_config_set_network_defaults(str
21 ssid->mka_priority = DEFAULT_PRIO_NOT_KEY_SERVER;
22 #endif /* CONFIG_MACSEC */
24 + ssid->max_oper_chwidth = (u8)DEFAULT_MAX_OPER_CHWIDTH;
28 --- a/wpa_supplicant/config_ssid.h
29 +++ b/wpa_supplicant/config_ssid.h
31 #define DEFAULT_AMPDU_FACTOR -1 /* no change */
32 #define DEFAULT_AMPDU_DENSITY -1 /* no change */
33 #define DEFAULT_USER_SELECTED_SIM 1
34 +#define DEFAULT_MAX_OPER_CHWIDTH -1
36 struct psk_list_entry {
38 --- a/wpa_supplicant/wpa_supplicant.c
39 +++ b/wpa_supplicant/wpa_supplicant.c
40 @@ -2292,6 +2292,9 @@ void ibss_mesh_setup_freq(struct wpa_sup
41 vht_caps |= VHT_CAP_SUPP_CHAN_WIDTH_160MHZ;
44 + } else if (ssid->max_oper_chwidth == VHT_CHANWIDTH_USE_HT) {
45 + chwidth = VHT_CHANWIDTH_USE_HT;
46 + seg0 = vht80[j] + 2;
49 if (hostapd_set_freq_params(&vht_freq, mode->mode, freq->freq,