1 /*
2 * Copyright (c) 2018-2020 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: Contains p2p configures interface definitions
22 */
23
24 #ifndef _WLAN_TDLS_CFG_API_H_
25 #define _WLAN_TDLS_CFG_API_H_
26
27 #include <qdf_types.h>
28
29 struct wlan_objmgr_psoc;
30
31 #ifdef FEATURE_WLAN_TDLS
32 /**
33 * cfg_tdls_get_support_enable() - get tdls support enable
34 * @psoc: pointer to psoc object
35 * @val: pointer to tdls support enable/disable
36 *
37 * This function gets tdls support enable
38 */
39 QDF_STATUS
40 cfg_tdls_get_support_enable(struct wlan_objmgr_psoc *psoc,
41 bool *val);
42
43 /**
44 * cfg_tdls_set_support_enable() - set tdls support enable
45 * @psoc: pointer to psoc object
46 * @val: set tdls support enable/disable
47 *
48 * This function sets tdls support enable
49 */
50 QDF_STATUS
51 cfg_tdls_set_support_enable(struct wlan_objmgr_psoc *psoc,
52 bool val);
53
54 /**
55 * cfg_tdls_get_external_control() - get tdls external control
56 * @psoc: pointer to psoc object
57 * @val: pointer to tdls external control enable/disable
58 *
59 * This function gets tdls external control
60 */
61 QDF_STATUS
62 cfg_tdls_get_external_control(struct wlan_objmgr_psoc *psoc,
63 bool *val);
64
65 /**
66 * cfg_tdls_get_uapsd_mask() - get tdls uapsd mask
67 * @psoc: pointer to psoc object
68 * @val: pointer to tdls uapsd mask
69 *
70 * This function gets tdls uapsd mask
71 */
72 QDF_STATUS
73 cfg_tdls_get_uapsd_mask(struct wlan_objmgr_psoc *psoc,
74 uint32_t *val);
75
76 /**
77 * cfg_tdls_get_buffer_sta_enable() - get tdls buffer sta enable
78 * @psoc: pointer to psoc object
79 * @val: pointer to tdls buffer sta enable
80 *
81 * This function gets tdls buffer sta enable
82 */
83 QDF_STATUS
84 cfg_tdls_get_buffer_sta_enable(struct wlan_objmgr_psoc *psoc,
85 bool *val);
86
87 /**
88 * cfg_tdls_set_buffer_sta_enable() - set tdls buffer sta enable
89 * @psoc: pointer to psoc object
90 * @val: tdls buffer sta enable
91 *
92 * This function sets tdls buffer sta enable
93 */
94 QDF_STATUS
95 cfg_tdls_set_buffer_sta_enable(struct wlan_objmgr_psoc *psoc,
96 bool val);
97
98 /**
99 * cfg_tdls_get_uapsd_inactivity_time() - get tdls uapsd inactivity time
100 * @psoc: pointer to psoc object
101 * @val: pointer to tdls uapsd inactivity time
102 *
103 * This function gets tdls uapsd inactivity time
104 */
105 QDF_STATUS
106 cfg_tdls_get_uapsd_inactivity_time(struct wlan_objmgr_psoc *psoc,
107 uint32_t *val);
108
109 /**
110 * cfg_tdls_get_rx_pkt_threshold() - get tdls rx pkt threshold
111 * @psoc: pointer to psoc object
112 * @val: pointer to tdls tdls rx pkt threshold
113 *
114 * This function gets tdls rx pkt threshold
115 */
116 QDF_STATUS
117 cfg_tdls_get_rx_pkt_threshold(struct wlan_objmgr_psoc *psoc,
118 uint32_t *val);
119
120 /**
121 * cfg_tdls_get_off_channel_enable() - get tdls off channel enable
122 * @psoc: pointer to psoc object
123 * @val: pointer to tdls off channel enable
124 *
125 * This function gets tdls off channel enable
126 */
127 QDF_STATUS
128 cfg_tdls_get_off_channel_enable(struct wlan_objmgr_psoc *psoc,
129 bool *val);
130
131 /**
132 * cfg_tdls_set_off_channel_enable() - set tdls off channel enable
133 * @psoc: pointer to psoc object
134 * @val: tdls off channel enable
135 *
136 * This function sets tdls off channel enable
137 */
138 QDF_STATUS
139 cfg_tdls_set_off_channel_enable(struct wlan_objmgr_psoc *psoc,
140 bool val);
141
142 /**
143 * cfg_tdls_get_off_channel_enable_orig() - get tdls off channel enable orig
144 * @psoc: pointer to psoc object
145 * @val: pointer to tdls off channel enable
146 *
147 * This function gets tdls off channel enable orig
148 */
149 QDF_STATUS
150 cfg_tdls_get_off_channel_enable_orig(struct wlan_objmgr_psoc *psoc,
151 bool *val);
152
153 /**
154 * cfg_tdls_restore_off_channel_enable() - set tdls off channel enable to
155 * tdls_off_chan_enable_orig
156 * @psoc: pointer to psoc object
157 *
158 * Return: NULL
159 */
160 void cfg_tdls_restore_off_channel_enable(struct wlan_objmgr_psoc *psoc);
161
162 /**
163 * cfg_tdls_store_off_channel_enable() - save tdls off channel enable to
164 * tdls_off_chan_enable_orig
165 * @psoc: pointer to psoc object
166 *
167 * Return: NULL
168 */
169 void cfg_tdls_store_off_channel_enable(struct wlan_objmgr_psoc *psoc);
170
171 /**
172 * cfg_tdls_get_wmm_mode_enable() - get tdls wmm mode enable
173 * @psoc: pointer to psoc object
174 * @val: pointer to tdls wmm mode enable
175 *
176 * This function gets tdls wmm mode enable
177 */
178 QDF_STATUS
179 cfg_tdls_get_wmm_mode_enable(struct wlan_objmgr_psoc *psoc,
180 bool *val);
181
182 /**
183 * cfg_tdls_set_vdev_nss_2g() - set tdls vdev nss 2g
184 * @psoc: pointer to psoc object
185 * @val: tdls vdev nss 2g
186 *
187 * This function sets tdls vdev nss 2g
188 */
189 QDF_STATUS
190 cfg_tdls_set_vdev_nss_2g(struct wlan_objmgr_psoc *psoc,
191 uint8_t val);
192
193 /**
194 * cfg_tdls_set_vdev_nss_5g() - set tdls vdev nss 5g
195 * @psoc: pointer to psoc object
196 * @val: tdls vdev nss 5g
197 *
198 * This function sets tdls vdev nss 5g
199 */
200 QDF_STATUS
201 cfg_tdls_set_vdev_nss_5g(struct wlan_objmgr_psoc *psoc,
202 uint8_t val);
203
204 /**
205 * cfg_tdls_get_sleep_sta_enable() - get tdls sleep sta enable
206 * @psoc: pointer to psoc object
207 * @val: pointer to tdls sleep sta enable
208 *
209 * This function gets tdls sleep sta enable
210 */
211 QDF_STATUS
212 cfg_tdls_get_sleep_sta_enable(struct wlan_objmgr_psoc *psoc,
213 bool *val);
214
215 /**
216 * cfg_tdls_set_sleep_sta_enable() - set tdls sleep sta enable
217 * @psoc: pointer to psoc object
218 * @val: tdls sleep sta enable
219 *
220 * This function sets tdls sleep sta enable
221 */
222 QDF_STATUS
223 cfg_tdls_set_sleep_sta_enable(struct wlan_objmgr_psoc *psoc,
224 bool val);
225
226 /**
227 * cfg_tdls_get_scan_enable() - get tdls scan enable
228 * @psoc: pointer to psoc object
229 * @val: pointer to tdls scan enable
230 *
231 * This function gets tdls scan enable
232 */
233 QDF_STATUS
234 cfg_tdls_get_scan_enable(struct wlan_objmgr_psoc *psoc,
235 bool *val);
236
237 /**
238 * cfg_tdls_get_link_id() - get tdls link id
239 * @psoc: pointer to psoc object
240 *
241 * This function gets tdls link id
242 *
243 * Return: int
244 */
245 int cfg_tdls_get_link_id(struct wlan_objmgr_psoc *psoc);
246
247 /**
248 * cfg_tdls_set_link_id() - get tdls link id
249 * @psoc: pointer to psoc object
250 * @val: the value of link id
251 *
252 * This function gets tdls link id
253 *
254 * Return: QDF_STATUS
255 */
256 QDF_STATUS
257 cfg_tdls_set_link_id(struct wlan_objmgr_psoc *psoc,
258 int val);
259 /**
260 * cfg_tdls_set_scan_enable() - set tdls scan enable
261 * @psoc: pointer to psoc object
262 * @val: tdls scan enable
263 *
264 * This function sets tdls scan enable
265 */
266 QDF_STATUS
267 cfg_tdls_set_scan_enable(struct wlan_objmgr_psoc *psoc,
268 bool val);
269
270 /**
271 * cfg_tdls_get_max_peer_count() - get tdls max peer count
272 * @psoc: pointer to psoc object
273 *
274 * This function gets tdls max peer count
275 */
276 uint16_t cfg_tdls_get_max_peer_count(struct wlan_objmgr_psoc *psoc);
277
278 /**
279 * cfg_tdls_get_connected_peer_count() - get tdls connected peer count
280 * @psoc: pointer to psoc object
281 *
282 * This function gets tdls connected peer count
283 */
284 uint16_t cfg_tdls_get_connected_peer_count(struct wlan_objmgr_psoc *psoc);
285 #else
286 static inline QDF_STATUS
cfg_tdls_get_support_enable(struct wlan_objmgr_psoc * psoc,bool * val)287 cfg_tdls_get_support_enable(struct wlan_objmgr_psoc *psoc,
288 bool *val)
289 {
290 *val = false;
291
292 return QDF_STATUS_SUCCESS;
293 }
294
295 static inline QDF_STATUS
cfg_tdls_set_support_enable(struct wlan_objmgr_psoc * psoc,bool val)296 cfg_tdls_set_support_enable(struct wlan_objmgr_psoc *psoc,
297 bool val)
298 {
299 return QDF_STATUS_SUCCESS;
300 }
301
302 static inline QDF_STATUS
cfg_tdls_get_external_control(struct wlan_objmgr_psoc * psoc,bool * val)303 cfg_tdls_get_external_control(struct wlan_objmgr_psoc *psoc,
304 bool *val)
305 {
306 *val = false;
307
308 return QDF_STATUS_SUCCESS;
309 }
310
311 static inline QDF_STATUS
cfg_tdls_get_uapsd_mask(struct wlan_objmgr_psoc * psoc,uint32_t * val)312 cfg_tdls_get_uapsd_mask(struct wlan_objmgr_psoc *psoc,
313 uint32_t *val)
314 {
315 *val = 0;
316
317 return QDF_STATUS_SUCCESS;
318 }
319
320 static inline QDF_STATUS
cfg_tdls_get_buffer_sta_enable(struct wlan_objmgr_psoc * psoc,bool * val)321 cfg_tdls_get_buffer_sta_enable(struct wlan_objmgr_psoc *psoc,
322 bool *val)
323 {
324 *val = false;
325
326 return QDF_STATUS_SUCCESS;
327 }
328
329 static inline QDF_STATUS
cfg_tdls_set_buffer_sta_enable(struct wlan_objmgr_psoc * psoc,bool val)330 cfg_tdls_set_buffer_sta_enable(struct wlan_objmgr_psoc *psoc,
331 bool val)
332 {
333 return QDF_STATUS_SUCCESS;
334 }
335
336 static inline QDF_STATUS
cfg_tdls_get_uapsd_inactivity_time(struct wlan_objmgr_psoc * psoc,uint32_t * val)337 cfg_tdls_get_uapsd_inactivity_time(struct wlan_objmgr_psoc *psoc,
338 uint32_t *val)
339 {
340 *val = 0;
341
342 return QDF_STATUS_SUCCESS;
343 }
344
345 static inline QDF_STATUS
cfg_tdls_get_rx_pkt_threshold(struct wlan_objmgr_psoc * psoc,uint32_t * val)346 cfg_tdls_get_rx_pkt_threshold(struct wlan_objmgr_psoc *psoc,
347 uint32_t *val)
348 {
349 *val = 0;
350
351 return QDF_STATUS_SUCCESS;
352 }
353
354 static inline QDF_STATUS
cfg_tdls_get_off_channel_enable(struct wlan_objmgr_psoc * psoc,bool * val)355 cfg_tdls_get_off_channel_enable(struct wlan_objmgr_psoc *psoc,
356 bool *val)
357 {
358 *val = false;
359
360 return QDF_STATUS_SUCCESS;
361 }
362
363 static inline QDF_STATUS
cfg_tdls_set_off_channel_enable(struct wlan_objmgr_psoc * psoc,bool val)364 cfg_tdls_set_off_channel_enable(struct wlan_objmgr_psoc *psoc,
365 bool val)
366 {
367 return QDF_STATUS_SUCCESS;
368 }
369
370 static inline QDF_STATUS
cfg_tdls_get_off_channel_enable_orig(struct wlan_objmgr_psoc * psoc,bool * val)371 cfg_tdls_get_off_channel_enable_orig(struct wlan_objmgr_psoc *psoc,
372 bool *val)
373 {
374 *val = false;
375
376 return QDF_STATUS_SUCCESS;
377 }
378
379 static inline void
cfg_tdls_restore_off_channel_enable(struct wlan_objmgr_psoc * psoc)380 cfg_tdls_restore_off_channel_enable(struct wlan_objmgr_psoc *psoc)
381 {
382 }
383
384 static inline void
cfg_tdls_store_off_channel_enable(struct wlan_objmgr_psoc * psoc)385 cfg_tdls_store_off_channel_enable(struct wlan_objmgr_psoc *psoc)
386 {
387 }
388
389 static inline QDF_STATUS
cfg_tdls_get_wmm_mode_enable(struct wlan_objmgr_psoc * psoc,bool * val)390 cfg_tdls_get_wmm_mode_enable(struct wlan_objmgr_psoc *psoc,
391 bool *val)
392 {
393 *val = false;
394
395 return QDF_STATUS_SUCCESS;
396 }
397
398 static inline QDF_STATUS
cfg_tdls_set_vdev_nss_2g(struct wlan_objmgr_psoc * psoc,uint8_t val)399 cfg_tdls_set_vdev_nss_2g(struct wlan_objmgr_psoc *psoc,
400 uint8_t val)
401 {
402 return QDF_STATUS_SUCCESS;
403 }
404
405 static inline QDF_STATUS
cfg_tdls_set_vdev_nss_5g(struct wlan_objmgr_psoc * psoc,uint8_t val)406 cfg_tdls_set_vdev_nss_5g(struct wlan_objmgr_psoc *psoc,
407 uint8_t val)
408 {
409 return QDF_STATUS_SUCCESS;
410 }
411
412 static inline QDF_STATUS
cfg_tdls_get_sleep_sta_enable(struct wlan_objmgr_psoc * psoc,bool * val)413 cfg_tdls_get_sleep_sta_enable(struct wlan_objmgr_psoc *psoc,
414 bool *val)
415 {
416 *val = false;
417
418 return QDF_STATUS_SUCCESS;
419 }
420
421 static inline QDF_STATUS
cfg_tdls_set_sleep_sta_enable(struct wlan_objmgr_psoc * psoc,bool val)422 cfg_tdls_set_sleep_sta_enable(struct wlan_objmgr_psoc *psoc,
423 bool val)
424 {
425 return QDF_STATUS_SUCCESS;
426 }
427
428 static inline QDF_STATUS
cfg_tdls_get_scan_enable(struct wlan_objmgr_psoc * psoc,bool * val)429 cfg_tdls_get_scan_enable(struct wlan_objmgr_psoc *psoc,
430 bool *val)
431 {
432 *val = false;
433
434 return QDF_STATUS_SUCCESS;
435 }
436
437 static inline QDF_STATUS
cfg_tdls_set_scan_enable(struct wlan_objmgr_psoc * psoc,bool val)438 cfg_tdls_set_scan_enable(struct wlan_objmgr_psoc *psoc,
439 bool val)
440 {
441 return QDF_STATUS_SUCCESS;
442 }
443
444 static inline int
cfg_tdls_get_link_id(struct wlan_objmgr_psoc * psoc)445 cfg_tdls_get_link_id(struct wlan_objmgr_psoc *psoc)
446 {
447 return 0;
448 }
449
450 static inline QDF_STATUS
cfg_tdls_set_link_id(struct wlan_objmgr_psoc * psoc,int val)451 cfg_tdls_set_link_id(struct wlan_objmgr_psoc *psoc,
452 int val)
453 {
454 return QDF_STATUS_SUCCESS;
455 }
456 static inline uint16_t
cfg_tdls_get_max_peer_count(struct wlan_objmgr_psoc * psoc)457 cfg_tdls_get_max_peer_count(struct wlan_objmgr_psoc *psoc)
458 {
459 return 0;
460 }
461
462 static inline uint16_t
cfg_tdls_get_connected_peer_count(struct wlan_objmgr_psoc * psoc)463 cfg_tdls_get_connected_peer_count(struct wlan_objmgr_psoc *psoc)
464 {
465 return 0;
466 }
467
468 #endif /* FEATURE_WLAN_TDLS */
469 #endif /* _WLAN_TDLS_CFG_API_H_ */
470