xref: /wlan-driver/qcacld-3.0/components/pmo/dispatcher/inc/wlan_pmo_extwow_cfg.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2012-2019 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 #ifndef WLAN_PMO_EXTWOW_CFG_H__
20 #define WLAN_PMO_EXTWOW_CFG_H__
21 
22 #ifdef WLAN_FEATURE_EXTWOW_SUPPORT
23 /*
24  * <ini>
25  * gExtWoWgotoSuspend - Enable/Disable Extended WoW
26  * @Min: 0
27  * @Max: 1
28  * @Default: 1
29  *
30  * This ini is used to enable/disable Extended WoW.
31  *
32  * Related: None
33  *
34  * Supported Feature: Power Save
35  *
36  * Usage: External
37  *
38  * </ini>
39  */
40 #define CFG_EXTWOW_GOTO_SUSPEND CFG_INI_BOOL("gExtWoWgotoSuspend", \
41 					     1, \
42 					     "Enable Ext WoW goto support")
43 /*
44  * <ini>
45  * gExtWowApp1WakeupPinNumber - Set wakeup1 PIN number
46  * @Min: 0
47  * @Max: 255
48  * @Default: 12
49  *
50  * This ini is used to set EXT WOW APP1 wakeup PIN number
51  *
52  * Related: None
53  *
54  * Supported Feature: Power Save
55  *
56  * Usage: External
57  *
58  * </ini>
59  */
60 #define CFG_EXTWOW_APP1_WAKE_PIN_NUMBER \
61 		CFG_INI_UINT("gExtWowApp1WakeupPinNumber", \
62 			     0, 255, 12, \
63 			     CFG_VALUE_OR_DEFAULT, \
64 			     "Set wakeup1 PIN number")
65 /*
66  * <ini>
67  * gExtWowApp2WakeupPinNumber - Set wakeup2 PIN number
68  * @Min: 0
69  * @Max: 255
70  * @Default: 16
71  *
72  * This ini is used to set EXT WOW APP2 wakeup PIN number
73  *
74  * Related: None
75  *
76  * Supported Feature: Power Save
77  *
78  * Usage: External
79  *
80  * </ini>
81  */
82 #define CFG_EXTWOW_APP2_WAKE_PIN_NUMBER \
83 		CFG_INI_UINT("gExtWowApp2WakeupPinNumber", \
84 			     0, 255, 16, \
85 			     CFG_VALUE_OR_DEFAULT, \
86 			     "Set wakeup2 PIN number")
87 /*
88  * <ini>
89  * gExtWoWApp2KAInitPingInterval - Set Keep Alive Init Ping Interval
90  * @Min: 0
91  * @Max: 0xffffffff
92  * @Default: 240
93  *
94  * This ini is used to set Keep Alive Init Ping Interval for EXT WOW
95  *
96  * Related: None
97  *
98  * Supported Feature: Power Save
99  *
100  * Usage: External
101  *
102  * </ini>
103  */
104 #define CFG_EXTWOW_KA_INIT_PING_INTERVAL \
105 		CFG_INI_UINT("gExtWoWApp2KAInitPingInterval", \
106 			     0, 0xffffffff, 240, \
107 			     CFG_VALUE_OR_DEFAULT, \
108 			     "Set Keep Alive Init Ping Interval")
109 /*
110  * <ini>
111  * gExtWoWApp2KAMinPingInterval - Set Keep Alive Minimum Ping Interval
112  * @Min: 0
113  * @Max: 0xffffffff
114  * @Default: 240
115  *
116  * This ini is used to set Keep Alive Minimum Ping Interval for EXT WOW
117  *
118  * Related: None
119  *
120  * Supported Feature: Power Save
121  *
122  * Usage: External
123  *
124  * </ini>
125  */
126 #define CFG_EXTWOW_KA_MIN_PING_INTERVAL \
127 		CFG_INI_UINT("gExtWoWApp2KAMinPingInterval", \
128 			     0, 0xffffffff, 240, \
129 			     CFG_VALUE_OR_DEFAULT, \
130 			     "Set Keep Alive Minimum Ping Interval")
131 /*
132  * <ini>
133  * gExtWoWApp2KAMaxPingInterval - Set Keep Alive Maximum Ping Interval
134  * @Min: 0
135  * @Max: 0xffffffff
136  * @Default: 1280
137  *
138  * This ini is used to set Keep Alive Maximum Ping Interval for EXT WOW
139  *
140  * Related: None
141  *
142  * Supported Feature: Power Save
143  *
144  * Usage: External
145  *
146  * </ini>
147  */
148 #define CFG_EXTWOW_KA_MAX_PING_INTERVAL \
149 		CFG_INI_UINT("gExtWoWApp2KAMaxPingInterval", \
150 			     0, 0xffffffff, 1280, \
151 			     CFG_VALUE_OR_DEFAULT, \
152 			     "Set Keep Alive Maximum Ping Interval")
153 /*
154  * <ini>
155  * gExtWoWApp2KAIncPingInterval - Set Keep Alive increment of Ping Interval
156  * @Min: 0
157  * @Max: 0xffffffff
158  * @Default: 4
159  *
160  * This ini is used to set Keep Alive increment of Ping Interval for EXT WOW
161  *
162  * Related: None
163  *
164  * Supported Feature: Power Save
165  *
166  * Usage: External
167  *
168  * </ini>
169  */
170 #define CFG_EXTWOW_KA_INC_PING_INTERVAL \
171 		CFG_INI_UINT("gExtWoWApp2KAIncPingInterval", \
172 			     0, 0xffffffff, 4, \
173 			     CFG_VALUE_OR_DEFAULT, \
174 			     "Set Keep Alive increment of Ping Interval")
175 /*
176  * <ini>
177  * gExtWoWApp2TcpSrcPort - Set TCP source port
178  * @Min: 0
179  * @Max: 65535
180  * @Default: 5000
181  *
182  * This ini is used to set TCP source port when EXT WOW is enabled
183  *
184  * Related: None
185  *
186  * Supported Feature: Power Save
187  *
188  * Usage: External
189  *
190  * </ini>
191  */
192 #define CFG_EXTWOW_TCP_SRC_PORT \
193 		CFG_INI_UINT("gExtWoWApp2TcpSrcPort", \
194 			     0, 65535, 5000, \
195 			     CFG_VALUE_OR_DEFAULT, \
196 			     "Set TCP source port")
197 /*
198  * <ini>
199  * gExtWoWApp2TcpDstPort - Set TCP Destination port
200  * @Min: 0
201  * @Max: 65535
202  * @Default: 5001
203  *
204  * This ini is used to set TCP Destination port when EXT WOW is enabled
205  *
206  * Related: None
207  *
208  * Supported Feature: Power Save
209  *
210  * Usage: External
211  *
212  * </ini>
213  */
214 #define CFG_EXTWOW_TCP_DST_PORT \
215 		CFG_INI_UINT("gExtWoWApp2TcpDstPort", \
216 			     0, 65535, 5001, \
217 			     CFG_VALUE_OR_DEFAULT, \
218 			     "Set TCP Destination port")
219 /*
220  * <ini>
221  * gExtWoWApp2TcpTxTimeout - Set TCP tx timeout
222  * @Min: 0
223  * @Max: 0xffffffff
224  * @Default: 200
225  *
226  * This ini is used to set TCP Tx timeout when EXT WOW is enabled
227  *
228  * Related: None
229  *
230  * Supported Feature: Power Save
231  *
232  * Usage: External
233  *
234  * </ini>
235  */
236 #define CFG_EXTWOW_TCP_TX_TIMEOUT \
237 		CFG_INI_UINT("gExtWoWApp2TcpTxTimeout", \
238 			     0, 0xffffffff, 200, \
239 			     CFG_VALUE_OR_DEFAULT, \
240 			     "Set TCP tx timeout")
241 
242 /*
243  * <ini>
244  * gExtWoWApp2TcpRxTimeout - Set TCP rx timeout
245  * @Min: 0
246  * @Max: 0xffffffff
247  * @Default: 200
248  *
249  * This ini is used to set TCP Rx timeout when EXT WOW is enabled
250  *
251  * Supported Feature: Power Save
252  *
253  * Usage: External
254  *
255  * </ini>
256  */
257 #define CFG_EXTWOW_TCP_RX_TIMEOUT \
258 		CFG_INI_UINT("gExtWoWApp2TcpRxTimeout", \
259 			     0, 0xffffffff, 200, \
260 			     CFG_VALUE_OR_DEFAULT, \
261 			     "ExtWow App2 tcp rx timeout")
262 
263 #define CFG_EXTWOW_ALL \
264 	CFG(CFG_EXTWOW_GOTO_SUSPEND) \
265 	CFG(CFG_EXTWOW_APP1_WAKE_PIN_NUMBER) \
266 	CFG(CFG_EXTWOW_APP2_WAKE_PIN_NUMBER) \
267 	CFG(CFG_EXTWOW_KA_INIT_PING_INTERVAL) \
268 	CFG(CFG_EXTWOW_KA_MIN_PING_INTERVAL) \
269 	CFG(CFG_EXTWOW_KA_MAX_PING_INTERVAL) \
270 	CFG(CFG_EXTWOW_KA_INC_PING_INTERVAL) \
271 	CFG(CFG_EXTWOW_TCP_SRC_PORT) \
272 	CFG(CFG_EXTWOW_TCP_DST_PORT) \
273 	CFG(CFG_EXTWOW_TCP_TX_TIMEOUT) \
274 	CFG(CFG_EXTWOW_TCP_RX_TIMEOUT)
275 #else
276 #define CFG_EXTWOW_ALL
277 #endif /* WLAN_FEATURE_EXTWOW_SUPPORT */
278 #endif /* WLAN_PMO_EXTWOW_CFG_H_ */
279