1 /*
2  * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 /**
20  * DOC: This file contains configuration definitions for MLME OBSS HT40.
21  */
22 #ifndef CFG_MLME_OBSS_HT40_H__
23 #define CFG_MLME_OBSS_HT40_H__
24 
25 /*
26  * <ini>
27  * obss_active_dwelltime - Set obss active dwelltime
28  * @Min: 10
29  * @Max: 1000
30  * @Default: 10
31  *
32  * This ini is used to set dwell time in secs for active
33  * obss scan
34  *
35  * Related: None
36  *
37  * Supported Feature: Scan
38  *
39  * Usage: External
40  *
41  * </ini>
42  */
43 #define CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME CFG_INI_UINT( \
44 	"obss_active_dwelltime", \
45 	10, \
46 	1000, \
47 	10, \
48 	CFG_VALUE_OR_DEFAULT, \
49 	"Set obss active dwelltime")
50 
51 /*
52  * <ini>
53  * obss_passive_dwelltime - Set obss passive dwelltime
54  * @Min: 5
55  * @Max: 1000
56  * @Default: 20
57  *
58  * This ini is used to set dwell time in secs for passive
59  * obss scan
60  *
61  * Related: None
62  *
63  * Supported Feature: Scan
64  *
65  * Usage: External
66  *
67  * </ini>
68  */
69 #define CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME CFG_INI_UINT( \
70 	"obss_passive_dwelltime", \
71 	5, \
72 	1000, \
73 	20, \
74 	CFG_VALUE_OR_DEFAULT, \
75 	"Set obss passive dwelltime")
76 
77 /*
78  * <ini>
79  * obss_width_trigger_interval - Set obss trigger interval
80  * @Min: 10
81  * @Max: 900
82  * @Default: 200
83  *
84  * This ini is used during an OBSS scan operation,
85  * where each channel in the set is scanned at least
86  * once per configured trigger interval time. Unit is TUs.
87  *
88  * Related: None
89  *
90  * Supported Feature: Scan
91  *
92  * Usage: External
93  *
94  * </ini>
95  */
96 #define CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL CFG_INI_UINT( \
97 	"obss_width_trigger_interval", \
98 	10, \
99 	900, \
100 	200, \
101 	CFG_VALUE_OR_DEFAULT, \
102 	"Set obss trigger interval")
103 
104 /*
105  * obss_passive_total_per_channel - Set obss scan passive total per channel
106  * @Min: 200
107  * @Max: 10000
108  * @Default: 200
109  *
110  * FW can perform multiple scans with in a OBSS scan interval. This cfg is for
111  * the total per channel dwell time of passive scans. Unit is TUs.
112  *
113  * Related: None
114  *
115  * Supported Feature: Scan
116  *
117  * Usage: Internal
118  *
119  */
120 #define CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL CFG_UINT( \
121 	"obss_passive_total_per_channel", \
122 	200, \
123 	10000, \
124 	200, \
125 	CFG_VALUE_OR_DEFAULT, \
126 	"obss passive total per channel")
127 
128 /*
129  * obss_active_total_per_channel - Set obss scan active total per channel
130  * @Min: 20
131  * @Max: 10000
132  * @Default: 20
133  *
134  * FW can perform multiple scans with in a OBSS scan interval. This cfg is for
135  * the total per channel dwell time of active scans. Unit is TUs.
136  *
137  * Related: None
138  *
139  * Supported Feature: Scan
140  *
141  * Usage: Internal
142  *
143  */
144 #define CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL CFG_UINT( \
145 	"obss_active_total_per_channel", \
146 	20, \
147 	10000, \
148 	20, \
149 	CFG_VALUE_OR_DEFAULT, \
150 	"obss active total per channel")
151 
152 /*
153  * obss_scan_activity_thre - Set obss scan activity threshold
154  * @Min: 0
155  * @Max: 100
156  * @Default: 25
157  *
158  * This cfg sets obss scan activity threshold.
159  *
160  * Related: None
161  *
162  * Supported Feature: Scan
163  *
164  * Usage: Internal
165  *
166  */
167 #define CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD CFG_UINT( \
168 	"obss_scan_activity_thre", \
169 	0, \
170 	100, \
171 	25, \
172 	CFG_VALUE_OR_DEFAULT, \
173 	"obss ht40 scan activity threshold")
174 
175 /*
176  * obss_width_transition_delay - Set obss width transition delay
177  * @Min: 5
178  * @Max: 100
179  * @Default: 5
180  *
181  * This cfg sets obss width transition delay, it is used to check exemption
182  * from scan. The unit is TUs.
183  *
184  * Related: None
185  *
186  * Supported Feature: Scan
187  *
188  * Usage: Internal
189  *
190  */
191 #define CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY CFG_UINT( \
192 	"obss_width_transition_delay", \
193 	5, \
194 	100, \
195 	5, \
196 	CFG_VALUE_OR_DEFAULT, \
197 	"obss ht40 width transition delay")
198 
199 /*
200  * <ini>
201  * override_ht20_40_24g - Use channel bonding in 2.4GHz from supplicant
202  * @Min: 0
203  * @Max: 1
204  * @Default: 0
205  *
206  * This ini used to set whether use channel Bonding in 2.4GHz from supplicant
207  * if gChannelBondingMode24GHz is set
208  *
209  * Related: gChannelBondingMode24GHz
210  *
211  * Supported Feature: STA
212  *
213  * Usage: Internal/External
214  *
215  * </ini>
216  */
217 #define CFG_OBSS_HT40_OVERRIDE_HT40_20_24GHZ CFG_INI_BOOL( \
218 		"override_ht20_40_24g", \
219 		0, \
220 		"Use channel bonding in 24 GHz")
221 
222 /*
223  * <cfg>
224  * obss_detection_offload - Enable OBSS detection offload
225  * @Min: 0
226  * @Max: 1
227  * @Default: 0
228  */
229 #define CFG_OBSS_DETECTION_OFFLOAD CFG_BOOL( \
230 		"obss_detection_offload", \
231 		0, \
232 		"Enable OBSS detection offload")
233 
234 /*
235  * <cfg>
236  * obss_color_collision_offload - Enable obss color collision offload
237  * @Min: 0
238  * @Max: 1
239  * @Default: 0
240  */
241 #define CFG_OBSS_COLOR_COLLISION_OFFLOAD CFG_BOOL( \
242 		"obss_color_collision_offload", \
243 		0, \
244 		"Enable obss color collision offload")
245 
246 /*
247  * <ini>
248  * bss_color_collision_det_sta - Enables BSS color collision detection in STA
249  * @Min: 0
250  * @Max: 1
251  * @Default: 1
252  *
253  * This ini used to enable or disable the BSS color collision detection in
254  * STA mode if obss_color_collision_offload is enabled.
255  *
256  * Supported Feature: STA
257  *
258  * Usage: Internal/External
259  *
260  * </ini>
261  */
262 #define CFG_BSS_CLR_COLLISION_DETCN_STA CFG_INI_BOOL( \
263 		"bss_color_collision_det_sta", \
264 		1, \
265 		"BSS color collision detection in STA")
266 
267 #define CFG_OBSS_HT40_ALL \
268 	CFG(CFG_OBSS_HT40_SCAN_ACTIVE_DWELL_TIME) \
269 	CFG(CFG_OBSS_HT40_SCAN_PASSIVE_DWELL_TIME) \
270 	CFG(CFG_OBSS_HT40_SCAN_WIDTH_TRIGGER_INTERVAL) \
271 	CFG(CFG_OBSS_HT40_SCAN_PASSIVE_TOTAL_PER_CHANNEL) \
272 	CFG(CFG_OBSS_HT40_SCAN_ACTIVE_TOTAL_PER_CHANNEL) \
273 	CFG(CFG_OBSS_HT40_SCAN_ACTIVITY_THRESHOLD) \
274 	CFG(CFG_OBSS_HT40_WIDTH_CH_TRANSITION_DELAY) \
275 	CFG(CFG_OBSS_HT40_OVERRIDE_HT40_20_24GHZ) \
276 	CFG(CFG_OBSS_DETECTION_OFFLOAD) \
277 	CFG(CFG_BSS_CLR_COLLISION_DETCN_STA) \
278 	CFG(CFG_OBSS_COLOR_COLLISION_OFFLOAD)
279 
280 #endif /* CFG_MLME_OBSS_HT40_H__ */
281