4b802d2a497d515b7512e031a38a22e3f5a58ada
[openwrt/openwrt.git] /
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
5
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.
10
11 Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
12 ---
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(+)
17
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 */
23 ssid->mac_addr = -1;
24 + ssid->max_oper_chwidth = (u8)DEFAULT_MAX_OPER_CHWIDTH;
25 }
26
27
28 --- a/wpa_supplicant/config_ssid.h
29 +++ b/wpa_supplicant/config_ssid.h
30 @@ -37,6 +37,7 @@
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
35
36 struct psk_list_entry {
37 struct dl_list list;
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;
42 seg0 = 114;
43 }
44 + } else if (ssid->max_oper_chwidth == VHT_CHANWIDTH_USE_HT) {
45 + chwidth = VHT_CHANWIDTH_USE_HT;
46 + seg0 = vht80[j] + 2;
47 }
48
49 if (hostapd_set_freq_params(&vht_freq, mode->mode, freq->freq,