3bd6eaf340d90b1dfda914bb39b622578ec4a6d7
[openwrt/staging/stintel.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 diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
35 index ca893f942..8429cfd43 100644
36 --- a/wpa_supplicant/wpa_supplicant.c
37 +++ b/wpa_supplicant/wpa_supplicant.c
38 @@ -2132,9 +2132,15 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
39 if (pri_chan->flag & (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR))
40 return;
41
42 + freq->channel = pri_chan->chan;
43 +
44 #ifdef CONFIG_HT_OVERRIDES
45 - if (ssid->disable_ht40)
46 - return;
47 + if (ssid->disable_ht40) {
48 + if (ssid->disable_vht)
49 + return;
50 + else
51 + goto skip_ht40;
52 + }
53 #endif /* CONFIG_HT_OVERRIDES */
54
55 /* Check/setup HT40+/HT40- */
56 @@ -2159,8 +2165,6 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
57 if (sec_chan->flag & (HOSTAPD_CHAN_DISABLED | HOSTAPD_CHAN_NO_IR))
58 return;
59
60 - freq->channel = pri_chan->chan;
61 -
62 if (ht40 == -1) {
63 if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS))
64 return;
65 @@ -2204,6 +2208,7 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
66 wpa_scan_results_free(scan_res);
67 }
68
69 +skip_ht40:
70 wpa_printf(MSG_DEBUG,
71 "IBSS/mesh: setup freq channel %d, sec_channel_offset %d",
72 freq->channel, freq->sec_channel_offset);
73 @@ -2295,7 +2300,10 @@ void ibss_mesh_setup_freq(struct wpa_supplicant *wpa_s,
74 }
75 } else if (ssid->max_oper_chwidth == VHT_CHANWIDTH_USE_HT) {
76 chwidth = VHT_CHANWIDTH_USE_HT;
77 - seg0 = vht80[j] + 2;
78 + if (ssid->disable_ht40)
79 + seg0 = 0;
80 + else
81 + seg0 = vht80[j] + 2;
82 }
83
84 if (hostapd_set_freq_params(&vht_freq, mode->mode, freq->freq,
85 --
86 2.17.0
87