xref: /wlan-dirver/qca-wifi-host-cmn/umac/green_ap/dispatcher/inc/cfg_green_ap_params.h (revision 8cfe6b10058a04cafb17eed051f2ddf11bee8931)
1 /*
2  * Copyright (c) 2012-2019 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_GREEN_AP_PARAMS_H
25 #define __CFG_GREEN_AP_PARAMS_H
26 
27 /*
28  * <ini>
29  * gEnableGreenAp - Enable green ap feature
30  * @Min: 0
31  * @Max: 1
32  * @Default: 0
33  *
34  * This ini is used to enable green ap feature
35  *
36  * Related: None
37  *
38  * Supported Feature: SAP
39  *
40  * Usage: Internal/External
41  *
42  * </ini>
43  */
44 
45 #define CFG_ENABLE_GREEN_AP_FEATURE CFG_INI_BOOL( \
46 		"gEnableGreenAp", \
47 		PLATFORM_VALUE(1, 0), \
48 		"enable green ap")
49 
50 /*
51  * <ini>
52  * gEnableEGAP - Enable the enhanced green ap feature
53  * @Min: 0
54  * @Max: 1
55  * @Default: 1
56  *
57  * This ini is used to enable the enhanced green ap feature
58  *
59  * Related: None
60  *
61  * Supported Feature: SAP
62  *
63  * Usage: Internal/External
64  *
65  * </ini>
66  */
67 
68 #define CFG_ENABLE_EGAP_FEATURE CFG_INI_BOOL( \
69 		"gEnableEGAP", \
70 		PLATFORM_VALUE(1, 0), \
71 		"enable e-gap")
72 /*
73  * <ini>
74  * gEGAPInactTime - configure the inactive time for EGAP
75  * @Min: 0
76  * @Max: 300000
77  * @Default: 2000
78  *
79  * This ini is used to configure the inactive time for EGAP
80  *
81  * Related: None
82  *
83  * Supported Feature: SAP
84  *
85  * Usage: Internal/External
86  *
87  * </ini>
88  */
89 
90 #define CFG_EGAP_INACT_TIME_FEATURE CFG_INI_UINT( \
91 		"gEGAPInactTime", \
92 		0, \
93 		300000, \
94 		2000, \
95 		CFG_VALUE_OR_DEFAULT, \
96 		"egap inactivity time")
97 
98 #ifdef WLAN_SUPPORT_GAP_LL_PS_MODE
99 /*
100  * <ini>
101  * gGAPLowBeaconMult - configure Low Beacon interval multiplier.
102  * @Min: 0
103  * @Max: 10
104  * @Default: 10
105  *
106  * This ini is used to configure the Low Beacon interval
107  * multiplier which is used to calculate Low Beacon interval for
108  * power save.
109  *
110  * Related: None
111  *
112  * Supported Feature: SAP
113  *
114  * Usage: External
115  *
116  * </ini>
117  */
118 
119 #define CFG_GAP_LL_PS_LOW_BEACON_MULT CFG_INI_UINT( \
120 		"gGAPLowBeaconMult", \
121 		0, \
122 		10, \
123 		10, \
124 		CFG_VALUE_OR_DEFAULT, \
125 		"low beacon interval multiplier")
126 
127 #define CFG_GAP_LL_PS_ALL_CFG CFG(CFG_GAP_LL_PS_LOW_BEACON_MULT)
128 #else
129 #define CFG_GAP_LL_PS_ALL_CFG
130 #endif
131 
132 /*
133  * <ini>
134  * gEGAPWaitTime - configure the wait time for EGAP
135  * @Min: 0
136  * @Max: 300000
137  * @Default: 150
138  *
139  * This ini is used to configure the wait time for EGAP
140  *
141  * Related: None
142  *
143  * Supported Feature: SAP
144  *
145  * Usage: Internal/External
146  *
147  * </ini>
148  */
149 
150 #define CFG_EGAP_WAIT_TIME_FEATURE CFG_INI_UINT( \
151 		"gEGAPWaitTime", \
152 		0, \
153 		300000, \
154 		150, \
155 		CFG_VALUE_OR_DEFAULT, \
156 		"egap wait time")
157 /*
158  * <ini>
159  * gEGAPFeatures - Configure the EGAP flags
160  * @Min: 0
161  * @Max: 15
162  * @Default: 3
163  *
164  * This ini is used to configure the EGAP flags
165  *
166  * Related: None
167  *
168  * Supported Feature: SAP
169  *
170  * Usage: Internal/External
171  *
172  * </ini>
173  */
174 
175 #define CFG_EGAP_FLAGS_FEATURE CFG_INI_UINT( \
176 		"gEGAPFeatures", \
177 		0, \
178 		15, \
179 		3, \
180 		CFG_VALUE_OR_DEFAULT, \
181 		"egap flag")
182 
183 #ifdef WLAN_SUPPORT_GREEN_AP
184 #define CFG_GREEN_AP_ALL \
185 	CFG(CFG_ENABLE_GREEN_AP_FEATURE) \
186 	CFG(CFG_ENABLE_EGAP_FEATURE) \
187 	CFG(CFG_EGAP_INACT_TIME_FEATURE) \
188 	CFG(CFG_EGAP_WAIT_TIME_FEATURE) \
189 	CFG(CFG_EGAP_FLAGS_FEATURE) \
190 	CFG_GAP_LL_PS_ALL_CFG
191 #else
192 #define CFG_GREEN_AP_ALL
193 #endif
194 
195 #endif /* __CFG_GREEN_AP_PARAMS_H */
196 
197