xref: /wlan-driver/qcacld-3.0/components/mlme/dispatcher/inc/cfg_mlme_dfs.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2022 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_DFS_H
25 #define __CFG_MLME_DFS_H
26 
27 /*
28  * <ini>
29  * gsap_tx_leakage_threshold - sap tx leakage threshold
30  * @Min: 100
31  * @Max: 1000
32  * @Default: 310
33  *
34  * customer can set this value from 100 to 1000 which means
35  * sap tx leakage threshold is -10db to -100db
36  *
37  * Related: none
38  *
39  * Usage: External
40  *
41  * </ini>
42  */
43 #define CFG_SAP_TX_LEAKAGE_THRESHOLD CFG_INI_UINT( \
44 			"gsap_tx_leakage_threshold", \
45 			100, \
46 			1000, \
47 			310, \
48 			CFG_VALUE_OR_DEFAULT, \
49 			"sap tx leakage threshold")
50 
51 /*
52  * <ini>
53  * gDFSradarMappingPriMultiplier - dfs pri multiplier
54  * @Min: 1
55  * @Max: 10
56  * @Default: 2
57  *
58  * customer can set this value from 1 to 10 which means
59  * host could handle missing pulses while there is high
60  * channel loading, for example: 30% ETSI and 50% Japan W53
61  *
62  * Related: none
63  *
64  * Usage: External
65  *
66  * </ini>
67  */
68 #define CFG_DFS_RADAR_PRI_MULTIPLIER CFG_INI_UINT( \
69 			"gDFSradarMappingPriMultiplier", \
70 			1, \
71 			10, \
72 			2, \
73 			CFG_VALUE_OR_DEFAULT, \
74 			"dfs pri multiplier")
75 
76 /*
77  * <ini>
78  * gDfsBeaconTxEnhanced - beacon tx enhanced
79  * @Min: 0
80  * @Max: 1
81  * @Default: 0
82  *
83  * This ini is used to enhance dfs beacon tx
84  *
85  * Related: none
86  *
87  * Usage: External
88  *
89  * </ini>
90  */
91 #define CFG_DFS_BEACON_TX_ENHANCED CFG_INI_BOOL( \
92 			"gDfsBeaconTxEnhanced", \
93 			0, \
94 			"beacon tx enhanced")
95 
96 /*
97  * <ini>
98  * gPreferNonDfsChanOnRadar - During random channel selection prefer non dfs
99  * @Min: 0
100  * @Max: 1
101  * @Default: 0
102  *
103  * During random channel selection prefer non dfs.
104  *
105  * Related: none
106  *
107  * Usage: External
108  *
109  * </ini>
110  */
111 #define CFG_ENABLE_NON_DFS_CHAN_ON_RADAR CFG_INI_BOOL( \
112 			"gPreferNonDfsChanOnRadar", \
113 			0, \
114 			"channel selection prefer non dfs")
115 
116 /*
117  * <ini>
118  * dfsPhyerrFilterOffload - Enable dfs phyerror filtering offload in FW
119  * @Min: 0
120  * @Max: 1
121  * @Default: 0
122  *
123  * This ini is used to to enable dfs phyerror filtering offload to firmware
124  * Enabling it will cause basic phy error to be discarding in firmware.
125  * Related: NA.
126  *
127  * Supported Feature: DFS
128  *
129  * Usage: External
130  *
131  * </ini>
132  */
133 #define CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD CFG_INI_BOOL( \
134 			"dfsPhyerrFilterOffload", \
135 			0, \
136 			"dfs phyerror filtering offload")
137 
138 /*
139  * <ini>
140  * gIgnoreCAC - Used to ignore CAC
141  * @Min: 0
142  * @Max: 1
143  * @Default: 0
144  *
145  * This ini is used to set default CAC
146  *
147  * Related: None
148  *
149  * Supported Feature: DFS
150  *
151  * Usage: External
152  *
153  * </ini>
154  */
155 #define CFG_IGNORE_CAC CFG_INI_BOOL( \
156 			"gIgnoreCAC", \
157 			0, \
158 			"ignore CAC on DFS channel")
159 
160 /*
161  * <ini>
162  * gDisableDFSChSwitch - Disable channel switch if radar is found
163  * @Min: 0
164  * @Max: 1
165  * @Default: 0
166  *
167  * This ini is used to disable channel switch if radar is found
168  * on that channel.
169  * Related: NA.
170  *
171  * Supported Feature: DFS
172  *
173  * Usage: Internal
174  *
175  * </ini>
176  */
177 #define CFG_DISABLE_DFS_CH_SWITCH CFG_INI_BOOL( \
178 			"gDisableDFSChSwitch", \
179 			0, \
180 			"Disable channel switch on radar")
181 
182 /*
183  * <ini>
184  * gEnableDFSMasterCap - Enable DFS master capability
185  * @Min: 0
186  * @Max: 1
187  * @Default: 0
188  *
189  * This ini is used to enable/disable the DFS master capability.
190  * Disabling it will cause driver to not advertise the spectrum
191  * management capability
192  * Related: NA.
193  *
194  * Supported Feature: DFS
195  *
196  * Usage: External
197  *
198  * </ini>
199  */
200 #define CFG_ENABLE_DFS_MASTER_CAPABILITY CFG_INI_BOOL( \
201 			"gEnableDFSMasterCap", \
202 			0, \
203 			"DFS master mode capability")
204 
205 /*
206  * <ini>
207  * gDisableDfsJapanW53 - Block W53 channels in random channel selection
208  * @Min: 0
209  * @Max: 1
210  * @Default: 0
211  *
212  * This ini is used to block W53 Japan channel in random channel selection
213  *
214  * Related: none
215  *
216  * Supported Feature: DFS
217  *
218  * Usage: External
219  *
220  * </ini>
221  */
222 #define CFG_DISABLE_DFS_JAPAN_W53 CFG_INI_BOOL( \
223 			"gDisableDfsJapanW53", \
224 			0, \
225 			"Block W53 channels in random selection")
226 
227 #define CFG_DFS_ALL \
228 	CFG(CFG_IGNORE_CAC) \
229 	CFG(CFG_DISABLE_DFS_CH_SWITCH) \
230 	CFG(CFG_DFS_BEACON_TX_ENHANCED) \
231 	CFG(CFG_SAP_TX_LEAKAGE_THRESHOLD) \
232 	CFG(CFG_DFS_RADAR_PRI_MULTIPLIER) \
233 	CFG(CFG_ENABLE_NON_DFS_CHAN_ON_RADAR) \
234 	CFG(CFG_ENABLE_DFS_MASTER_CAPABILITY) \
235 	CFG(CFG_DISABLE_DFS_JAPAN_W53) \
236 	CFG(CFG_ENABLE_DFS_PHYERR_FILTEROFFLOAD)
237 
238 #endif /* __CFG_MLME_DFS_H */
239