30003116e91515cbc809d1bfeb75013da5dba2f8
[openwrt/staging/luka.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 diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
19 index f65bbb02f..7e8f014cc 100644
20 --- a/wpa_supplicant/config.c
21 +++ b/wpa_supplicant/config.c
22 @@ -2798,6 +2798,7 @@ void wpa_config_set_network_defaults(struct wpa_ssid *ssid)
23 ssid->mka_priority = DEFAULT_PRIO_NOT_KEY_SERVER;
24 #endif /* CONFIG_MACSEC */
25 ssid->mac_addr = -1;
26 + ssid->max_oper_chwidth = (u8)DEFAULT_MAX_OPER_CHWIDTH;
27 }
28
29
30 diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h
31 index 9fd56c32f..2ddb777b2 100644
32 --- a/wpa_supplicant/config_ssid.h
33 +++ b/wpa_supplicant/config_ssid.h
34 @@ -37,6 +37,7 @@
35 #define DEFAULT_AMPDU_FACTOR -1 /* no change */
36 #define DEFAULT_AMPDU_DENSITY -1 /* no change */
37 #define DEFAULT_USER_SELECTED_SIM 1
38 +#define DEFAULT_MAX_OPER_CHWIDTH -1
39
40 struct psk_list_entry {
41 struct dl_list list;
42 diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
43 index dcd787bec..ca893f942 100644
44 --- a/wpa_supplicant/wpa_supplicant.c
45 +++ b/wpa_supplicant/wpa_supplicant.c
46 @@ -2293,6 +2293,9 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
47 vht_caps |= VHT_CAP_SUPP_CHAN_WIDTH_160MHZ;
48 seg0 = 114;
49 }
50 + } else if (ssid->max_oper_chwidth == VHT_CHANWIDTH_USE_HT) {
51 + chwidth = VHT_CHANWIDTH_USE_HT;
52 + seg0 = vht80[j] + 2;
53 }
54
55 if (hostapd_set_freq_params(&vht_freq, mode->mode, freq->freq,
56 --
57 2.17.0
58