1 /*
2  * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /**
21  * DOC: This file contains centralized definitions of converged configuration.
22  */
23 
24 #ifndef __CFG_MLME_FEATURE_FLAG_H
25 #define __CFG_MLME_FEATURE_FLAG_H
26 
27 #define CFG_ACCEPT_SHORT_SLOT_ASSOC_ONLY CFG_BOOL( \
28 		"accept_short_slot_assoc", \
29 		0, \
30 		"Accept short slot assoc only")
31 
32 #define CFG_HCF_ENABLED CFG_BOOL( \
33 		"enable_hcf", \
34 		0, \
35 		"HCF enabled")
36 
37 #define CFG_RSN_ENABLED CFG_BOOL( \
38 		"enable_rsn", \
39 		0, \
40 		"RSN enabled")
41 
42 #define CFG_11G_SHORT_PREAMBLE_ENABLED CFG_BOOL( \
43 		"enable_short_preamble_11g", \
44 		0, \
45 		"Short Preamble Enable")
46 
47 #define CFG_11G_SHORT_SLOT_TIME_ENABLED CFG_BOOL( \
48 		"enable_short_slot_time_11g", \
49 		1, \
50 		"Short Slot time enable")
51 
52 #define CFG_CHANNEL_BONDING_MODE CFG_UINT( \
53 		"channel_bonding_mode", \
54 		0, \
55 		10, \
56 		0, \
57 		CFG_VALUE_OR_DEFAULT, \
58 		"channel bonding mode")
59 
60 #define CFG_BLOCK_ACK_ENABLED CFG_UINT( \
61 		"enable_block_ack", \
62 		0, \
63 		3, \
64 		0, \
65 		CFG_VALUE_OR_DEFAULT, \
66 		"enable block Ack")
67 /*
68  * <ini>
69  * gEnableAMPDUPS - Enable the AMPDUPS
70  * @Min: 0
71  * @Max: 1
72  * @Default: 0
73  *
74  * This ini is used to set default AMPDUPS
75  *
76  * Related: None
77  *
78  * Supported Feature: STA
79  *
80  * Usage: External
81  *
82  * </ini>
83  */
84 
85 #define CFG_ENABLE_AMPDUPS CFG_INI_BOOL( \
86 				"gEnableAMPDUPS", \
87 				0, \
88 				"Enable AMPDU")
89 
90 /*
91  * <ini>
92  * gFWMccRtsCtsProtection - RTS-CTS protection in MCC.
93  * @Min: 0
94  * @Max: 1
95  * @Default: 0
96  *
97  * This ini is used to enable/disable use of long duration RTS-CTS protection
98  * when SAP goes off channel in MCC mode.
99  *
100  * Related: None.
101  *
102  * Supported Feature: Concurrency
103  *
104  * Usage: External
105  *
106  * </ini>
107  */
108 #define CFG_FW_MCC_RTS_CTS_PROT CFG_INI_UINT( \
109 		"gFWMccRtsCtsProtection", \
110 		0, 1, 0, \
111 		CFG_VALUE_OR_DEFAULT, \
112 		"RTS-CTS protection in MCC")
113 
114 /*
115  * <ini>
116  * gFWMccBCastProbeResponse - Broadcast Probe Response in MCC.
117  * @Min: 0
118  * @Max: 1
119  * @Default: 0
120  *
121  * This ini is used to enable/disable use of broadcast probe response to
122  * increase the detectability of SAP in MCC mode.
123  *
124  * Related: None.
125  *
126  * Supported Feature: Concurrency
127  *
128  * Usage: External
129  *
130  * </ini>
131  */
132 
133 #define CFG_FW_MCC_BCAST_PROB_RESP CFG_INI_UINT( \
134 		"gFWMccBCastProbeResponse", \
135 		0, 1, 0, \
136 		CFG_VALUE_OR_DEFAULT, \
137 		"Broadcast Probe Response in MCC")
138 
139 /*
140  * <ini>
141  * gEnableMCCMode - Enable/Disable MCC feature.
142  * @Min: 0
143  * @Max: 1
144  * @Default: 1
145  *
146  * This ini is used to enable/disable MCC feature.
147  *
148  * Related: None.
149  *
150  * Supported Feature: Concurrency
151  *
152  * Usage: External
153  *
154  * </ini>
155  */
156 #define CFG_MCC_FEATURE CFG_INI_UINT( \
157 		"gEnableMCCMode", \
158 		0, 1, 1, \
159 		CFG_VALUE_OR_DEFAULT, \
160 		"Enable/Disable MCC feature.")
161 
162 /*
163  * <ini>
164  * gChannelBondingMode24GHz - Configures Channel Bonding in 24 GHz
165  * @Min: 0
166  * @Max: 10
167  * @Default: 1
168  *
169  * This ini is used to set default channel bonding mode 24GHZ
170  *
171  * 0 - 20MHz IF bandwidth centered on IF carrier
172  * 1 - 40MHz IF bandwidth with lower 20MHz supporting the primary channel
173  * 2 - reserved
174  * 3 - 40MHz IF bandwidth with higher 20MHz supporting the primary channel
175  * 4 - 20/40MHZ offset LOW 40/80MHZ offset CENTERED
176  * 5 - 20/40MHZ offset CENTERED 40/80MHZ offset CENTERED
177  * 6 - 20/40MHZ offset HIGH 40/80MHZ offset CENTERED
178  * 7 - 20/40MHZ offset LOW 40/80MHZ offset LOW
179  * 8 - 20/40MHZ offset HIGH 40/80MHZ offset LOW
180  * 9 - 20/40MHZ offset LOW 40/80MHZ offset HIGH
181  * 10 - 20/40MHZ offset-HIGH 40/80MHZ offset HIGH
182  *
183  * Related: None
184  *
185  * Supported Feature: STA
186  *
187  * Usage: External
188  *
189  * </ini>
190  */
191 #define CFG_CHANNEL_BONDING_MODE_24GHZ CFG_INI_UINT( \
192 	"gChannelBondingMode24GHz", \
193 	0, \
194 	10, \
195 	1, \
196 	CFG_VALUE_OR_DEFAULT, \
197 	"Configures Channel Bonding in 24 GHz")
198 
199 /*
200  * <ini>
201  * gChannelBondingMode5GHz - Configures Channel Bonding in 5 GHz
202  * @Min: 0
203  * @Max: 10
204  * @Default: 1
205  *
206  * This ini is used to set default channel bonding mode 5GHZ
207  *
208  * Values of 0 - 10 have the same meanings as for gChannelBondingMode24GHz.
209  *
210  * Related: None
211  *
212  * Supported Feature: STA
213  *
214  * Usage: External
215  *
216  * </ini>
217  */
218 #define CFG_CHANNEL_BONDING_MODE_5GHZ CFG_INI_UINT( \
219 	"gChannelBondingMode5GHz", \
220 	0, \
221 	10, \
222 	1, \
223 	CFG_VALUE_OR_DEFAULT, \
224 	"Configures Channel Bonding in 5 GHz")
225 
226 /*
227  * <ini>
228  * update_cw_allowed - process set channel width or not
229  * @Min: 0
230  * @Max: 1
231  * @Default: 1
232  *
233  * This ini is used to check whether driver allowed to process set channel
234  * width request from upper layer or not.
235  *
236  * Related: None
237  *
238  * Supported Feature: STA
239  *
240  * Usage: External
241  *
242  * </ini>
243  */
244 #define CFG_ALLOW_UPDATE_CHANNEL_WIDTH CFG_INI_BOOL( \
245 					"update_cw_allowed", \
246 					1, \
247 					"is update chan width allowed")
248 
249 #define CFG_FEATURE_FLAG_ALL \
250 	CFG(CFG_ACCEPT_SHORT_SLOT_ASSOC_ONLY) \
251 	CFG(CFG_HCF_ENABLED) \
252 	CFG(CFG_RSN_ENABLED) \
253 	CFG(CFG_FW_MCC_RTS_CTS_PROT) \
254 	CFG(CFG_FW_MCC_BCAST_PROB_RESP) \
255 	CFG(CFG_MCC_FEATURE) \
256 	CFG(CFG_11G_SHORT_PREAMBLE_ENABLED) \
257 	CFG(CFG_11G_SHORT_SLOT_TIME_ENABLED) \
258 	CFG(CFG_CHANNEL_BONDING_MODE) \
259 	CFG(CFG_BLOCK_ACK_ENABLED) \
260 	CFG(CFG_ENABLE_AMPDUPS) \
261 	CFG(CFG_CHANNEL_BONDING_MODE_24GHZ) \
262 	CFG(CFG_CHANNEL_BONDING_MODE_5GHZ) \
263 	CFG(CFG_ALLOW_UPDATE_CHANNEL_WIDTH)
264 
265 #endif /* __CFG_MLME_FEATURE_FLAG_H */
266 
267