xref: /wlan-driver/qcacld-3.0/components/umac/twt/dispatcher/inc/wlan_twt_cfg_ext_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. 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_TWT_CFG_EXT_API_H
20 #define _WLAN_TWT_CFG_EXT_API_H
21 
22 #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
23 #include <wlan_objmgr_psoc_obj.h>
24 #include <wlan_twt_public_structs.h>
25 #include <wlan_mlme_twt_public_struct.h>
26 
27 /**
28  * wlan_twt_cfg_get_req_flag() - Get TWT requestor flag
29  * @psoc: Pointer to global psoc object
30  * @val: pointer to output variable
31  *
32  * Return: QDF_STATUS_SUCCESS
33  */
34 QDF_STATUS
35 wlan_twt_cfg_get_req_flag(struct wlan_objmgr_psoc *psoc, bool *val);
36 
37 /**
38  * wlan_twt_cfg_get_res_flag() - Get TWT responder flag
39  * @psoc: Pointer to global psoc object
40  * @val: pointer to output variable
41  *
42  * Return: QDF_STATUS_SUCCESS
43  */
44 QDF_STATUS
45 wlan_twt_cfg_get_res_flag(struct wlan_objmgr_psoc *psoc, bool *val);
46 
47 /**
48  * wlan_twt_cfg_get_support_in_11n() - Get TWT support on HT cap
49  * @psoc: Pointer to global psoc object
50  * @val: pointer to output variable
51  *
52  * Return: QDF_STATUS_SUCCESS
53  */
54 QDF_STATUS
55 wlan_twt_cfg_get_support_in_11n(struct wlan_objmgr_psoc *psoc,
56 				bool *val);
57 
58 /**
59  * wlan_twt_cfg_get_support_requestor() - Get TWT support of requestor
60  * @psoc: Pointer to global psoc object
61  * @val: pointer to output variable
62  *
63  * Return: QDF_STATUS_SUCCESS
64  */
65 QDF_STATUS
66 wlan_twt_cfg_get_support_requestor(struct wlan_objmgr_psoc *psoc,
67 				   bool *val);
68 
69 /**
70  * wlan_twt_get_requestor_cfg() - Get requestor TWT configuration
71  * @psoc: Pointer to psoc object
72  * @val: Pointer to value
73  *
74  * Return: QDF_STATUS
75  */
76 QDF_STATUS
77 wlan_twt_get_requestor_cfg(struct wlan_objmgr_psoc *psoc, bool *val);
78 
79 /**
80  * wlan_twt_get_responder_cfg() - Get TWT responder configuration
81  * @psoc: Pointer to PSOC object
82  * @val: Pointer to value
83  *
84  * Return: QDF_STATUS
85  */
86 QDF_STATUS
87 wlan_twt_get_responder_cfg(struct wlan_objmgr_psoc *psoc, bool *val);
88 
89 /**
90  * wlan_twt_get_rtwt_support() - Get rTWT support
91  * @psoc: Pointer to global psoc
92  * @val: pointer to output variable
93  *
94  * Return: QDF_STATUS
95  */
96 QDF_STATUS
97 wlan_twt_get_rtwt_support(struct wlan_objmgr_psoc *psoc, bool *val);
98 
99 /**
100  * wlan_twt_get_bcast_requestor_cfg() - Get requestor broadcast TWT
101  * configuration
102  * @psoc: Pointer to psoc object
103  * @val: Pointer to value
104  *
105  * Return: QDF_STATUS
106  */
107 QDF_STATUS
108 wlan_twt_get_bcast_requestor_cfg(struct wlan_objmgr_psoc *psoc, bool *val);
109 
110 /**
111  * wlan_twt_get_bcast_responder_cfg() - Get responder broadcast TWT
112  * configuration
113  * @psoc: Pointer to psoc object
114  * @val: Pointer to value
115  *
116  * Return: QDF_STATUS
117  */
118 
119 QDF_STATUS
120 wlan_twt_get_bcast_responder_cfg(struct wlan_objmgr_psoc *psoc, bool *val);
121 
122 #ifdef FEATURE_SET
123 /**
124  * wlan_twt_get_feature_info() - Get TWT feature set information
125  * @psoc: Pointer to global psoc object
126  * @twt_feature_set: pointer to output twt feature set structure
127  *
128  * Return: None
129  */
130 void wlan_twt_get_feature_info(struct wlan_objmgr_psoc *psoc,
131 			       struct wlan_twt_features *twt_feature_set);
132 #endif
133 
134 #else
135 static inline QDF_STATUS
wlan_twt_cfg_get_res_flag(struct wlan_objmgr_psoc * psoc,bool * val)136 wlan_twt_cfg_get_res_flag(struct wlan_objmgr_psoc *psoc, bool *val)
137 {
138 	return QDF_STATUS_SUCCESS;
139 }
140 
141 static inline QDF_STATUS
wlan_twt_cfg_get_req_flag(struct wlan_objmgr_psoc * psoc,bool * val)142 wlan_twt_cfg_get_req_flag(struct wlan_objmgr_psoc *psoc, bool *val)
143 {
144 	return QDF_STATUS_SUCCESS;
145 }
146 
147 static inline QDF_STATUS
wlan_twt_cfg_get_support_in_11n(struct wlan_objmgr_psoc * psoc,bool * val)148 wlan_twt_cfg_get_support_in_11n(struct wlan_objmgr_psoc *psoc,
149 				bool *val)
150 {
151 	return QDF_STATUS_SUCCESS;
152 }
153 
154 static inline QDF_STATUS
wlan_twt_cfg_get_support_requestor(struct wlan_objmgr_psoc * psoc,bool * val)155 wlan_twt_cfg_get_support_requestor(struct wlan_objmgr_psoc *psoc,
156 				   bool *val)
157 {
158 	return QDF_STATUS_SUCCESS;
159 }
160 
161 static inline QDF_STATUS
wlan_twt_get_requestor_cfg(struct wlan_objmgr_psoc * psoc,bool * val)162 wlan_twt_get_requestor_cfg(struct wlan_objmgr_psoc *psoc, bool *val)
163 {
164 	return QDF_STATUS_SUCCESS;
165 }
166 
167 static inline QDF_STATUS
wlan_twt_get_responder_cfg(struct wlan_objmgr_psoc * psoc,bool * val)168 wlan_twt_get_responder_cfg(struct wlan_objmgr_psoc *psoc, bool *val)
169 {
170 	return QDF_STATUS_SUCCESS;
171 }
172 
173 static inline QDF_STATUS
wlan_twt_get_bcast_requestor_cfg(struct wlan_objmgr_psoc * psoc,bool * val)174 wlan_twt_get_bcast_requestor_cfg(struct wlan_objmgr_psoc *psoc, bool *val)
175 {
176 	return QDF_STATUS_SUCCESS;
177 }
178 
179 static inline QDF_STATUS
wlan_twt_get_bcast_responder_cfg(struct wlan_objmgr_psoc * psoc,bool * val)180 wlan_twt_get_bcast_responder_cfg(struct wlan_objmgr_psoc *psoc, bool *val)
181 {
182 	return QDF_STATUS_SUCCESS;
183 }
184 
185 #ifdef FEATURE_SET
186 static inline void
wlan_twt_get_feature_info(struct wlan_objmgr_psoc * psoc,struct wlan_twt_features * twt_feature_set)187 wlan_twt_get_feature_info(struct wlan_objmgr_psoc *psoc,
188 			  struct wlan_twt_features *twt_feature_set)
189 {
190 }
191 #endif
192 #endif
193 #endif
194