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 centralized definitions of converged configuration.
21  */
22 
23 #ifndef __CFG_MLME_VHT_CAPS_H
24 #define __CFG_MLME_VHT_CAPS_H
25 
26 #define CFG_VHT_SUPP_CHAN_WIDTH CFG_UINT( \
27 		"supp_chan_width", \
28 		0, \
29 		2, \
30 		0, \
31 		CFG_VALUE_OR_DEFAULT, \
32 		"VHT SUPPORTED CHAN WIDTH SET")
33 
34 /*
35  * <ini>
36  * gTxBFCsnValue - ini to set VHT/HE STS Caps field
37  * @Min: 0
38  * @Max: 7
39  * @Default: 7
40  *
41  * This ini is used to configure the STS capability shown in AC/AX mode
42  * MGMT frame IE, the final STS field shown in VHT/HE IE will be calculated
43  * by MIN of (INI set, target report value). Only if gTxBFEnable is enabled
44  * and SU/MU BEAMFORMEE Caps is shown, then STS Caps make sense.
45  *
46  * Related: gTxBFEnable.
47  *
48  * Supported Feature: STA/SAP
49  *
50  * Usage: Internal
51  *
52  * </ini>
53  */
54 #define CFG_VHT_BEAMFORMEE_ANT_SUPP CFG_INI_UINT( \
55 		"txBFCsnValue", \
56 		0, \
57 		7, \
58 		7, \
59 		CFG_VALUE_OR_DEFAULT, \
60 		"VHT BEAMFORMEE ANTENNA SUPPORTED CAP")
61 
62 /*
63  * <ini>
64  * gEnableTxSUBeamformer - Enables TX Su beam former
65  * @Min: 0
66  * @Max: 1
67  * @Default: 0
68  *
69  * Related: NA
70  *
71  * Supported Feature: 11AC
72  *
73  * Usage: External
74  *
75  * </ini>
76  */
77 #define CFG_VHT_ENABLE_TX_SU_BEAM_FORMER CFG_INI_BOOL( \
78 		"gEnableTxSUBeamformer", \
79 		0, \
80 		"vht tx su beam former")
81 
82 #define CFG_VHT_NUM_SOUNDING_DIMENSIONS CFG_UINT( \
83 		"num_soundingdim", \
84 		0, \
85 		3, \
86 		0, \
87 		CFG_VALUE_OR_DEFAULT, \
88 		"VHT NUMBER OF SOUNDING DIMENSIONS")
89 
90 #define CFG_VHT_HTC_VHTC CFG_BOOL( \
91 		"htc_vhtc", \
92 		0, \
93 		"VHT HTC VHTC")
94 
95 #define CFG_VHT_LINK_ADAPTATION_CAP CFG_UINT( \
96 		"link_adap_cap", \
97 		0, \
98 		3, \
99 		0, \
100 		CFG_VALUE_OR_DEFAULT, \
101 		"VHT LINK ADAPTATION CAP")
102 
103 #define CFG_VHT_RX_ANT_PATTERN CFG_BOOL( \
104 		"rx_antpattern", \
105 		1, \
106 		"VHT RX ANTENNA PATTERN CAP")
107 
108 #define CFG_VHT_TX_ANT_PATTERN CFG_BOOL( \
109 		"tx_antpattern", \
110 		1, \
111 		"VHT TX ANTENNA PATTERN CAP")
112 
113 #define CFG_VHT_RX_SUPP_DATA_RATE CFG_UINT( \
114 		"rx_supp_data_rate", \
115 		0, \
116 		780, \
117 		780, \
118 		CFG_VALUE_OR_DEFAULT, \
119 		"VHT RX SUPP DATA RATE")
120 
121 #define CFG_VHT_TX_SUPP_DATA_RATE CFG_UINT( \
122 		"tx_supp_data_rate", \
123 		0, \
124 		780, \
125 		780, \
126 		CFG_VALUE_OR_DEFAULT, \
127 		"VHT TX SUPP DATA RATE")
128 
129 #define CFG_TX_BF_CAP CFG_UINT( \
130 		"tx_bf_cap", \
131 		0, \
132 		4294967295, \
133 		0, \
134 		CFG_VALUE_OR_DEFAULT, \
135 		"TX BF CAP")
136 
137 #define CFG_AS_CAP CFG_UINT( \
138 		"as_cap", \
139 		0, \
140 		255, \
141 		0, \
142 		CFG_VALUE_OR_DEFAULT, \
143 		"AS CAP")
144 
145 /*
146  * <ini>
147  * gDisableLDPCWithTxbfAP - Disable LDPC with tx bf AP
148  * @Min: 0
149  * @Max: 1
150  * @Default: 0
151  *
152  * Related: NA
153  *
154  * Supported Feature: 11AC
155  *
156  * Usage: External
157  *
158  * </ini>
159  */
160 #define CFG_DISABLE_LDPC_WITH_TXBF_AP CFG_INI_BOOL( \
161 		"gDisableLDPCWithTxbfAP", \
162 		0, \
163 		"Disable LDPC with tx bf AP")
164 
165 /*
166  * <ini>
167  * gTxBFEnable - Enables SU beamformee caps
168  * @Min: 0
169  * @Max: 1
170  * @Default: 1
171  *
172  * Related: NA
173  *
174  * Supported Feature: 11AC
175  *
176  * Usage: External
177  *
178  * </ini>
179  */
180 #define CFG_VHT_SU_BEAMFORMEE_CAP CFG_INI_BOOL( \
181 		"gTxBFEnable", \
182 		1, \
183 		"VHT SU BEAMFORMEE CAPABILITY")
184 
185 /*
186  * <ini>
187  * gEnableTxBFin20MHz - Enables TXBF in 20mhz
188  * @Min: 0
189  * @Max: 1
190  * @Default: 1
191  *
192  * Related: NA
193  *
194  * Supported Feature: 11AC
195  *
196  * Usage: External
197  *
198  * </ini>
199  */
200 #define CFG_VHT_ENABLE_TXBF_IN_20MHZ CFG_INI_BOOL( \
201 		"gEnableTxBFin20MHz", \
202 		1, \
203 		"VHT ENABLE TXBF 20MHZ")
204 
205 #define CFG_VHT_MU_BEAMFORMER_CAP CFG_BOOL( \
206 		"mu_bformer", \
207 		0, \
208 		"VHT MU BEAMFORMER CAP")
209 
210 #define CFG_VHT_TXOP_PS CFG_BOOL( \
211 		"txop_ps", \
212 		0, \
213 		"VHT TXOP PS")
214 
215 /*
216  * <ini>
217  * gVhtChannelWidth - Channel width capability for 11ac
218  * @Min: 0
219  * @Max: 4
220  * @Default: 2
221  *
222  * This ini is used to set channel width capability for 11AC.
223  * eHT_CHANNEL_WIDTH_20MHZ = 0,
224  * eHT_CHANNEL_WIDTH_40MHZ = 1,
225  * eHT_CHANNEL_WIDTH_80MHZ = 2,
226  * eHT_CHANNEL_WIDTH_160MHZ = 3,
227  * eHT_CHANNEL_WIDTH_80P80MHZ = 4,
228  *
229  * Related: NA
230  *
231  * Supported Feature: 11AC
232  *
233  * Usage: External
234  *
235  * </ini>
236  */
237 #define CFG_VHT_CHANNEL_WIDTH CFG_INI_UINT( \
238 		"gVhtChannelWidth", \
239 		0, \
240 		4, \
241 		2, \
242 		CFG_VALUE_OR_DEFAULT, \
243 		"Channel width capability for 11ac")
244 
245 /*
246  * <ini>
247  * gVhtRxMCS - VHT Rx MCS capability for 1x1 mode
248  * @Min: 0
249  * @Max: 2
250  * @Default: 2
251  *
252  * This ini is  used to set VHT Rx MCS capability for 1x1 mode.
253  * 0, MCS0-7
254  * 1, MCS0-8
255  * 2, MCS0-9
256  *
257  * Related: NA
258  *
259  * Supported Feature: 11AC
260  *
261  * Usage: External
262  *
263  * </ini>
264  */
265 #define CFG_VHT_ENABLE_RX_MCS_8_9 CFG_INI_UINT( \
266 		"gVhtRxMCS", \
267 		0, \
268 		2, \
269 		2, \
270 		CFG_VALUE_OR_DEFAULT, \
271 		"VHT Rx MCS")
272 
273 /*
274  * <ini>
275  * gVhtTxMCS - VHT Tx MCS capability for 1x1 mode
276  * @Min: 0
277  * @Max: 2
278  * @Default: 2
279  *
280  * This ini is  used to set VHT Tx MCS capability for 1x1 mode.
281  * 0, MCS0-7
282  * 1, MCS0-8
283  * 2, MCS0-9
284  *
285  * Related: NA
286  *
287  * Supported Feature: 11AC
288  *
289  * Usage: External
290  *
291  * </ini>
292  */
293 #define CFG_VHT_ENABLE_TX_MCS_8_9 CFG_INI_UINT( \
294 		"gVhtTxMCS", \
295 		0, \
296 		2, \
297 		2, \
298 		CFG_VALUE_OR_DEFAULT, \
299 		"VHT Tx MCS")
300 
301 /*
302  * <ini>
303  * gVhtRxMCS2x2 - VHT Rx MCS capability for 2x2 mode
304  * @Min: 0
305  * @Max: 2
306  * @Default: 2
307  *
308  * This ini is  used to set VHT Rx MCS capability for 2x2 mode.
309  * 0, MCS0-7
310  * 1, MCS0-8
311  * 2, MCS0-9
312  *
313  * Related: NA
314  *
315  * Supported Feature: 11AC
316  *
317  * Usage: External
318  *
319  * </ini>
320  */
321 #define CFG_VHT_ENABLE_RX_MCS2x2_8_9 CFG_INI_UINT( \
322 		"gVhtRxMCS2x2", \
323 		0, \
324 		2, \
325 		2, \
326 		CFG_VALUE_OR_DEFAULT, \
327 		"VHT Rx MCS 2x2")
328 
329 /*
330  * <ini>
331  * gVhtTxMCS2x2 - VHT Tx MCS capability for 2x2 mode
332  * @Min: 0
333  * @Max: 2
334  * @Default: 2
335  *
336  * This ini is  used to set VHT Tx MCS capability for 2x2 mode.
337  * 0, MCS0-7
338  * 1, MCS0-8
339  * 2, MCS0-9
340  *
341  * Related: NA
342  *
343  * Supported Feature: 11AC
344  *
345  * Usage: External
346  *
347  * </ini>
348  */
349 #define CFG_VHT_ENABLE_TX_MCS2x2_8_9 CFG_INI_UINT( \
350 		"gVhtTxMCS2x2", \
351 		0, \
352 		2, \
353 		2, \
354 		CFG_VALUE_OR_DEFAULT, \
355 		"VHT Tx MCS 2x2")
356 
357 /*
358  * <ini>
359  * enable_vht20_mcs9 - Enables VHT MCS9 in 20M BW operation
360  * @Min: 0
361  * @Max: 1
362  * @Default: 1
363  *
364  * Related: NA
365  *
366  * Supported Feature: 11AC
367  *
368  * Usage: External
369  *
370  * </ini>
371  */
372 #define CFG_ENABLE_VHT20_MCS9 CFG_INI_BOOL( \
373 		"enable_vht20_mcs9", \
374 		1, \
375 		"Enables VHT MCS9 in 20M BW")
376 
377 /*
378  * <ini>
379  * gEnable2x2 - Enables/disables VHT Tx/Rx MCS values for 2x2
380  * @Min: 0
381  * @Max: 1
382  * @Default: 1
383  *
384  * This ini disables/enables 2x2 mode. If this is zero then DUT operates as 1x1
385  *
386  * 0, Disable
387  * 1, Enable
388  *
389  * Related: NA
390  *
391  * Supported Feature: 11AC
392  *
393  * Usage: External
394  *
395  * </ini>
396  */
397 #define CFG_VHT_ENABLE_2x2_CAP_FEATURE CFG_INI_BOOL( \
398 		"gEnable2x2", \
399 		1, \
400 		"VHT Enable 2x2")
401 
402 /*
403  * <ini>
404  * gEnableMuBformee - Enables/disables multi-user (MU) beam formee capability
405  * @Min: 0
406  * @Max: 1
407  * @Default: 1
408  *
409  * This ini enables/disables multi-user (MU) beam formee
410  * capability
411  *
412  * Change MU Bformee only when  gTxBFEnable is enabled.
413  * When gTxBFEnable and gEnableMuBformee are set, MU beam formee capability is
414  * enabled.
415  * Related:  gTxBFEnable
416  *
417  * Supported Feature: 11AC
418  *
419  * Usage: External
420  *
421  * </ini>
422  */
423 #define CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE CFG_INI_BOOL( \
424 		"gEnableMuBformee", \
425 		1, \
426 		"VHT Enable MU Beamformee")
427 
428 /*
429  * <ini>
430  * gEnablePAID - VHT partial AID feature
431  * @Min: 0
432  * @Max: 1
433  * @Default: 0
434  *
435  * This option enables/disables VHT partial AID feature.
436  * Related: NA
437  *
438  * Supported Feature: 11AC
439  *
440  * Usage: External
441  *
442  * </ini>
443  */
444 #define CFG_VHT_ENABLE_PAID_FEATURE CFG_INI_BOOL( \
445 		"gEnablePAID", \
446 		0, \
447 		"VHT Enable PAID")
448 
449 /*
450  * <ini>
451  * gEnableGID - VHT Group ID feature
452  * @Min: 0
453  * @Max: 1
454  * @Default: 0
455  *
456  * This option enables/disables VHT Group ID feature.
457  * Related: NA
458  *
459  * Supported Feature: 11AC
460  *
461  * Usage: External
462  *
463  * </ini>
464  */
465 #define CFG_VHT_ENABLE_GID_FEATURE CFG_INI_BOOL( \
466 		"gEnableGID", \
467 		0, \
468 		"VHT Enable GID")
469 
470 /*
471  * <ini>
472  * gEnableVhtFor24GHzBand - Enable VHT for 2.4GHZ in SAP mode
473  * @Min: 0
474  * @Max: 1
475  * @Default: 1
476  *
477  * Related: NA
478  *
479  * Supported Feature: 11AC
480  *
481  * Usage: External
482  *
483  * </ini>
484  */
485 #define CFG_ENABLE_VHT_FOR_24GHZ CFG_INI_BOOL( \
486 		"gEnableVhtFor24GHzBand", \
487 		1, \
488 		"VHT Enable for 24GHz")
489 
490 /*
491  * gEnableVendorVhtFor24GHzBand - Parameter to control VHT support
492  * based on vendor ie in 2.4 GHz band
493  * @Min: 0
494  * @Max: 1
495  * @Default: 1
496  *
497  * This parameter will enable SAP to read VHT capability in vendor ie in Assoc
498  * Req and send VHT caps in Resp to establish connection in VHT Mode.
499  * Supported Feature: SAP
500  *
501  *
502  * Usage: External
503  *
504  * </ini>
505  */
506 #define CFG_ENABLE_VENDOR_VHT_FOR_24GHZ CFG_INI_BOOL( \
507 		"gEnableVendorVhtFor24GHzBand", \
508 		1, \
509 		"VHT Enable Vendor for 24GHz")
510 
511 /*
512  * <ini>
513  * gVhtAmpduLenExponent - maximum receive AMPDU size configuration
514  * @Min: 0
515  * @Max: 7
516  * @Default: 7
517  *
518  * Related: NA
519  *
520  * Supported Feature: 11AC
521  *
522  * Usage: External
523  *
524  * </ini>
525  */
526 #define CFG_VHT_AMPDU_LEN_EXPONENT CFG_INI_UINT( \
527 		"gVhtAmpduLenExponent", \
528 		0, \
529 		7, \
530 		7, \
531 		CFG_VALUE_OR_DEFAULT, \
532 		"VHT AMPDU Len in Exponent")
533 
534 /*
535  * <ini>
536  * gVhtMpduLen - VHT MPDU length
537  * @Min: 0
538  * @Max: 2
539  * @Default: 2
540  *
541  * Related: NA
542  *
543  * Supported Feature: 11AC
544  *
545  * Usage: External
546  *
547  * </ini>
548  */
549 #define CFG_VHT_MPDU_LEN CFG_INI_UINT( \
550 		"gVhtMpduLen", \
551 		0, \
552 		2, \
553 		2, \
554 		CFG_VALUE_OR_DEFAULT, \
555 		"VHT MPDU Length")
556 
557 /*
558  * <ini>
559  * gEnableTxBFeeSAP - Enable / Disable Tx beamformee in SAP mode
560  * @Min: 0
561  * @Max: 1
562  * @Default: 1
563  *
564  * Related: NA
565  *
566  * Supported Feature: 11AC
567  *
568  * Usage: External
569  *
570  * </ini>
571  */
572 #define CFG_VHT_ENABLE_TXBF_SAP_MODE CFG_INI_BOOL( \
573 			"gEnableTxBFeeSAP", \
574 			1, \
575 			"Enable tx bf sap mode")
576 
577 /*
578  * <ini>
579  * enable_subfee_vendor_vhtie - ini to enable/disable SU Bformee in vendor VHTIE
580  * @Min: 0
581  * @Max: 1
582  * @Default: 1
583  *
584  * This ini is used to enable/disable SU Bformee in vendor vht ie if gTxBFEnable
585  * is enabled. if gTxBFEnable is 0 this will not have any effect.
586  *
587  * Related: gTxBFEnable.
588  *
589  * Supported Feature: STA
590  *
591  * Usage: External
592  *
593  * </ini>
594  */
595 #define CFG_ENABLE_SUBFEE_IN_VENDOR_VHTIE CFG_INI_BOOL( \
596 			"enable_subfee_vendor_vhtie", \
597 			1, \
598 			"Enable subfee in vendor vht ie")
599 
600 /*
601  * <ini>
602  * enable_vhtmcs_10_11_support - Enable/Disable vht mcs 10, 11 support
603  * @Min: 0
604  * @Max: 1
605  * @Default: 1
606  *
607  * This ini is  used to enable/disable mcs 10, 11 support.
608  *
609  * Related: NA
610  *
611  * Usage: Internal
612  *
613  * </ini>
614  */
615 #define CFG_ENABLE_VHT_MCS_10_11 CFG_INI_BOOL( \
616 		"enable_vhtmcs_10_11_support", \
617 		1, \
618 		"Enable/Disable vht mcs 10, 11 support")
619 
620 #define CFG_VHT_CAPS_ALL \
621 	CFG(CFG_VHT_SUPP_CHAN_WIDTH) \
622 	CFG(CFG_VHT_SU_BEAMFORMEE_CAP) \
623 	CFG(CFG_VHT_BEAMFORMEE_ANT_SUPP) \
624 	CFG(CFG_VHT_ENABLE_TX_SU_BEAM_FORMER) \
625 	CFG(CFG_VHT_NUM_SOUNDING_DIMENSIONS) \
626 	CFG(CFG_VHT_MU_BEAMFORMER_CAP) \
627 	CFG(CFG_VHT_TXOP_PS) \
628 	CFG(CFG_VHT_HTC_VHTC) \
629 	CFG(CFG_VHT_LINK_ADAPTATION_CAP) \
630 	CFG(CFG_VHT_RX_ANT_PATTERN) \
631 	CFG(CFG_VHT_TX_ANT_PATTERN) \
632 	CFG(CFG_VHT_RX_SUPP_DATA_RATE) \
633 	CFG(CFG_VHT_TX_SUPP_DATA_RATE) \
634 	CFG(CFG_VHT_ENABLE_TXBF_IN_20MHZ) \
635 	CFG(CFG_VHT_CHANNEL_WIDTH) \
636 	CFG(CFG_VHT_ENABLE_RX_MCS_8_9) \
637 	CFG(CFG_VHT_ENABLE_TX_MCS_8_9) \
638 	CFG(CFG_VHT_ENABLE_RX_MCS2x2_8_9) \
639 	CFG(CFG_VHT_ENABLE_TX_MCS2x2_8_9) \
640 	CFG(CFG_ENABLE_VHT20_MCS9) \
641 	CFG(CFG_VHT_ENABLE_2x2_CAP_FEATURE) \
642 	CFG(CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE) \
643 	CFG(CFG_VHT_ENABLE_PAID_FEATURE) \
644 	CFG(CFG_VHT_ENABLE_GID_FEATURE) \
645 	CFG(CFG_ENABLE_VHT_FOR_24GHZ) \
646 	CFG(CFG_ENABLE_VENDOR_VHT_FOR_24GHZ) \
647 	CFG(CFG_VHT_AMPDU_LEN_EXPONENT) \
648 	CFG(CFG_VHT_MPDU_LEN) \
649 	CFG(CFG_VHT_ENABLE_TXBF_SAP_MODE) \
650 	CFG(CFG_ENABLE_SUBFEE_IN_VENDOR_VHTIE) \
651 	CFG(CFG_TX_BF_CAP) \
652 	CFG(CFG_AS_CAP) \
653 	CFG(CFG_DISABLE_LDPC_WITH_TXBF_AP) \
654 	CFG(CFG_ENABLE_VHT_MCS_10_11)
655 
656 #endif /* __CFG_MLME_VHT_CAPS_H */
657