xref: /wlan-driver/qca-wifi-host-cmn/umac/twt/dispatcher/inc/wlan_twt_ucfg_ext_cfg.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
3*5113495bSYour Name  *
4*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
5*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
6*5113495bSYour Name  * above copyright notice and this permission notice appear in all
7*5113495bSYour Name  * copies.
8*5113495bSYour Name  *
9*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
17*5113495bSYour Name  */
18*5113495bSYour Name 
19*5113495bSYour Name /**
20*5113495bSYour Name  * DOC: wlan_twt_ucfg_ext_cfg.h
21*5113495bSYour Name  * This file provides TWT ucfg cfg param related apis.
22*5113495bSYour Name  */
23*5113495bSYour Name #ifndef _WLAN_TWT_UCFG_EXT_CFG_H_
24*5113495bSYour Name #define _WLAN_TWT_UCFG_EXT_CFG_H_
25*5113495bSYour Name 
26*5113495bSYour Name #include <wlan_objmgr_psoc_obj.h>
27*5113495bSYour Name #include <wlan_twt_public_structs.h>
28*5113495bSYour Name 
29*5113495bSYour Name #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
30*5113495bSYour Name /**
31*5113495bSYour Name  * ucfg_twt_cfg_get_requestor() - get TWT requestor
32*5113495bSYour Name  * @psoc: Pointer to global PSOC object
33*5113495bSYour Name  * @val: pointer to output variable
34*5113495bSYour Name  *
35*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS
36*5113495bSYour Name  */
37*5113495bSYour Name QDF_STATUS ucfg_twt_cfg_get_requestor(struct wlan_objmgr_psoc *psoc, bool *val);
38*5113495bSYour Name 
39*5113495bSYour Name /**
40*5113495bSYour Name  * ucfg_twt_cfg_get_responder() - get TWT responder
41*5113495bSYour Name  * @psoc: Pointer to global PSOC object
42*5113495bSYour Name  * @val: pointer to output variable
43*5113495bSYour Name  *
44*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS
45*5113495bSYour Name  */
46*5113495bSYour Name QDF_STATUS ucfg_twt_cfg_get_responder(struct wlan_objmgr_psoc *psoc, bool *val);
47*5113495bSYour Name 
48*5113495bSYour Name /**
49*5113495bSYour Name  * ucfg_twt_cfg_get_congestion_timeout() - Get TWT congestion timeout
50*5113495bSYour Name  * @psoc: Pointer to global psoc object
51*5113495bSYour Name  * @val: pointer to output variable
52*5113495bSYour Name  *
53*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS
54*5113495bSYour Name  */
55*5113495bSYour Name QDF_STATUS
56*5113495bSYour Name ucfg_twt_cfg_get_congestion_timeout(struct wlan_objmgr_psoc *psoc,
57*5113495bSYour Name 				    uint32_t *val);
58*5113495bSYour Name 
59*5113495bSYour Name /**
60*5113495bSYour Name  * ucfg_twt_cfg_set_congestion_timeout() - Set TWT congestion timeout
61*5113495bSYour Name  * @psoc: Pointer to global psoc object
62*5113495bSYour Name  * @val: congestion timeout
63*5113495bSYour Name  *
64*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS
65*5113495bSYour Name  */
66*5113495bSYour Name QDF_STATUS
67*5113495bSYour Name ucfg_twt_cfg_set_congestion_timeout(struct wlan_objmgr_psoc *psoc,
68*5113495bSYour Name 				    uint32_t val);
69*5113495bSYour Name 
70*5113495bSYour Name /**
71*5113495bSYour Name  * ucfg_twt_cfg_get_24ghz_enabled() - Get TWT 24ghz enabled
72*5113495bSYour Name  * @psoc: Pointer to global psoc object
73*5113495bSYour Name  * @val: pointer to output variable
74*5113495bSYour Name  *
75*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS
76*5113495bSYour Name  */
77*5113495bSYour Name QDF_STATUS
78*5113495bSYour Name ucfg_twt_cfg_get_24ghz_enabled(struct wlan_objmgr_psoc *psoc, bool *val);
79*5113495bSYour Name 
80*5113495bSYour Name /**
81*5113495bSYour Name  * ucfg_twt_cfg_get_bcast_requestor() - Get TWT broadcast requestor
82*5113495bSYour Name  * @psoc: Pointer to global psoc object
83*5113495bSYour Name  * @val: pointer to output variable
84*5113495bSYour Name  *
85*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS
86*5113495bSYour Name  */
87*5113495bSYour Name QDF_STATUS
88*5113495bSYour Name ucfg_twt_cfg_get_bcast_requestor(struct wlan_objmgr_psoc *psoc, bool *val);
89*5113495bSYour Name 
90*5113495bSYour Name /**
91*5113495bSYour Name  * ucfg_twt_cfg_get_bcast_responder() - Get TWT broadcast requestor
92*5113495bSYour Name  * @psoc: Pointer to global psoc object
93*5113495bSYour Name  * @val: pointer to output variable
94*5113495bSYour Name  *
95*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS
96*5113495bSYour Name  */
97*5113495bSYour Name QDF_STATUS
98*5113495bSYour Name ucfg_twt_cfg_get_bcast_responder(struct wlan_objmgr_psoc *psoc, bool *val);
99*5113495bSYour Name 
100*5113495bSYour Name /**
101*5113495bSYour Name  * ucfg_twt_cfg_get_rtwt_requestor() - Get restricted TWT requestor
102*5113495bSYour Name  * @psoc: Pointer to global psoc object
103*5113495bSYour Name  * @val: pointer to output variable
104*5113495bSYour Name  *
105*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS
106*5113495bSYour Name  */
107*5113495bSYour Name QDF_STATUS
108*5113495bSYour Name ucfg_twt_cfg_get_rtwt_requestor(struct wlan_objmgr_psoc *psoc, bool *val);
109*5113495bSYour Name 
110*5113495bSYour Name /**
111*5113495bSYour Name  * ucfg_twt_cfg_get_flex_sched() - Get TWT flex scheduling
112*5113495bSYour Name  * @psoc: Pointer to global psoc object
113*5113495bSYour Name  * @val: pointer to output variable
114*5113495bSYour Name  *
115*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS
116*5113495bSYour Name  */
117*5113495bSYour Name QDF_STATUS
118*5113495bSYour Name ucfg_twt_cfg_get_flex_sched(struct wlan_objmgr_psoc *psoc, bool *val);
119*5113495bSYour Name 
120*5113495bSYour Name #else
121*5113495bSYour Name static inline
ucfg_twt_cfg_get_requestor(struct wlan_objmgr_psoc * psoc,bool * val)122*5113495bSYour Name QDF_STATUS ucfg_twt_cfg_get_requestor(struct wlan_objmgr_psoc *psoc, bool *val)
123*5113495bSYour Name {
124*5113495bSYour Name 	*val = false;
125*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
126*5113495bSYour Name }
127*5113495bSYour Name 
128*5113495bSYour Name static inline
ucfg_twt_cfg_get_responder(struct wlan_objmgr_psoc * psoc,bool * val)129*5113495bSYour Name QDF_STATUS ucfg_twt_cfg_get_responder(struct wlan_objmgr_psoc *psoc, bool *val)
130*5113495bSYour Name {
131*5113495bSYour Name 	*val = false;
132*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
133*5113495bSYour Name }
134*5113495bSYour Name 
135*5113495bSYour Name static inline
ucfg_twt_cfg_get_congestion_timeout(struct wlan_objmgr_psoc * psoc,uint32_t * val)136*5113495bSYour Name QDF_STATUS ucfg_twt_cfg_get_congestion_timeout(struct wlan_objmgr_psoc *psoc,
137*5113495bSYour Name 					       uint32_t *val)
138*5113495bSYour Name {
139*5113495bSYour Name 	*val = 0;
140*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
141*5113495bSYour Name }
142*5113495bSYour Name 
143*5113495bSYour Name static inline
ucfg_twt_cfg_set_congestion_timeout(struct wlan_objmgr_psoc * psoc,uint32_t val)144*5113495bSYour Name QDF_STATUS ucfg_twt_cfg_set_congestion_timeout(struct wlan_objmgr_psoc *psoc,
145*5113495bSYour Name 					       uint32_t val)
146*5113495bSYour Name {
147*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
148*5113495bSYour Name }
149*5113495bSYour Name 
150*5113495bSYour Name static inline QDF_STATUS
ucfg_twt_cfg_get_24ghz_enabled(struct wlan_objmgr_psoc * psoc,bool * val)151*5113495bSYour Name ucfg_twt_cfg_get_24ghz_enabled(struct wlan_objmgr_psoc *psoc, bool *val)
152*5113495bSYour Name {
153*5113495bSYour Name 	*val = false;
154*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
155*5113495bSYour Name }
156*5113495bSYour Name 
157*5113495bSYour Name static inline QDF_STATUS
ucfg_twt_cfg_get_bcast_requestor(struct wlan_objmgr_psoc * psoc,bool * val)158*5113495bSYour Name ucfg_twt_cfg_get_bcast_requestor(struct wlan_objmgr_psoc *psoc, bool *val)
159*5113495bSYour Name {
160*5113495bSYour Name 	*val = false;
161*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
162*5113495bSYour Name }
163*5113495bSYour Name 
164*5113495bSYour Name static inline QDF_STATUS
ucfg_twt_cfg_get_bcast_responder(struct wlan_objmgr_psoc * psoc,bool * val)165*5113495bSYour Name ucfg_twt_cfg_get_bcast_responder(struct wlan_objmgr_psoc *psoc, bool *val)
166*5113495bSYour Name {
167*5113495bSYour Name 	*val = false;
168*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
169*5113495bSYour Name }
170*5113495bSYour Name 
171*5113495bSYour Name static inline QDF_STATUS
ucfg_twt_cfg_get_rtwt_requestor(struct wlan_objmgr_psoc * psoc,bool * val)172*5113495bSYour Name ucfg_twt_cfg_get_rtwt_requestor(struct wlan_objmgr_psoc *psoc, bool *val)
173*5113495bSYour Name {
174*5113495bSYour Name 	*val = false;
175*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
176*5113495bSYour Name }
177*5113495bSYour Name 
178*5113495bSYour Name static inline QDF_STATUS
ucfg_twt_cfg_get_flex_sched(struct wlan_objmgr_psoc * psoc,bool * val)179*5113495bSYour Name ucfg_twt_cfg_get_flex_sched(struct wlan_objmgr_psoc *psoc, bool *val)
180*5113495bSYour Name {
181*5113495bSYour Name 	*val = false;
182*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
183*5113495bSYour Name }
184*5113495bSYour Name #endif /* WLAN_TWT_CONV_SUPPORTED */
185*5113495bSYour Name #endif /* _WLAN_TWT_UCFG_EXT_CFG_H_ */
186