gcc: Update gcc 9.X to version 9.2.0
[openwrt/openwrt.git] / package / network / services / hostapd / patches / 032-mesh-implement-use-of-VHT20-config-in-mesh-mode.patch
1 From 24fc73b2470ff79cd8c92e029ca785c8e95a204c Mon Sep 17 00:00:00 2001
2 From: Peter Oh <peter.oh@bowerswilkins.com>
3 Date: Wed, 18 Apr 2018 14:14:19 -0700
4 Subject: [PATCH 2/2] mesh: implement use of VHT20 config in mesh mode
5
6 mesh in VHT mode is supposed to be able to use any bandwidth
7 that 11ac supports, but we don't have a way to set VHT20
8 although there are parameters that are supposed to be used.
9 This patch along with the patch of
10 "mesh: add VHT_CHANWIDTH_USE_HT to max_oper_chwidth" makes mesh
11 available to use of any bandwidth using combination of
12 existing parameters like below shown.
13
14 VHT80:
15 default
16 do not set any parameters
17 VHT40:
18 max_oper_chwidth = 0
19 VHT20:
20 max_oper_chwidth=0
21 disable_ht40=1
22 HT40:
23 disable_vht = 1
24 HT20:
25 disable_ht40 = 1
26 disable HT:
27 disable_ht = 1
28
29 Signed-off-by: Peter Oh <peter.oh@bowerswilkins.com>
30 ---
31 wpa_supplicant/wpa_supplicant.c | 18 +++++++++++++-----
32 1 file changed, 13 insertions(+), 5 deletions(-)
33
34 --- a/wpa_supplicant/wpa_supplicant.c
35 +++ b/wpa_supplicant/wpa_supplicant.c
36 @@ -2174,9 +2174,15 @@ void ibss_mesh_setup_freq(struct wpa_sup
37 if (!dfs_enabled)
38 return;
39
40 + freq->channel = pri_chan->chan;
41 +
42 #ifdef CONFIG_HT_OVERRIDES
43 - if (ssid->disable_ht40)
44 - return;
45 + if (ssid->disable_ht40) {
46 + if (ssid->disable_vht)
47 + return;
48 + else
49 + goto skip_ht40;
50 + }
51 #endif /* CONFIG_HT_OVERRIDES */
52
53 /* Check/setup HT40+/HT40- */
54 @@ -2204,8 +2210,6 @@ void ibss_mesh_setup_freq(struct wpa_sup
55 if (!dfs_enabled)
56 return;
57
58 - freq->channel = pri_chan->chan;
59 -
60 if (ht40 == -1) {
61 if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS))
62 return;
63 @@ -2249,6 +2253,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
64 wpa_scan_results_free(scan_res);
65 }
66
67 +skip_ht40:
68 wpa_printf(MSG_DEBUG,
69 "IBSS/mesh: setup freq channel %d, sec_channel_offset %d",
70 freq->channel, freq->sec_channel_offset);
71 @@ -2344,7 +2349,10 @@ void ibss_mesh_setup_freq(struct wpa_sup
72 }
73 } else if (ssid->max_oper_chwidth == VHT_CHANWIDTH_USE_HT) {
74 chwidth = VHT_CHANWIDTH_USE_HT;
75 - seg0 = vht80[j] + 2;
76 + if (ssid->disable_ht40)
77 + seg0 = 0;
78 + else
79 + seg0 = vht80[j] + 2;
80 }
81
82 if (hostapd_set_freq_params(&vht_freq, mode->mode, freq->freq,