xref: /wlan-driver/qcacld-3.0/components/mlme/dispatcher/inc/wlan_mlme_twt_ucfg_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2021, The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  *
5*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for any
6*5113495bSYour Name  * purpose with or without fee is hereby granted, provided that the above
7*5113495bSYour Name  * copyright notice and this permission notice appear in all copies.
8*5113495bSYour Name  *
9*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10*5113495bSYour Name  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11*5113495bSYour Name  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12*5113495bSYour Name  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13*5113495bSYour Name  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14*5113495bSYour Name  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15*5113495bSYour Name  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16*5113495bSYour Name  */
17*5113495bSYour Name 
18*5113495bSYour Name /**
19*5113495bSYour Name  * DOC: declare UCFG APIs for TWT exposed by the mlme component
20*5113495bSYour Name  */
21*5113495bSYour Name 
22*5113495bSYour Name #ifndef _WLAN_MLME_TWT_UCFG_API_H_
23*5113495bSYour Name #define _WLAN_MLME_TWT_UCFG_API_H_
24*5113495bSYour Name 
25*5113495bSYour Name #include <cfg_ucfg_api.h>
26*5113495bSYour Name #include <wlan_mlme_public_struct.h>
27*5113495bSYour Name #include <wlan_mlme_twt_public_struct.h>
28*5113495bSYour Name #include <wlan_objmgr_psoc_obj.h>
29*5113495bSYour Name #include <wlan_objmgr_global_obj.h>
30*5113495bSYour Name #include <wlan_mlme_api.h>
31*5113495bSYour Name #include <wlan_mlme_main.h>
32*5113495bSYour Name #include <wlan_mlme_twt_api.h>
33*5113495bSYour Name 
34*5113495bSYour Name #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_FEATURE_11AX) && \
35*5113495bSYour Name 	defined(WLAN_TWT_CONV_SUPPORTED)
36*5113495bSYour Name static inline
ucfg_mlme_init_twt_context(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id)37*5113495bSYour Name QDF_STATUS ucfg_mlme_init_twt_context(struct wlan_objmgr_psoc *psoc,
38*5113495bSYour Name 				      struct qdf_mac_addr *peer_mac,
39*5113495bSYour Name 				      uint8_t dialog_id)
40*5113495bSYour Name {
41*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
42*5113495bSYour Name }
43*5113495bSYour Name 
44*5113495bSYour Name static inline bool
ucfg_mlme_is_twt_enabled(struct wlan_objmgr_psoc * psoc)45*5113495bSYour Name ucfg_mlme_is_twt_enabled(struct wlan_objmgr_psoc *psoc)
46*5113495bSYour Name {
47*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
48*5113495bSYour Name }
49*5113495bSYour Name 
50*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_get_twt_requestor(struct wlan_objmgr_psoc * psoc,bool * val)51*5113495bSYour Name ucfg_mlme_get_twt_requestor(struct wlan_objmgr_psoc *psoc,
52*5113495bSYour Name 			    bool *val)
53*5113495bSYour Name {
54*5113495bSYour Name 	*val = false;
55*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
56*5113495bSYour Name }
57*5113495bSYour Name 
58*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_set_twt_requestor(struct wlan_objmgr_psoc * psoc,bool val)59*5113495bSYour Name ucfg_mlme_set_twt_requestor(struct wlan_objmgr_psoc *psoc,
60*5113495bSYour Name 			    bool val)
61*5113495bSYour Name {
62*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
63*5113495bSYour Name }
64*5113495bSYour Name 
65*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_get_twt_responder(struct wlan_objmgr_psoc * psoc,bool * val)66*5113495bSYour Name ucfg_mlme_get_twt_responder(struct wlan_objmgr_psoc *psoc,
67*5113495bSYour Name 			    bool *val)
68*5113495bSYour Name {
69*5113495bSYour Name 	*val = false;
70*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
71*5113495bSYour Name }
72*5113495bSYour Name 
73*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_set_twt_responder(struct wlan_objmgr_psoc * psoc,bool val)74*5113495bSYour Name ucfg_mlme_set_twt_responder(struct wlan_objmgr_psoc *psoc,
75*5113495bSYour Name 			    bool val)
76*5113495bSYour Name {
77*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
78*5113495bSYour Name }
79*5113495bSYour Name 
80*5113495bSYour Name static inline bool
ucfg_mlme_is_twt_setup_done(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id)81*5113495bSYour Name ucfg_mlme_is_twt_setup_done(struct wlan_objmgr_psoc *psoc,
82*5113495bSYour Name 			    struct qdf_mac_addr *peer_mac, uint8_t dialog_id)
83*5113495bSYour Name {
84*5113495bSYour Name 	return 0;
85*5113495bSYour Name }
86*5113495bSYour Name 
87*5113495bSYour Name static inline void
ucfg_mlme_set_twt_setup_done(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id,bool is_set)88*5113495bSYour Name ucfg_mlme_set_twt_setup_done(struct wlan_objmgr_psoc *psoc,
89*5113495bSYour Name 			     struct qdf_mac_addr *peer_mac,
90*5113495bSYour Name 			     uint8_t dialog_id, bool is_set)
91*5113495bSYour Name {}
92*5113495bSYour Name 
93*5113495bSYour Name static inline
ucfg_mlme_set_twt_session_state(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id,enum wlan_twt_session_state state)94*5113495bSYour Name void ucfg_mlme_set_twt_session_state(struct wlan_objmgr_psoc *psoc,
95*5113495bSYour Name 				     struct qdf_mac_addr *peer_mac,
96*5113495bSYour Name 				     uint8_t dialog_id,
97*5113495bSYour Name 				     enum wlan_twt_session_state state)
98*5113495bSYour Name {}
99*5113495bSYour Name 
100*5113495bSYour Name static inline enum wlan_twt_session_state
ucfg_mlme_get_twt_session_state(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id)101*5113495bSYour Name ucfg_mlme_get_twt_session_state(struct wlan_objmgr_psoc *psoc,
102*5113495bSYour Name 				struct qdf_mac_addr *peer_mac,
103*5113495bSYour Name 				uint8_t dialog_id)
104*5113495bSYour Name {
105*5113495bSYour Name 	return WLAN_TWT_SETUP_STATE_NOT_ESTABLISHED;
106*5113495bSYour Name }
107*5113495bSYour Name 
108*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_set_twt_res_service_cap(struct wlan_objmgr_psoc * psoc,bool val)109*5113495bSYour Name ucfg_mlme_set_twt_res_service_cap(struct wlan_objmgr_psoc *psoc, bool val)
110*5113495bSYour Name {
111*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
112*5113495bSYour Name }
113*5113495bSYour Name 
114*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_get_twt_res_service_cap(struct wlan_objmgr_psoc * psoc,bool * val)115*5113495bSYour Name ucfg_mlme_get_twt_res_service_cap(struct wlan_objmgr_psoc *psoc, bool *val)
116*5113495bSYour Name {
117*5113495bSYour Name 	*val = false;
118*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
119*5113495bSYour Name }
120*5113495bSYour Name 
121*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_reset_twt_active_cmd(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id)122*5113495bSYour Name ucfg_mlme_reset_twt_active_cmd(struct wlan_objmgr_psoc *psoc,
123*5113495bSYour Name 			       struct qdf_mac_addr *peer_mac,
124*5113495bSYour Name 			       uint8_t dialog_id)
125*5113495bSYour Name {
126*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
127*5113495bSYour Name }
128*5113495bSYour Name 
129*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_set_twt_command_in_progress(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id,enum wlan_twt_commands cmd)130*5113495bSYour Name ucfg_mlme_set_twt_command_in_progress(struct wlan_objmgr_psoc *psoc,
131*5113495bSYour Name 				      struct qdf_mac_addr *peer_mac,
132*5113495bSYour Name 				      uint8_t dialog_id,
133*5113495bSYour Name 				      enum wlan_twt_commands cmd)
134*5113495bSYour Name {
135*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
136*5113495bSYour Name }
137*5113495bSYour Name 
138*5113495bSYour Name #elif defined(WLAN_SUPPORT_TWT) && defined(WLAN_FEATURE_11AX)
139*5113495bSYour Name /**
140*5113495bSYour Name  * ucfg_mlme_get_twt_requestor() - Get twt requestor
141*5113495bSYour Name  * @psoc: pointer to psoc object
142*5113495bSYour Name  * @val:  Pointer to the value which will be filled for the caller
143*5113495bSYour Name  *
144*5113495bSYour Name  * Return: QDF Status
145*5113495bSYour Name  */
146*5113495bSYour Name QDF_STATUS
147*5113495bSYour Name ucfg_mlme_get_twt_requestor(struct wlan_objmgr_psoc *psoc,
148*5113495bSYour Name 			    bool *val);
149*5113495bSYour Name 
150*5113495bSYour Name /**
151*5113495bSYour Name  * ucfg_mlme_set_twt_requestor() - Set twt requestor
152*5113495bSYour Name  * @psoc: pointer to psoc object
153*5113495bSYour Name  * @val:  value that needs to set to this config
154*5113495bSYour Name  *
155*5113495bSYour Name  * Return: QDF Status
156*5113495bSYour Name  */
157*5113495bSYour Name QDF_STATUS
158*5113495bSYour Name ucfg_mlme_set_twt_requestor(struct wlan_objmgr_psoc *psoc,
159*5113495bSYour Name 			    bool val);
160*5113495bSYour Name 
161*5113495bSYour Name /**
162*5113495bSYour Name  * ucfg_mlme_get_twt_responder() - Get twt responder
163*5113495bSYour Name  * @psoc: pointer to psoc object
164*5113495bSYour Name  * @val:  Pointer to the value which will be filled for the caller
165*5113495bSYour Name  *
166*5113495bSYour Name  * Return: QDF Status
167*5113495bSYour Name  */
168*5113495bSYour Name QDF_STATUS
169*5113495bSYour Name ucfg_mlme_get_twt_responder(struct wlan_objmgr_psoc *psoc,
170*5113495bSYour Name 			    bool *val);
171*5113495bSYour Name 
172*5113495bSYour Name /**
173*5113495bSYour Name  * ucfg_mlme_set_twt_responder() - Set twt responder
174*5113495bSYour Name  * @psoc: pointer to psoc object
175*5113495bSYour Name  * @val:  value that needs to set to this config
176*5113495bSYour Name  *
177*5113495bSYour Name  * Return: QDF Status
178*5113495bSYour Name  */
179*5113495bSYour Name QDF_STATUS
180*5113495bSYour Name ucfg_mlme_set_twt_responder(struct wlan_objmgr_psoc *psoc,
181*5113495bSYour Name 			    bool val);
182*5113495bSYour Name 
183*5113495bSYour Name /**
184*5113495bSYour Name  * ucfg_mlme_get_twt_congestion_timeout() - Get twt congestion timeout
185*5113495bSYour Name  * @psoc: pointer to psoc object
186*5113495bSYour Name  * @val:  Pointer to the value which will be filled for the caller
187*5113495bSYour Name  *
188*5113495bSYour Name  * Return: QDF Status
189*5113495bSYour Name  */
190*5113495bSYour Name QDF_STATUS
191*5113495bSYour Name ucfg_mlme_get_twt_congestion_timeout(struct wlan_objmgr_psoc *psoc,
192*5113495bSYour Name 				     uint32_t *val);
193*5113495bSYour Name 
194*5113495bSYour Name /**
195*5113495bSYour Name  * ucfg_mlme_set_twt_congestion_timeout() - Set twt congestion timeout
196*5113495bSYour Name  * @psoc: pointer to psoc object
197*5113495bSYour Name  * @val:  value that needs to set to this config
198*5113495bSYour Name  *
199*5113495bSYour Name  * Return: QDF Status
200*5113495bSYour Name  */
201*5113495bSYour Name QDF_STATUS
202*5113495bSYour Name ucfg_mlme_set_twt_congestion_timeout(struct wlan_objmgr_psoc *psoc,
203*5113495bSYour Name 				     uint32_t val);
204*5113495bSYour Name 
205*5113495bSYour Name /**
206*5113495bSYour Name  * ucfg_mlme_is_twt_enabled() - Get global twt config support
207*5113495bSYour Name  * @psoc: pointer to psoc object
208*5113495bSYour Name  *
209*5113495bSYour Name  * Return: True if TWT is enabled else false.
210*5113495bSYour Name  */
211*5113495bSYour Name static inline bool
ucfg_mlme_is_twt_enabled(struct wlan_objmgr_psoc * psoc)212*5113495bSYour Name ucfg_mlme_is_twt_enabled(struct wlan_objmgr_psoc *psoc)
213*5113495bSYour Name {
214*5113495bSYour Name 	return mlme_is_twt_enabled(psoc);
215*5113495bSYour Name }
216*5113495bSYour Name 
217*5113495bSYour Name /**
218*5113495bSYour Name  * ucfg_mlme_set_enable_twt() - Set global twt config support
219*5113495bSYour Name  * @psoc: pointer to psoc object
220*5113495bSYour Name  * @val:  value that needs to set to this config
221*5113495bSYour Name  *
222*5113495bSYour Name  * Return: QDF Status
223*5113495bSYour Name  */
224*5113495bSYour Name QDF_STATUS
225*5113495bSYour Name ucfg_mlme_set_enable_twt(struct wlan_objmgr_psoc *psoc,
226*5113495bSYour Name 			 bool val);
227*5113495bSYour Name 
228*5113495bSYour Name /*
229*5113495bSYour Name  * ucfg_mlme_get_twt_bcast_requestor() - Get twt requestor enabled
230*5113495bSYour Name  * @psoc: pointer to psoc object
231*5113495bSYour Name  * @val:  Pointer to the value which will be filled for the caller
232*5113495bSYour Name  *
233*5113495bSYour Name  * Return: QDF Status
234*5113495bSYour Name  */
235*5113495bSYour Name QDF_STATUS
236*5113495bSYour Name ucfg_mlme_get_twt_bcast_requestor(struct wlan_objmgr_psoc *psoc,
237*5113495bSYour Name 				  bool *val);
238*5113495bSYour Name 
239*5113495bSYour Name /**
240*5113495bSYour Name  * ucfg_mlme_get_twt_bcast_responder() - Get twt responder enabled
241*5113495bSYour Name  * @psoc: pointer to psoc object
242*5113495bSYour Name  * @val:  Pointer to the value which will be filled for the caller
243*5113495bSYour Name  *
244*5113495bSYour Name  * Return: QDF Status
245*5113495bSYour Name  */
246*5113495bSYour Name QDF_STATUS
247*5113495bSYour Name ucfg_mlme_get_twt_bcast_responder(struct wlan_objmgr_psoc *psoc,
248*5113495bSYour Name 				  bool *val);
249*5113495bSYour Name /*
250*5113495bSYour Name  * 1. If both of the new service caps
251*5113495bSYour Name  * WMI_SERVICE_BROADCAST_TWT_REQUESTER And
252*5113495bSYour Name  * WMI_SERVICE_BROADCAST_TWT_RESPONDER are enabled then the old
253*5113495bSYour Name  * WMI_SERVICE_BROADCAST_TWT will be set to 1.
254*5113495bSYour Name  *
255*5113495bSYour Name  * 2.a. If any of the new service caps in case of new firmware:
256*5113495bSYour Name  * WMI_SERVICE_BROADCAST_TWT_REQUESTER And
257*5113495bSYour Name  * WMI_SERVICE_BROADCAST_TWT_RESPONDER is DISABLED then the old
258*5113495bSYour Name  * WMI_SERVICE_BROADCAST_TWT will be set to 0.
259*5113495bSYour Name  *
260*5113495bSYour Name  * 2.b In case of new firmware wants to disable broadcast TWT:
261*5113495bSYour Name  * all 3 WMI_SERVICE_BROADCAST_TWT_REQUESTER,
262*5113495bSYour Name  * WMI_SERVICE_BROADCAST_TWT_RESPONDER &
263*5113495bSYour Name  * WMI_SERVICE_BROADCAST_TWT will be disabled.
264*5113495bSYour Name  *
265*5113495bSYour Name  * 2.c IN case of old firmware:
266*5113495bSYour Name  * WMI_SERVICE_BROADCAST_TWT will be 1 and
267*5113495bSYour Name  * WMI_SERVICE_BROADCAST_TWT_REQUESTER,
268*5113495bSYour Name  * WMI_SERVICE_BROADCAST_TWT_RESPONDER will be 0.
269*5113495bSYour Name  *
270*5113495bSYour Name  * bcast_requestor_cfg/bcast_responder_cfg is intersection of
271*5113495bSYour Name  * "enable_twt", "twt_bcast_req_resp_config" ini and above target
272*5113495bSYour Name  * service cap combination.
273*5113495bSYour Name  */
274*5113495bSYour Name 
275*5113495bSYour Name /**
276*5113495bSYour Name  * ucfg_mlme_set_twt_bcast_requestor() - Set Global twt bcast requestor support
277*5113495bSYour Name  * @psoc: pointer to psoc object
278*5113495bSYour Name  * @val:  Value to be set to config
279*5113495bSYour Name  *
280*5113495bSYour Name  * The caller of ucfg_mlme_set_twt_bcast_requestor() updates with the
281*5113495bSYour Name  * intersection of "enable_twt", "twt_bcast_req_resp_config" ini and the
282*5113495bSYour Name  * WMI_SERVICE_BROADCAST_TWT_REQUESTOR, WMI_SERVICE_BROADCAST_TWT
283*5113495bSYour Name  * combination.
284*5113495bSYour Name  *
285*5113495bSYour Name  * Return: QDF Status
286*5113495bSYour Name  */
287*5113495bSYour Name QDF_STATUS
288*5113495bSYour Name ucfg_mlme_set_twt_bcast_requestor(struct wlan_objmgr_psoc *psoc,
289*5113495bSYour Name 				  bool val);
290*5113495bSYour Name 
291*5113495bSYour Name /**
292*5113495bSYour Name  * ucfg_mlme_set_twt_bcast_responder() - Set Global twt bcast responder support
293*5113495bSYour Name  * @psoc: pointer to psoc object
294*5113495bSYour Name  * @val:  Value to be set to config
295*5113495bSYour Name  *
296*5113495bSYour Name  * The caller of ucfg_mlme_set_twt_bcast_requestor() updates with the
297*5113495bSYour Name  * intersection of "enable_twt", "twt_bcast_req_resp_config" ini and the
298*5113495bSYour Name  * WMI_SERVICE_BROADCAST_TWT_RESPONDER, WMI_SERVICE_BROADCAST_TWT
299*5113495bSYour Name  * combination.
300*5113495bSYour Name  *
301*5113495bSYour Name  * Return: QDF Status
302*5113495bSYour Name  */
303*5113495bSYour Name QDF_STATUS
304*5113495bSYour Name ucfg_mlme_set_twt_bcast_responder(struct wlan_objmgr_psoc *psoc,
305*5113495bSYour Name 				  bool val);
306*5113495bSYour Name 
307*5113495bSYour Name /**
308*5113495bSYour Name  * ucfg_mlme_set_twt_requestor_flag() - Set twt requestor flag
309*5113495bSYour Name  * @psoc: pointer to psoc object
310*5113495bSYour Name  * @val: Value to be set to config
311*5113495bSYour Name  *
312*5113495bSYour Name  * Return: QDF Status
313*5113495bSYour Name  */
314*5113495bSYour Name QDF_STATUS ucfg_mlme_set_twt_requestor_flag(struct wlan_objmgr_psoc *psoc,
315*5113495bSYour Name 					    bool val);
316*5113495bSYour Name 
317*5113495bSYour Name /**
318*5113495bSYour Name  * ucfg_mlme_set_twt_responder_flag() - Set twt responder flag
319*5113495bSYour Name  * @psoc: pointer to psoc object
320*5113495bSYour Name  * @val: Value to be set to config
321*5113495bSYour Name  *
322*5113495bSYour Name  * Return: QDF Status
323*5113495bSYour Name  */
324*5113495bSYour Name QDF_STATUS ucfg_mlme_set_twt_responder_flag(struct wlan_objmgr_psoc *psoc,
325*5113495bSYour Name 					    bool val);
326*5113495bSYour Name /**
327*5113495bSYour Name  * ucfg_mlme_set_twt_res_service_cap() - Set twt responder service capability
328*5113495bSYour Name  * @psoc: pointer to psoc object
329*5113495bSYour Name  * @val: Value to be set to config
330*5113495bSYour Name  *
331*5113495bSYour Name  * Return: QDF Status
332*5113495bSYour Name  */
333*5113495bSYour Name QDF_STATUS
334*5113495bSYour Name ucfg_mlme_set_twt_res_service_cap(struct wlan_objmgr_psoc *psoc, bool val);
335*5113495bSYour Name 
336*5113495bSYour Name /**
337*5113495bSYour Name  * ucfg_mlme_get_twt_res_service_cap() - Get twt responder service capability
338*5113495bSYour Name  * @psoc: pointer to psoc object
339*5113495bSYour Name  * @val: Value to be set to config
340*5113495bSYour Name  *
341*5113495bSYour Name  * Return: QDF Status
342*5113495bSYour Name  */
343*5113495bSYour Name QDF_STATUS
344*5113495bSYour Name ucfg_mlme_get_twt_res_service_cap(struct wlan_objmgr_psoc *psoc, bool *val);
345*5113495bSYour Name 
346*5113495bSYour Name /**
347*5113495bSYour Name  * ucfg_mlme_reset_twt_active_cmd() - Reset twt active cmd if ack fail
348*5113495bSYour Name  * This is to handle back to back command. If ack failed for active
349*5113495bSYour Name  * command then reset this command to allow new twt command.
350*5113495bSYour Name  * @psoc: pointer to psoc object
351*5113495bSYour Name  * @peer_mac: peer mac address
352*5113495bSYour Name  * @dialog_id: dialog id
353*5113495bSYour Name  *
354*5113495bSYour Name  * Return: QDF Status
355*5113495bSYour Name  */
356*5113495bSYour Name QDF_STATUS ucfg_mlme_reset_twt_active_cmd(struct wlan_objmgr_psoc *psoc,
357*5113495bSYour Name 					  struct qdf_mac_addr *peer_mac,
358*5113495bSYour Name 					  uint8_t dialog_id);
359*5113495bSYour Name 
360*5113495bSYour Name /**
361*5113495bSYour Name  * ucfg_mlme_is_twt_setup_in_progress() - Get TWT setup in progress for
362*5113495bSYour Name  * given dialog id
363*5113495bSYour Name  * @psoc: Pointer to global PSOC object
364*5113495bSYour Name  * @peer_mac: Global peer mac address
365*5113495bSYour Name  * @dialog_id: Dialog id
366*5113495bSYour Name  *
367*5113495bSYour Name  * Return: True if already the TWT setup is in progress
368*5113495bSYour Name  */
369*5113495bSYour Name static inline bool
ucfg_mlme_is_twt_setup_in_progress(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id)370*5113495bSYour Name ucfg_mlme_is_twt_setup_in_progress(struct wlan_objmgr_psoc *psoc,
371*5113495bSYour Name 				   struct qdf_mac_addr *peer_mac,
372*5113495bSYour Name 				   uint8_t dialog_id)
373*5113495bSYour Name {
374*5113495bSYour Name 	return mlme_is_twt_setup_in_progress(psoc, peer_mac, dialog_id);
375*5113495bSYour Name }
376*5113495bSYour Name 
377*5113495bSYour Name /**
378*5113495bSYour Name  * ucfg_mlme_is_max_twt_sessions_reached() - Check if the maximum number of
379*5113495bSYour Name  * TWT sessions reached or not excluding the given dialog_id
380*5113495bSYour Name  * @psoc: Pointer to global PSOC object
381*5113495bSYour Name  * @peer_mac: Global peer mac address
382*5113495bSYour Name  * @dialog_id: dialog id
383*5113495bSYour Name  *
384*5113495bSYour Name  * Check if the number of active TWT sessions is equal to the maximum number
385*5113495bSYour Name  * of TWT sessions supported. Only count the TWT session slot if it not
386*5113495bSYour Name  * TWT_ALL_SESSIONS_DIALOG_ID and dialog id is different from input dialog_id,
387*5113495bSYour Name  * because if same dialog_id already exists in the TWT sessions, we should
388*5113495bSYour Name  * return false since re-negotiation is supported on existing dialog_id.
389*5113495bSYour Name  *
390*5113495bSYour Name  * Return: True if slot is available for dialog_id, false otherwise
391*5113495bSYour Name  */
392*5113495bSYour Name static inline bool
ucfg_mlme_is_max_twt_sessions_reached(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id)393*5113495bSYour Name ucfg_mlme_is_max_twt_sessions_reached(struct wlan_objmgr_psoc *psoc,
394*5113495bSYour Name 				      struct qdf_mac_addr *peer_mac,
395*5113495bSYour Name 				      uint8_t dialog_id)
396*5113495bSYour Name {
397*5113495bSYour Name 	return mlme_is_max_twt_sessions_reached(psoc, peer_mac, dialog_id);
398*5113495bSYour Name }
399*5113495bSYour Name 
400*5113495bSYour Name /**
401*5113495bSYour Name  * ucfg_mlme_twt_is_command_in_progress() - Check if given command is in
402*5113495bSYour Name  * progress
403*5113495bSYour Name  * @psoc: Pointer to global PSOC object
404*5113495bSYour Name  * @peer_mac: Global peer mac address
405*5113495bSYour Name  * @dialog_id: TWT session dialog id
406*5113495bSYour Name  * @cmd: TWT command
407*5113495bSYour Name  * @active_cmd: Fill active command in this output parameter
408*5113495bSYour Name  *
409*5113495bSYour Name  * Return: True if given command is in progress
410*5113495bSYour Name  */
411*5113495bSYour Name static inline bool
ucfg_mlme_twt_is_command_in_progress(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id,enum wlan_twt_commands cmd,enum wlan_twt_commands * active_cmd)412*5113495bSYour Name ucfg_mlme_twt_is_command_in_progress(struct wlan_objmgr_psoc *psoc,
413*5113495bSYour Name 				     struct qdf_mac_addr *peer_mac,
414*5113495bSYour Name 				     uint8_t dialog_id,
415*5113495bSYour Name 				     enum wlan_twt_commands cmd,
416*5113495bSYour Name 				     enum wlan_twt_commands *active_cmd)
417*5113495bSYour Name {
418*5113495bSYour Name 	return mlme_twt_is_command_in_progress(psoc, peer_mac, dialog_id,
419*5113495bSYour Name 					       cmd, active_cmd);
420*5113495bSYour Name }
421*5113495bSYour Name 
422*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_set_twt_command_in_progress(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id,enum wlan_twt_commands cmd)423*5113495bSYour Name ucfg_mlme_set_twt_command_in_progress(struct wlan_objmgr_psoc *psoc,
424*5113495bSYour Name 				      struct qdf_mac_addr *peer_mac,
425*5113495bSYour Name 				      uint8_t dialog_id,
426*5113495bSYour Name 				      enum wlan_twt_commands cmd)
427*5113495bSYour Name {
428*5113495bSYour Name 	return mlme_set_twt_command_in_progress(psoc, peer_mac, dialog_id, cmd);
429*5113495bSYour Name }
430*5113495bSYour Name 
431*5113495bSYour Name /**
432*5113495bSYour Name  * ucfg_mlme_set_twt_setup_done() - Set TWT setup done flag
433*5113495bSYour Name  * @psoc: Pointer to global PSOC object
434*5113495bSYour Name  * @peer_mac: Global peer mac address
435*5113495bSYour Name  * @dialog_id: TWT session dialog id
436*5113495bSYour Name  * @is_set: true if setup done flag needs to be set
437*5113495bSYour Name  *
438*5113495bSYour Name  * Return: None
439*5113495bSYour Name  */
440*5113495bSYour Name static inline void
ucfg_mlme_set_twt_setup_done(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id,bool is_set)441*5113495bSYour Name ucfg_mlme_set_twt_setup_done(struct wlan_objmgr_psoc *psoc,
442*5113495bSYour Name 			     struct qdf_mac_addr *peer_mac,
443*5113495bSYour Name 			     uint8_t dialog_id, bool is_set)
444*5113495bSYour Name {
445*5113495bSYour Name 	mlme_set_twt_setup_done(psoc, peer_mac, dialog_id, is_set);
446*5113495bSYour Name }
447*5113495bSYour Name 
448*5113495bSYour Name /**
449*5113495bSYour Name  * ucfg_mlme_is_twt_setup_done() - Get if the TWT setup for given dialog id
450*5113495bSYour Name  * is complete.
451*5113495bSYour Name  * @psoc: Pointer to global psoc object
452*5113495bSYour Name  * @peer_mac:  Pointer to peer mac address
453*5113495bSYour Name  * @dialog_id: TWT session dialog id
454*5113495bSYour Name  *
455*5113495bSYour Name  * Return: True if TWT setup is successful for the dialog id
456*5113495bSYour Name  */
457*5113495bSYour Name static inline bool
ucfg_mlme_is_twt_setup_done(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id)458*5113495bSYour Name ucfg_mlme_is_twt_setup_done(struct wlan_objmgr_psoc *psoc,
459*5113495bSYour Name 			    struct qdf_mac_addr *peer_mac, uint8_t dialog_id)
460*5113495bSYour Name {
461*5113495bSYour Name 	return mlme_is_twt_setup_done(psoc, peer_mac, dialog_id);
462*5113495bSYour Name }
463*5113495bSYour Name 
464*5113495bSYour Name /**
465*5113495bSYour Name  * ucfg_mlme_is_flexible_twt_enabled() - Get if flexible TWT is enabled
466*5113495bSYour Name  * @psoc: Pointer to global psoc object
467*5113495bSYour Name  *
468*5113495bSYour Name  * Return: True if flexible TWT is supported
469*5113495bSYour Name  */
470*5113495bSYour Name static inline
ucfg_mlme_is_flexible_twt_enabled(struct wlan_objmgr_psoc * psoc)471*5113495bSYour Name bool ucfg_mlme_is_flexible_twt_enabled(struct wlan_objmgr_psoc *psoc)
472*5113495bSYour Name {
473*5113495bSYour Name 	return mlme_is_flexible_twt_enabled(psoc);
474*5113495bSYour Name }
475*5113495bSYour Name 
476*5113495bSYour Name /**
477*5113495bSYour Name  * ucfg_mlme_get_twt_peer_capabilities() - Get peer capabilities
478*5113495bSYour Name  * @psoc: Pointer to global psoc object
479*5113495bSYour Name  * @peer_mac: Pointer to peer mac address
480*5113495bSYour Name  *
481*5113495bSYour Name  * Return: Peer capabilities bitmap
482*5113495bSYour Name  */
483*5113495bSYour Name static inline
ucfg_mlme_get_twt_peer_capabilities(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac)484*5113495bSYour Name uint8_t ucfg_mlme_get_twt_peer_capabilities(struct wlan_objmgr_psoc *psoc,
485*5113495bSYour Name 					    struct qdf_mac_addr *peer_mac)
486*5113495bSYour Name {
487*5113495bSYour Name 	return mlme_get_twt_peer_capabilities(psoc, peer_mac);
488*5113495bSYour Name }
489*5113495bSYour Name 
490*5113495bSYour Name /**
491*5113495bSYour Name  * ucfg_mlme_get_twt_peer_bcast_capabilities() - Get peer broadcast capabilities
492*5113495bSYour Name  * @psoc: Pointer to global psoc object
493*5113495bSYour Name  * @peer_mac: Pointer to peer mac address
494*5113495bSYour Name  *
495*5113495bSYour Name  * Return: Return True if peer responder capabilities support else False
496*5113495bSYour Name  */
497*5113495bSYour Name bool ucfg_mlme_get_twt_peer_bcast_capabilities(struct wlan_objmgr_psoc *psoc,
498*5113495bSYour Name 					       struct qdf_mac_addr *peer_mac);
499*5113495bSYour Name 
500*5113495bSYour Name /**
501*5113495bSYour Name  * ucfg_mlme_get_twt_peer_responder_capabilities() - Get peer responder
502*5113495bSYour Name  * capabilities
503*5113495bSYour Name  * @psoc: Pointer to global psoc object
504*5113495bSYour Name  * @peer_mac: Pointer to peer mac address
505*5113495bSYour Name  *
506*5113495bSYour Name  * Return: Return True if peer responder capabilities support else False
507*5113495bSYour Name  */
508*5113495bSYour Name bool ucfg_mlme_get_twt_peer_responder_capabilities(
509*5113495bSYour Name 						struct wlan_objmgr_psoc *psoc,
510*5113495bSYour Name 						struct qdf_mac_addr *peer_mac);
511*5113495bSYour Name 
512*5113495bSYour Name /**
513*5113495bSYour Name  * ucfg_mlme_init_twt_context() - Initialize TWT context
514*5113495bSYour Name  * @psoc: Pointer to global psoc object
515*5113495bSYour Name  * @peer_mac: Pointer to peer mac address
516*5113495bSYour Name  * @dialog_id: Dialog id
517*5113495bSYour Name  *
518*5113495bSYour Name  * Return: QDF_STATUS
519*5113495bSYour Name  */
520*5113495bSYour Name static inline
ucfg_mlme_init_twt_context(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id)521*5113495bSYour Name QDF_STATUS ucfg_mlme_init_twt_context(struct wlan_objmgr_psoc *psoc,
522*5113495bSYour Name 				      struct qdf_mac_addr *peer_mac,
523*5113495bSYour Name 				      uint8_t dialog_id)
524*5113495bSYour Name {
525*5113495bSYour Name 	return mlme_init_twt_context(psoc, peer_mac, dialog_id);
526*5113495bSYour Name }
527*5113495bSYour Name 
528*5113495bSYour Name /**
529*5113495bSYour Name  * ucfg_mlme_is_24ghz_twt_enabled() - Get if host triggered TWT is enabled on
530*5113495bSYour Name  * 2.4Ghz band.
531*5113495bSYour Name  * @psoc: Pointer to global psoc object
532*5113495bSYour Name  *
533*5113495bSYour Name  * Return: True if host TWT is enabled on 2.4 Ghz band.
534*5113495bSYour Name  */
535*5113495bSYour Name static inline bool
ucfg_mlme_is_24ghz_twt_enabled(struct wlan_objmgr_psoc * psoc)536*5113495bSYour Name ucfg_mlme_is_24ghz_twt_enabled(struct wlan_objmgr_psoc *psoc)
537*5113495bSYour Name {
538*5113495bSYour Name 	return mlme_is_24ghz_twt_enabled(psoc);
539*5113495bSYour Name }
540*5113495bSYour Name 
541*5113495bSYour Name /**
542*5113495bSYour Name  * ucfg_mlme_set_twt_nudge_tgt_cap() - Set TWT nudge target capability.
543*5113495bSYour Name  * @psoc: Pointer to global psoc object
544*5113495bSYour Name  * @val: Value to set
545*5113495bSYour Name  *
546*5113495bSYour Name  * Return: QDF_STATUS
547*5113495bSYour Name  */
548*5113495bSYour Name QDF_STATUS
549*5113495bSYour Name ucfg_mlme_set_twt_nudge_tgt_cap(struct wlan_objmgr_psoc *psoc, bool val);
550*5113495bSYour Name 
551*5113495bSYour Name /**
552*5113495bSYour Name  * ucfg_mlme_get_twt_nudge_tgt_cap() - Get TWT Nudge target capability
553*5113495bSYour Name  * @psoc: Pointer to global psoc object
554*5113495bSYour Name  * @val: Value to set
555*5113495bSYour Name  *
556*5113495bSYour Name  * Return: QDF_STATUS
557*5113495bSYour Name  */
558*5113495bSYour Name QDF_STATUS
559*5113495bSYour Name ucfg_mlme_get_twt_nudge_tgt_cap(struct wlan_objmgr_psoc *psoc, bool *val);
560*5113495bSYour Name 
561*5113495bSYour Name /**
562*5113495bSYour Name  * ucfg_mlme_set_twt_all_twt_tgt_cap() - Set TWT all dialog support target
563*5113495bSYour Name  * @psoc: Pointer to global psoc object
564*5113495bSYour Name  * @val: Value to set
565*5113495bSYour Name  *
566*5113495bSYour Name  * Return: QDF_STATUS
567*5113495bSYour Name  */
568*5113495bSYour Name QDF_STATUS
569*5113495bSYour Name ucfg_mlme_set_twt_all_twt_tgt_cap(struct wlan_objmgr_psoc *psoc, bool val);
570*5113495bSYour Name 
571*5113495bSYour Name /**
572*5113495bSYour Name  * ucfg_mlme_get_twt_all_twt_tgt_cap()  - Get TWT all dialog support target
573*5113495bSYour Name  * capability
574*5113495bSYour Name  * @psoc: Pointer to global psoc object
575*5113495bSYour Name  * @val: Value to set
576*5113495bSYour Name  *
577*5113495bSYour Name  * Return: QDF_STATUS
578*5113495bSYour Name  */
579*5113495bSYour Name QDF_STATUS
580*5113495bSYour Name ucfg_mlme_get_twt_all_twt_tgt_cap(struct wlan_objmgr_psoc *psoc, bool *val);
581*5113495bSYour Name 
582*5113495bSYour Name /**
583*5113495bSYour Name  * ucfg_mlme_set_twt_statistics_tgt_cap()  - Set TWT statistics target
584*5113495bSYour Name  * capability
585*5113495bSYour Name  * @psoc: Pointer to global psoc object
586*5113495bSYour Name  * @val: Value to set
587*5113495bSYour Name  *
588*5113495bSYour Name  * Return: QDF_STATUS
589*5113495bSYour Name  */
590*5113495bSYour Name QDF_STATUS
591*5113495bSYour Name ucfg_mlme_set_twt_statistics_tgt_cap(struct wlan_objmgr_psoc *psoc, bool val);
592*5113495bSYour Name 
593*5113495bSYour Name /**
594*5113495bSYour Name  * ucfg_mlme_get_twt_statistics_tgt_cap() - Get TWT statistics target capability
595*5113495bSYour Name  * @psoc: Pointer to global psoc object
596*5113495bSYour Name  * @val: Value to set
597*5113495bSYour Name  *
598*5113495bSYour Name  * Return: QDF_STATUS
599*5113495bSYour Name  */
600*5113495bSYour Name QDF_STATUS
601*5113495bSYour Name ucfg_mlme_get_twt_statistics_tgt_cap(struct wlan_objmgr_psoc *psoc, bool *val);
602*5113495bSYour Name 
603*5113495bSYour Name /**
604*5113495bSYour Name  * ucfg_mlme_set_twt_session_state()  - Set TWT session state
605*5113495bSYour Name  * @psoc: Pointer to global psoc object
606*5113495bSYour Name  * @peer_mac:  Pointer to peer mac address
607*5113495bSYour Name  * @dialog_id: TWT session dialog id
608*5113495bSYour Name  * @state: TWT state
609*5113495bSYour Name  *
610*5113495bSYour Name  * Return: None
611*5113495bSYour Name  */
612*5113495bSYour Name static inline
ucfg_mlme_set_twt_session_state(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id,enum wlan_twt_session_state state)613*5113495bSYour Name void ucfg_mlme_set_twt_session_state(struct wlan_objmgr_psoc *psoc,
614*5113495bSYour Name 				     struct qdf_mac_addr *peer_mac,
615*5113495bSYour Name 				     uint8_t dialog_id,
616*5113495bSYour Name 				     enum wlan_twt_session_state state)
617*5113495bSYour Name {
618*5113495bSYour Name 	mlme_set_twt_session_state(psoc, peer_mac, dialog_id, state);
619*5113495bSYour Name }
620*5113495bSYour Name 
621*5113495bSYour Name /**
622*5113495bSYour Name  * ucfg_mlme_get_twt_session_state()  - Get TWT session state
623*5113495bSYour Name  * @psoc: Pointer to global psoc object
624*5113495bSYour Name  * @peer_mac:  Pointer to peer mac address
625*5113495bSYour Name  * @dialog_id: TWT session dialog id
626*5113495bSYour Name  *
627*5113495bSYour Name  * Return: enum wlan_twt_session_state
628*5113495bSYour Name  */
629*5113495bSYour Name static inline enum wlan_twt_session_state
ucfg_mlme_get_twt_session_state(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id)630*5113495bSYour Name ucfg_mlme_get_twt_session_state(struct wlan_objmgr_psoc *psoc,
631*5113495bSYour Name 				struct qdf_mac_addr *peer_mac,
632*5113495bSYour Name 				uint8_t dialog_id)
633*5113495bSYour Name {
634*5113495bSYour Name 	return mlme_get_twt_session_state(psoc, peer_mac, dialog_id);
635*5113495bSYour Name }
636*5113495bSYour Name #else
637*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_get_twt_requestor(struct wlan_objmgr_psoc * psoc,bool * val)638*5113495bSYour Name ucfg_mlme_get_twt_requestor(struct wlan_objmgr_psoc *psoc,
639*5113495bSYour Name 			    bool *val)
640*5113495bSYour Name {
641*5113495bSYour Name 	*val = false;
642*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
643*5113495bSYour Name }
644*5113495bSYour Name 
645*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_set_twt_requestor(struct wlan_objmgr_psoc * psoc,bool val)646*5113495bSYour Name ucfg_mlme_set_twt_requestor(struct wlan_objmgr_psoc *psoc,
647*5113495bSYour Name 			    bool val)
648*5113495bSYour Name {
649*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
650*5113495bSYour Name }
651*5113495bSYour Name 
652*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_get_twt_responder(struct wlan_objmgr_psoc * psoc,bool * val)653*5113495bSYour Name ucfg_mlme_get_twt_responder(struct wlan_objmgr_psoc *psoc,
654*5113495bSYour Name 			    bool *val)
655*5113495bSYour Name {
656*5113495bSYour Name 	*val = false;
657*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
658*5113495bSYour Name }
659*5113495bSYour Name 
660*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_set_twt_responder(struct wlan_objmgr_psoc * psoc,bool val)661*5113495bSYour Name ucfg_mlme_set_twt_responder(struct wlan_objmgr_psoc *psoc,
662*5113495bSYour Name 			    bool val)
663*5113495bSYour Name {
664*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
665*5113495bSYour Name }
666*5113495bSYour Name 
667*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_get_twt_congestion_timeout(struct wlan_objmgr_psoc * psoc,uint32_t * val)668*5113495bSYour Name ucfg_mlme_get_twt_congestion_timeout(struct wlan_objmgr_psoc *psoc,
669*5113495bSYour Name 				     uint32_t *val)
670*5113495bSYour Name {
671*5113495bSYour Name 	*val = 0;
672*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
673*5113495bSYour Name }
674*5113495bSYour Name 
675*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_set_twt_congestion_timeout(struct wlan_objmgr_psoc * psoc,uint32_t val)676*5113495bSYour Name ucfg_mlme_set_twt_congestion_timeout(struct wlan_objmgr_psoc *psoc,
677*5113495bSYour Name 				     uint32_t val)
678*5113495bSYour Name {
679*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
680*5113495bSYour Name }
681*5113495bSYour Name 
682*5113495bSYour Name static inline bool
ucfg_mlme_is_twt_enabled(struct wlan_objmgr_psoc * psoc)683*5113495bSYour Name ucfg_mlme_is_twt_enabled(struct wlan_objmgr_psoc *psoc)
684*5113495bSYour Name {
685*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
686*5113495bSYour Name }
687*5113495bSYour Name 
688*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_set_enable_twt(struct wlan_objmgr_psoc * psoc,bool val)689*5113495bSYour Name ucfg_mlme_set_enable_twt(struct wlan_objmgr_psoc *psoc,
690*5113495bSYour Name 			 bool val)
691*5113495bSYour Name {
692*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
693*5113495bSYour Name }
694*5113495bSYour Name 
695*5113495bSYour Name static inline bool
ucfg_mlme_is_twt_setup_done(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id)696*5113495bSYour Name ucfg_mlme_is_twt_setup_done(struct wlan_objmgr_psoc *psoc,
697*5113495bSYour Name 			    struct qdf_mac_addr *peer_mac, uint8_t dialog_id)
698*5113495bSYour Name {
699*5113495bSYour Name 	return 0;
700*5113495bSYour Name }
701*5113495bSYour Name 
702*5113495bSYour Name static inline void
ucfg_mlme_set_twt_setup_done(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id,bool is_set)703*5113495bSYour Name ucfg_mlme_set_twt_setup_done(struct wlan_objmgr_psoc *psoc,
704*5113495bSYour Name 			     struct qdf_mac_addr *peer_mac,
705*5113495bSYour Name 			     uint8_t dialog_id, bool is_set)
706*5113495bSYour Name {}
707*5113495bSYour Name 
708*5113495bSYour Name static inline bool
ucfg_mlme_is_twt_setup_in_progress(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id)709*5113495bSYour Name ucfg_mlme_is_twt_setup_in_progress(struct wlan_objmgr_psoc *psoc,
710*5113495bSYour Name 				   struct qdf_mac_addr *peer_mac,
711*5113495bSYour Name 				   uint8_t dialog_id)
712*5113495bSYour Name {
713*5113495bSYour Name 	return false;
714*5113495bSYour Name }
715*5113495bSYour Name 
716*5113495bSYour Name static inline bool
ucfg_mlme_is_max_twt_sessions_reached(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id)717*5113495bSYour Name ucfg_mlme_is_max_twt_sessions_reached(struct wlan_objmgr_psoc *psoc,
718*5113495bSYour Name 				      struct qdf_mac_addr *peer_mac,
719*5113495bSYour Name 				      uint8_t dialog_id)
720*5113495bSYour Name {
721*5113495bSYour Name 	return false;
722*5113495bSYour Name }
723*5113495bSYour Name 
724*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_set_twt_command_in_progress(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id,enum wlan_twt_commands cmd)725*5113495bSYour Name ucfg_mlme_set_twt_command_in_progress(struct wlan_objmgr_psoc *psoc,
726*5113495bSYour Name 				      struct qdf_mac_addr *peer_mac,
727*5113495bSYour Name 				      uint8_t dialog_id,
728*5113495bSYour Name 				      enum wlan_twt_commands cmd)
729*5113495bSYour Name {
730*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
731*5113495bSYour Name }
732*5113495bSYour Name 
733*5113495bSYour Name static inline bool
ucfg_mlme_twt_is_command_in_progress(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id,enum wlan_twt_commands cmd,enum wlan_twt_commands * active_cmd)734*5113495bSYour Name ucfg_mlme_twt_is_command_in_progress(struct wlan_objmgr_psoc *psoc,
735*5113495bSYour Name 				     struct qdf_mac_addr *peer_mac,
736*5113495bSYour Name 				     uint8_t dialog_id,
737*5113495bSYour Name 				     enum wlan_twt_commands cmd,
738*5113495bSYour Name 				     enum wlan_twt_commands *active_cmd)
739*5113495bSYour Name {
740*5113495bSYour Name 	return false;
741*5113495bSYour Name }
742*5113495bSYour Name 
743*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_get_twt_bcast_requestor(struct wlan_objmgr_psoc * psoc,bool * val)744*5113495bSYour Name ucfg_mlme_get_twt_bcast_requestor(struct wlan_objmgr_psoc *psoc,
745*5113495bSYour Name 				  bool *val)
746*5113495bSYour Name {
747*5113495bSYour Name 	*val = false;
748*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
749*5113495bSYour Name }
750*5113495bSYour Name 
751*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_set_twt_bcast_requestor(struct wlan_objmgr_psoc * psoc,bool val)752*5113495bSYour Name ucfg_mlme_set_twt_bcast_requestor(struct wlan_objmgr_psoc *psoc,
753*5113495bSYour Name 				  bool val)
754*5113495bSYour Name {
755*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
756*5113495bSYour Name }
757*5113495bSYour Name 
758*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_get_twt_bcast_responder(struct wlan_objmgr_psoc * psoc,bool * val)759*5113495bSYour Name ucfg_mlme_get_twt_bcast_responder(struct wlan_objmgr_psoc *psoc,
760*5113495bSYour Name 				  bool *val)
761*5113495bSYour Name {
762*5113495bSYour Name 	*val = false;
763*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
764*5113495bSYour Name }
765*5113495bSYour Name 
766*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_set_twt_bcast_responder(struct wlan_objmgr_psoc * psoc,bool val)767*5113495bSYour Name ucfg_mlme_set_twt_bcast_responder(struct wlan_objmgr_psoc *psoc,
768*5113495bSYour Name 				  bool val)
769*5113495bSYour Name {
770*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
771*5113495bSYour Name }
772*5113495bSYour Name 
773*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_set_twt_requestor_flag(struct wlan_objmgr_psoc * psoc,bool val)774*5113495bSYour Name ucfg_mlme_set_twt_requestor_flag(struct wlan_objmgr_psoc *psoc,
775*5113495bSYour Name 				 bool val)
776*5113495bSYour Name {
777*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
778*5113495bSYour Name }
779*5113495bSYour Name 
780*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_set_twt_responder_flag(struct wlan_objmgr_psoc * psoc,bool val)781*5113495bSYour Name ucfg_mlme_set_twt_responder_flag(struct wlan_objmgr_psoc *psoc,
782*5113495bSYour Name 				 bool val)
783*5113495bSYour Name {
784*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
785*5113495bSYour Name }
786*5113495bSYour Name 
787*5113495bSYour Name static inline
ucfg_mlme_is_flexible_twt_enabled(struct wlan_objmgr_psoc * psoc)788*5113495bSYour Name bool ucfg_mlme_is_flexible_twt_enabled(struct wlan_objmgr_psoc *psoc)
789*5113495bSYour Name {
790*5113495bSYour Name 	return false;
791*5113495bSYour Name }
792*5113495bSYour Name 
793*5113495bSYour Name static inline
ucfg_mlme_get_twt_peer_capabilities(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac)794*5113495bSYour Name uint8_t ucfg_mlme_get_twt_peer_capabilities(struct wlan_objmgr_psoc *psoc,
795*5113495bSYour Name 					    struct qdf_mac_addr *peer_mac)
796*5113495bSYour Name {
797*5113495bSYour Name 	return 0;
798*5113495bSYour Name }
799*5113495bSYour Name 
800*5113495bSYour Name static inline
ucfg_mlme_get_twt_peer_bcast_capabilities(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac)801*5113495bSYour Name bool ucfg_mlme_get_twt_peer_bcast_capabilities(struct wlan_objmgr_psoc *psoc,
802*5113495bSYour Name 					       struct qdf_mac_addr *peer_mac)
803*5113495bSYour Name {
804*5113495bSYour Name 	return false;
805*5113495bSYour Name }
806*5113495bSYour Name 
807*5113495bSYour Name static inline
ucfg_mlme_get_twt_peer_responder_capabilities(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac)808*5113495bSYour Name bool ucfg_mlme_get_twt_peer_responder_capabilities(
809*5113495bSYour Name 						struct wlan_objmgr_psoc *psoc,
810*5113495bSYour Name 						struct qdf_mac_addr *peer_mac)
811*5113495bSYour Name {
812*5113495bSYour Name 	return false;
813*5113495bSYour Name }
814*5113495bSYour Name 
815*5113495bSYour Name static inline
ucfg_mlme_init_twt_context(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id)816*5113495bSYour Name QDF_STATUS ucfg_mlme_init_twt_context(struct wlan_objmgr_psoc *psoc,
817*5113495bSYour Name 				      struct qdf_mac_addr *peer_mac,
818*5113495bSYour Name 				      uint8_t dialog_id)
819*5113495bSYour Name {
820*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
821*5113495bSYour Name }
822*5113495bSYour Name 
823*5113495bSYour Name static inline bool
ucfg_mlme_is_24ghz_twt_enabled(struct wlan_objmgr_psoc * psoc)824*5113495bSYour Name ucfg_mlme_is_24ghz_twt_enabled(struct wlan_objmgr_psoc *psoc)
825*5113495bSYour Name {
826*5113495bSYour Name 	return false;
827*5113495bSYour Name }
828*5113495bSYour Name 
829*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_get_twt_nudge_tgt_cap(struct wlan_objmgr_psoc * psoc,bool * val)830*5113495bSYour Name ucfg_mlme_get_twt_nudge_tgt_cap(struct wlan_objmgr_psoc *psoc, bool *val)
831*5113495bSYour Name {
832*5113495bSYour Name 	*val = false;
833*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
834*5113495bSYour Name }
835*5113495bSYour Name 
836*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_get_twt_all_twt_tgt_cap(struct wlan_objmgr_psoc * psoc,bool * val)837*5113495bSYour Name ucfg_mlme_get_twt_all_twt_tgt_cap(struct wlan_objmgr_psoc *psoc, bool *val)
838*5113495bSYour Name {
839*5113495bSYour Name 	*val = false;
840*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
841*5113495bSYour Name }
842*5113495bSYour Name 
843*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_get_twt_statistics_tgt_cap(struct wlan_objmgr_psoc * psoc,bool * val)844*5113495bSYour Name ucfg_mlme_get_twt_statistics_tgt_cap(struct wlan_objmgr_psoc *psoc, bool *val)
845*5113495bSYour Name {
846*5113495bSYour Name 	*val = false;
847*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
848*5113495bSYour Name }
849*5113495bSYour Name 
850*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_set_twt_nudge_tgt_cap(struct wlan_objmgr_psoc * psoc,bool val)851*5113495bSYour Name ucfg_mlme_set_twt_nudge_tgt_cap(struct wlan_objmgr_psoc *psoc, bool val)
852*5113495bSYour Name {
853*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
854*5113495bSYour Name }
855*5113495bSYour Name 
856*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_set_twt_all_twt_tgt_cap(struct wlan_objmgr_psoc * psoc,bool val)857*5113495bSYour Name ucfg_mlme_set_twt_all_twt_tgt_cap(struct wlan_objmgr_psoc *psoc, bool val)
858*5113495bSYour Name {
859*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
860*5113495bSYour Name }
861*5113495bSYour Name 
862*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_set_twt_statistics_tgt_cap(struct wlan_objmgr_psoc * psoc,bool val)863*5113495bSYour Name ucfg_mlme_set_twt_statistics_tgt_cap(struct wlan_objmgr_psoc *psoc, bool val)
864*5113495bSYour Name {
865*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
866*5113495bSYour Name }
867*5113495bSYour Name 
868*5113495bSYour Name static inline
ucfg_mlme_set_twt_session_state(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id,enum wlan_twt_session_state state)869*5113495bSYour Name void ucfg_mlme_set_twt_session_state(struct wlan_objmgr_psoc *psoc,
870*5113495bSYour Name 				     struct qdf_mac_addr *peer_mac,
871*5113495bSYour Name 				     uint8_t dialog_id,
872*5113495bSYour Name 				     enum wlan_twt_session_state state)
873*5113495bSYour Name {}
874*5113495bSYour Name 
875*5113495bSYour Name static inline enum wlan_twt_session_state
ucfg_mlme_get_twt_session_state(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id)876*5113495bSYour Name ucfg_mlme_get_twt_session_state(struct wlan_objmgr_psoc *psoc,
877*5113495bSYour Name 				struct qdf_mac_addr *peer_mac,
878*5113495bSYour Name 				uint8_t dialog_id)
879*5113495bSYour Name {
880*5113495bSYour Name 	return WLAN_TWT_SETUP_STATE_NOT_ESTABLISHED;
881*5113495bSYour Name }
882*5113495bSYour Name 
883*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_set_twt_res_service_cap(struct wlan_objmgr_psoc * psoc,bool val)884*5113495bSYour Name ucfg_mlme_set_twt_res_service_cap(struct wlan_objmgr_psoc *psoc, bool val)
885*5113495bSYour Name {
886*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
887*5113495bSYour Name }
888*5113495bSYour Name 
889*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_get_twt_res_service_cap(struct wlan_objmgr_psoc * psoc,bool * val)890*5113495bSYour Name ucfg_mlme_get_twt_res_service_cap(struct wlan_objmgr_psoc *psoc, bool *val)
891*5113495bSYour Name {
892*5113495bSYour Name 	*val = false;
893*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
894*5113495bSYour Name }
895*5113495bSYour Name 
896*5113495bSYour Name static inline QDF_STATUS
ucfg_mlme_reset_twt_active_cmd(struct wlan_objmgr_psoc * psoc,struct qdf_mac_addr * peer_mac,uint8_t dialog_id)897*5113495bSYour Name ucfg_mlme_reset_twt_active_cmd(struct wlan_objmgr_psoc *psoc,
898*5113495bSYour Name 			       struct qdf_mac_addr *peer_mac,
899*5113495bSYour Name 			       uint8_t dialog_id)
900*5113495bSYour Name {
901*5113495bSYour Name 	return QDF_STATUS_E_NOSUPPORT;
902*5113495bSYour Name }
903*5113495bSYour Name 
904*5113495bSYour Name #endif /* defined(WLAN_SUPPORT_TWT) && defined(WLAN_FEATURE_11AX) */
905*5113495bSYour Name #endif /* _WLAN_MLME_TWT_UCFG_API_H_ */
906