xref: /wlan-driver/qca-wifi-host-cmn/wmi/src/wmi_unified_twt_api.c (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  *
5*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
6*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
7*5113495bSYour Name  * above copyright notice and this permission notice appear in all
8*5113495bSYour Name  * copies.
9*5113495bSYour Name  *
10*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
18*5113495bSYour Name  */
19*5113495bSYour Name /**
20*5113495bSYour Name  * DOC: Implement API's specific to TWT component.
21*5113495bSYour Name  */
22*5113495bSYour Name 
23*5113495bSYour Name #include "wmi_unified_priv.h"
24*5113495bSYour Name #include "wmi_unified_twt_api.h"
25*5113495bSYour Name 
26*5113495bSYour Name #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
27*5113495bSYour Name #include <wlan_twt_public_structs.h>
28*5113495bSYour Name 
29*5113495bSYour Name QDF_STATUS
wmi_unified_twt_enable_cmd(wmi_unified_t wmi_handle,struct twt_enable_param * params)30*5113495bSYour Name wmi_unified_twt_enable_cmd(wmi_unified_t wmi_handle,
31*5113495bSYour Name 			   struct twt_enable_param *params)
32*5113495bSYour Name {
33*5113495bSYour Name 	if (wmi_handle->ops->send_twt_enable_cmd)
34*5113495bSYour Name 		return wmi_handle->ops->send_twt_enable_cmd(
35*5113495bSYour Name 				wmi_handle, params);
36*5113495bSYour Name 
37*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
38*5113495bSYour Name }
39*5113495bSYour Name 
40*5113495bSYour Name QDF_STATUS
wmi_unified_twt_disable_cmd(wmi_unified_t wmi_handle,struct twt_disable_param * params)41*5113495bSYour Name wmi_unified_twt_disable_cmd(wmi_unified_t wmi_handle,
42*5113495bSYour Name 			    struct twt_disable_param *params)
43*5113495bSYour Name {
44*5113495bSYour Name 	if (wmi_handle->ops->send_twt_disable_cmd)
45*5113495bSYour Name 		return wmi_handle->ops->send_twt_disable_cmd(
46*5113495bSYour Name 				wmi_handle, params);
47*5113495bSYour Name 
48*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
49*5113495bSYour Name }
50*5113495bSYour Name 
51*5113495bSYour Name QDF_STATUS
wmi_unified_twt_add_dialog_cmd(wmi_unified_t wmi_handle,struct twt_add_dialog_param * params)52*5113495bSYour Name wmi_unified_twt_add_dialog_cmd(wmi_unified_t wmi_handle,
53*5113495bSYour Name 			       struct twt_add_dialog_param *params)
54*5113495bSYour Name {
55*5113495bSYour Name 	if (wmi_handle->ops->send_twt_add_dialog_cmd)
56*5113495bSYour Name 		return wmi_handle->ops->send_twt_add_dialog_cmd(
57*5113495bSYour Name 				wmi_handle, params);
58*5113495bSYour Name 
59*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
60*5113495bSYour Name }
61*5113495bSYour Name 
62*5113495bSYour Name QDF_STATUS
wmi_unified_twt_del_dialog_cmd(wmi_unified_t wmi_handle,struct twt_del_dialog_param * params)63*5113495bSYour Name wmi_unified_twt_del_dialog_cmd(wmi_unified_t wmi_handle,
64*5113495bSYour Name 			       struct twt_del_dialog_param *params)
65*5113495bSYour Name {
66*5113495bSYour Name 	if (wmi_handle->ops->send_twt_del_dialog_cmd)
67*5113495bSYour Name 		return wmi_handle->ops->send_twt_del_dialog_cmd(
68*5113495bSYour Name 				wmi_handle, params);
69*5113495bSYour Name 
70*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
71*5113495bSYour Name }
72*5113495bSYour Name 
73*5113495bSYour Name QDF_STATUS
wmi_unified_twt_pause_dialog_cmd(wmi_unified_t wmi_handle,struct twt_pause_dialog_cmd_param * params)74*5113495bSYour Name wmi_unified_twt_pause_dialog_cmd(wmi_unified_t wmi_handle,
75*5113495bSYour Name 				 struct twt_pause_dialog_cmd_param *params)
76*5113495bSYour Name {
77*5113495bSYour Name 	if (wmi_handle->ops->send_twt_pause_dialog_cmd)
78*5113495bSYour Name 		return wmi_handle->ops->send_twt_pause_dialog_cmd(
79*5113495bSYour Name 				wmi_handle, params);
80*5113495bSYour Name 
81*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
82*5113495bSYour Name }
83*5113495bSYour Name 
84*5113495bSYour Name QDF_STATUS
wmi_unified_twt_nudge_dialog_cmd(wmi_unified_t wmi_handle,struct twt_nudge_dialog_cmd_param * params)85*5113495bSYour Name wmi_unified_twt_nudge_dialog_cmd(wmi_unified_t wmi_handle,
86*5113495bSYour Name 				 struct twt_nudge_dialog_cmd_param *params)
87*5113495bSYour Name {
88*5113495bSYour Name 	if (wmi_handle->ops->send_twt_nudge_dialog_cmd)
89*5113495bSYour Name 		return wmi_handle->ops->send_twt_nudge_dialog_cmd(
90*5113495bSYour Name 				wmi_handle, params);
91*5113495bSYour Name 
92*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
93*5113495bSYour Name }
94*5113495bSYour Name 
wmi_unified_twt_resume_dialog_cmd(wmi_unified_t wmi_handle,struct twt_resume_dialog_cmd_param * params)95*5113495bSYour Name QDF_STATUS wmi_unified_twt_resume_dialog_cmd(
96*5113495bSYour Name 			wmi_unified_t wmi_handle,
97*5113495bSYour Name 			struct twt_resume_dialog_cmd_param *params)
98*5113495bSYour Name {
99*5113495bSYour Name 	if (wmi_handle->ops->send_twt_resume_dialog_cmd)
100*5113495bSYour Name 		return wmi_handle->ops->send_twt_resume_dialog_cmd(
101*5113495bSYour Name 				wmi_handle, params);
102*5113495bSYour Name 
103*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
104*5113495bSYour Name }
105*5113495bSYour Name 
106*5113495bSYour Name #ifdef WLAN_SUPPORT_BCAST_TWT
wmi_unified_twt_btwt_invite_sta_cmd(wmi_unified_t wmi_handle,struct twt_btwt_invite_sta_cmd_param * params)107*5113495bSYour Name QDF_STATUS wmi_unified_twt_btwt_invite_sta_cmd(
108*5113495bSYour Name 			wmi_unified_t wmi_handle,
109*5113495bSYour Name 			struct twt_btwt_invite_sta_cmd_param *params)
110*5113495bSYour Name {
111*5113495bSYour Name 	if (wmi_handle->ops->send_twt_btwt_invite_sta_cmd)
112*5113495bSYour Name 		return wmi_handle->ops->send_twt_btwt_invite_sta_cmd(
113*5113495bSYour Name 				wmi_handle, params);
114*5113495bSYour Name 
115*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
116*5113495bSYour Name }
117*5113495bSYour Name 
wmi_unified_twt_btwt_remove_sta_cmd(wmi_unified_t wmi_handle,struct twt_btwt_remove_sta_cmd_param * params)118*5113495bSYour Name QDF_STATUS wmi_unified_twt_btwt_remove_sta_cmd(
119*5113495bSYour Name 			wmi_unified_t wmi_handle,
120*5113495bSYour Name 			struct twt_btwt_remove_sta_cmd_param *params)
121*5113495bSYour Name {
122*5113495bSYour Name 	if (wmi_handle->ops->send_twt_btwt_remove_sta_cmd)
123*5113495bSYour Name 		return wmi_handle->ops->send_twt_btwt_remove_sta_cmd(
124*5113495bSYour Name 				wmi_handle, params);
125*5113495bSYour Name 
126*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
127*5113495bSYour Name }
128*5113495bSYour Name #endif
129*5113495bSYour Name 
wmi_extract_twt_enable_comp_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct twt_enable_complete_event_param * params)130*5113495bSYour Name QDF_STATUS wmi_extract_twt_enable_comp_event(
131*5113495bSYour Name 			wmi_unified_t wmi_handle,
132*5113495bSYour Name 			uint8_t *evt_buf,
133*5113495bSYour Name 			struct twt_enable_complete_event_param *params)
134*5113495bSYour Name {
135*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_enable_comp_event)
136*5113495bSYour Name 		return wmi_handle->ops->extract_twt_enable_comp_event(
137*5113495bSYour Name 				wmi_handle, evt_buf, params);
138*5113495bSYour Name 
139*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
140*5113495bSYour Name }
141*5113495bSYour Name 
wmi_extract_twt_disable_comp_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct twt_disable_complete_event_param * params)142*5113495bSYour Name QDF_STATUS wmi_extract_twt_disable_comp_event(
143*5113495bSYour Name 			wmi_unified_t wmi_handle,
144*5113495bSYour Name 			uint8_t *evt_buf,
145*5113495bSYour Name 			struct twt_disable_complete_event_param *params)
146*5113495bSYour Name {
147*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_disable_comp_event)
148*5113495bSYour Name 		return wmi_handle->ops->extract_twt_disable_comp_event(
149*5113495bSYour Name 				wmi_handle, evt_buf, params);
150*5113495bSYour Name 
151*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
152*5113495bSYour Name }
153*5113495bSYour Name 
wmi_extract_twt_add_dialog_comp_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct twt_add_dialog_complete_event_param * params)154*5113495bSYour Name QDF_STATUS wmi_extract_twt_add_dialog_comp_event(
155*5113495bSYour Name 			wmi_unified_t wmi_handle,
156*5113495bSYour Name 			uint8_t *evt_buf,
157*5113495bSYour Name 			struct twt_add_dialog_complete_event_param *params)
158*5113495bSYour Name {
159*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_add_dialog_comp_event)
160*5113495bSYour Name 		return wmi_handle->ops->extract_twt_add_dialog_comp_event(
161*5113495bSYour Name 				wmi_handle, evt_buf, params);
162*5113495bSYour Name 
163*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
164*5113495bSYour Name }
165*5113495bSYour Name 
wmi_extract_twt_add_dialog_comp_additional_params(wmi_unified_t wmi_handle,uint8_t * evt_buf,uint32_t evt_buf_len,uint32_t idx,struct twt_add_dialog_additional_params * additional_params)166*5113495bSYour Name QDF_STATUS wmi_extract_twt_add_dialog_comp_additional_params(
167*5113495bSYour Name 		wmi_unified_t wmi_handle, uint8_t *evt_buf,
168*5113495bSYour Name 		uint32_t evt_buf_len, uint32_t idx,
169*5113495bSYour Name 		struct twt_add_dialog_additional_params *additional_params)
170*5113495bSYour Name {
171*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_add_dialog_comp_additional_params)
172*5113495bSYour Name 		return wmi_handle->ops->
173*5113495bSYour Name 			extract_twt_add_dialog_comp_additional_params(
174*5113495bSYour Name 			wmi_handle, evt_buf, evt_buf_len, idx,
175*5113495bSYour Name 			additional_params);
176*5113495bSYour Name 
177*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
178*5113495bSYour Name }
179*5113495bSYour Name 
wmi_extract_twt_del_dialog_comp_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct twt_del_dialog_complete_event_param * params)180*5113495bSYour Name QDF_STATUS wmi_extract_twt_del_dialog_comp_event(
181*5113495bSYour Name 		wmi_unified_t wmi_handle,
182*5113495bSYour Name 		uint8_t *evt_buf,
183*5113495bSYour Name 		struct twt_del_dialog_complete_event_param *params)
184*5113495bSYour Name {
185*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_del_dialog_comp_event)
186*5113495bSYour Name 		return wmi_handle->ops->extract_twt_del_dialog_comp_event(
187*5113495bSYour Name 				wmi_handle, evt_buf, params);
188*5113495bSYour Name 
189*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
190*5113495bSYour Name }
191*5113495bSYour Name 
wmi_extract_twt_pause_dialog_comp_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct twt_pause_dialog_complete_event_param * params)192*5113495bSYour Name QDF_STATUS wmi_extract_twt_pause_dialog_comp_event(
193*5113495bSYour Name 		wmi_unified_t wmi_handle,
194*5113495bSYour Name 		uint8_t *evt_buf,
195*5113495bSYour Name 		struct twt_pause_dialog_complete_event_param *params)
196*5113495bSYour Name {
197*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_pause_dialog_comp_event)
198*5113495bSYour Name 		return wmi_handle->ops->extract_twt_pause_dialog_comp_event(
199*5113495bSYour Name 				wmi_handle, evt_buf, params);
200*5113495bSYour Name 
201*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
202*5113495bSYour Name }
203*5113495bSYour Name 
wmi_extract_twt_nudge_dialog_comp_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct twt_nudge_dialog_complete_event_param * params)204*5113495bSYour Name QDF_STATUS wmi_extract_twt_nudge_dialog_comp_event(
205*5113495bSYour Name 		wmi_unified_t wmi_handle,
206*5113495bSYour Name 		uint8_t *evt_buf,
207*5113495bSYour Name 		struct twt_nudge_dialog_complete_event_param *params)
208*5113495bSYour Name {
209*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_nudge_dialog_comp_event)
210*5113495bSYour Name 		return wmi_handle->ops->extract_twt_nudge_dialog_comp_event(
211*5113495bSYour Name 				wmi_handle, evt_buf, params);
212*5113495bSYour Name 
213*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
214*5113495bSYour Name }
215*5113495bSYour Name 
wmi_extract_twt_resume_dialog_comp_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct twt_resume_dialog_complete_event_param * params)216*5113495bSYour Name QDF_STATUS wmi_extract_twt_resume_dialog_comp_event(
217*5113495bSYour Name 		wmi_unified_t wmi_handle,
218*5113495bSYour Name 		uint8_t *evt_buf,
219*5113495bSYour Name 		struct twt_resume_dialog_complete_event_param *params)
220*5113495bSYour Name {
221*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_resume_dialog_comp_event)
222*5113495bSYour Name 		return wmi_handle->ops->extract_twt_resume_dialog_comp_event(
223*5113495bSYour Name 				wmi_handle, evt_buf, params);
224*5113495bSYour Name 
225*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
226*5113495bSYour Name }
227*5113495bSYour Name 
wmi_extract_twt_notify_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct twt_notify_event_param * params)228*5113495bSYour Name QDF_STATUS wmi_extract_twt_notify_event(
229*5113495bSYour Name 		wmi_unified_t wmi_handle,
230*5113495bSYour Name 		uint8_t *evt_buf,
231*5113495bSYour Name 		struct twt_notify_event_param *params)
232*5113495bSYour Name {
233*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_notify_event)
234*5113495bSYour Name 		return wmi_handle->ops->extract_twt_notify_event(wmi_handle,
235*5113495bSYour Name 								 evt_buf,
236*5113495bSYour Name 								 params);
237*5113495bSYour Name 
238*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
239*5113495bSYour Name }
240*5113495bSYour Name 
241*5113495bSYour Name #ifdef WLAN_SUPPORT_BCAST_TWT
wmi_extract_twt_btwt_invite_sta_comp_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct twt_btwt_invite_sta_complete_event_param * params)242*5113495bSYour Name QDF_STATUS wmi_extract_twt_btwt_invite_sta_comp_event(
243*5113495bSYour Name 		wmi_unified_t wmi_handle,
244*5113495bSYour Name 		uint8_t *evt_buf,
245*5113495bSYour Name 		struct twt_btwt_invite_sta_complete_event_param *params)
246*5113495bSYour Name {
247*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_btwt_invite_sta_comp_event)
248*5113495bSYour Name 		return wmi_handle->ops->extract_twt_btwt_invite_sta_comp_event(
249*5113495bSYour Name 				wmi_handle, evt_buf, params);
250*5113495bSYour Name 
251*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
252*5113495bSYour Name }
253*5113495bSYour Name 
wmi_extract_twt_btwt_remove_sta_comp_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct twt_btwt_remove_sta_complete_event_param * params)254*5113495bSYour Name QDF_STATUS wmi_extract_twt_btwt_remove_sta_comp_event(
255*5113495bSYour Name 		wmi_unified_t wmi_handle,
256*5113495bSYour Name 		uint8_t *evt_buf,
257*5113495bSYour Name 		struct twt_btwt_remove_sta_complete_event_param *params)
258*5113495bSYour Name {
259*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_btwt_remove_sta_comp_event)
260*5113495bSYour Name 		return wmi_handle->ops->extract_twt_btwt_remove_sta_comp_event(
261*5113495bSYour Name 				wmi_handle, evt_buf, params);
262*5113495bSYour Name 
263*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
264*5113495bSYour Name }
265*5113495bSYour Name #endif
266*5113495bSYour Name 
wmi_extract_twt_session_stats_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct twt_session_stats_event_param * params)267*5113495bSYour Name QDF_STATUS wmi_extract_twt_session_stats_event(
268*5113495bSYour Name 		wmi_unified_t wmi_handle,
269*5113495bSYour Name 		uint8_t *evt_buf,
270*5113495bSYour Name 		struct twt_session_stats_event_param *params)
271*5113495bSYour Name {
272*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_session_stats_event)
273*5113495bSYour Name 		return wmi_handle->ops->extract_twt_session_stats_event(
274*5113495bSYour Name 				wmi_handle, evt_buf, params);
275*5113495bSYour Name 
276*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
277*5113495bSYour Name }
278*5113495bSYour Name 
wmi_extract_twt_session_stats_data(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct twt_session_stats_event_param * params,struct twt_session_stats_info * session,uint32_t idx)279*5113495bSYour Name QDF_STATUS wmi_extract_twt_session_stats_data(
280*5113495bSYour Name 		wmi_unified_t wmi_handle,
281*5113495bSYour Name 		uint8_t *evt_buf,
282*5113495bSYour Name 		struct twt_session_stats_event_param *params,
283*5113495bSYour Name 		struct twt_session_stats_info *session,
284*5113495bSYour Name 		uint32_t idx)
285*5113495bSYour Name {
286*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_session_stats_data)
287*5113495bSYour Name 		return wmi_handle->ops->extract_twt_session_stats_data(
288*5113495bSYour Name 				wmi_handle, evt_buf, params, session, idx);
289*5113495bSYour Name 
290*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
291*5113495bSYour Name }
292*5113495bSYour Name 
wmi_extract_twt_cap_service_ready_ext2(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct wmi_twt_cap_bitmap_params * params)293*5113495bSYour Name QDF_STATUS wmi_extract_twt_cap_service_ready_ext2(
294*5113495bSYour Name 		wmi_unified_t wmi_handle,
295*5113495bSYour Name 		uint8_t *evt_buf,
296*5113495bSYour Name 		struct wmi_twt_cap_bitmap_params *params)
297*5113495bSYour Name {
298*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_cap_service_ready_ext2)
299*5113495bSYour Name 		return wmi_handle->ops->extract_twt_cap_service_ready_ext2(
300*5113495bSYour Name 				wmi_handle, evt_buf, params);
301*5113495bSYour Name 
302*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
303*5113495bSYour Name }
304*5113495bSYour Name 
wmi_extract_twt_ack_comp_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct twt_ack_complete_event_param * params)305*5113495bSYour Name QDF_STATUS wmi_extract_twt_ack_comp_event(
306*5113495bSYour Name 		wmi_unified_t wmi_handle,
307*5113495bSYour Name 		uint8_t *evt_buf,
308*5113495bSYour Name 		struct twt_ack_complete_event_param *params)
309*5113495bSYour Name {
310*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_ack_comp_event)
311*5113495bSYour Name 		return wmi_handle->ops->extract_twt_ack_comp_event(
312*5113495bSYour Name 				wmi_handle, evt_buf, params);
313*5113495bSYour Name 
314*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
315*5113495bSYour Name }
316*5113495bSYour Name #elif WLAN_SUPPORT_TWT
317*5113495bSYour Name QDF_STATUS
wmi_unified_twt_enable_cmd(wmi_unified_t wmi_handle,struct wmi_twt_enable_param * params)318*5113495bSYour Name wmi_unified_twt_enable_cmd(wmi_unified_t wmi_handle,
319*5113495bSYour Name 			   struct wmi_twt_enable_param *params)
320*5113495bSYour Name {
321*5113495bSYour Name 	if (wmi_handle->ops->send_twt_enable_cmd)
322*5113495bSYour Name 		return wmi_handle->ops->send_twt_enable_cmd(
323*5113495bSYour Name 				wmi_handle, params);
324*5113495bSYour Name 
325*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
326*5113495bSYour Name }
327*5113495bSYour Name 
328*5113495bSYour Name QDF_STATUS
wmi_unified_twt_disable_cmd(wmi_unified_t wmi_handle,struct wmi_twt_disable_param * params)329*5113495bSYour Name wmi_unified_twt_disable_cmd(wmi_unified_t wmi_handle,
330*5113495bSYour Name 			    struct wmi_twt_disable_param *params)
331*5113495bSYour Name {
332*5113495bSYour Name 	if (wmi_handle->ops->send_twt_disable_cmd)
333*5113495bSYour Name 		return wmi_handle->ops->send_twt_disable_cmd(
334*5113495bSYour Name 				wmi_handle, params);
335*5113495bSYour Name 
336*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
337*5113495bSYour Name }
338*5113495bSYour Name 
339*5113495bSYour Name QDF_STATUS
wmi_unified_twt_add_dialog_cmd(wmi_unified_t wmi_handle,struct wmi_twt_add_dialog_param * params)340*5113495bSYour Name wmi_unified_twt_add_dialog_cmd(wmi_unified_t wmi_handle,
341*5113495bSYour Name 			       struct wmi_twt_add_dialog_param *params)
342*5113495bSYour Name {
343*5113495bSYour Name 	if (wmi_handle->ops->send_twt_add_dialog_cmd)
344*5113495bSYour Name 		return wmi_handle->ops->send_twt_add_dialog_cmd(
345*5113495bSYour Name 				wmi_handle, params);
346*5113495bSYour Name 
347*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
348*5113495bSYour Name }
349*5113495bSYour Name 
350*5113495bSYour Name QDF_STATUS
wmi_unified_twt_del_dialog_cmd(wmi_unified_t wmi_handle,struct wmi_twt_del_dialog_param * params)351*5113495bSYour Name wmi_unified_twt_del_dialog_cmd(wmi_unified_t wmi_handle,
352*5113495bSYour Name 			       struct wmi_twt_del_dialog_param *params)
353*5113495bSYour Name {
354*5113495bSYour Name 	if (wmi_handle->ops->send_twt_del_dialog_cmd)
355*5113495bSYour Name 		return wmi_handle->ops->send_twt_del_dialog_cmd(
356*5113495bSYour Name 				wmi_handle, params);
357*5113495bSYour Name 
358*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
359*5113495bSYour Name }
360*5113495bSYour Name 
361*5113495bSYour Name QDF_STATUS
wmi_unified_twt_pause_dialog_cmd(wmi_unified_t wmi_handle,struct wmi_twt_pause_dialog_cmd_param * params)362*5113495bSYour Name wmi_unified_twt_pause_dialog_cmd(wmi_unified_t wmi_handle,
363*5113495bSYour Name 				 struct wmi_twt_pause_dialog_cmd_param *params)
364*5113495bSYour Name {
365*5113495bSYour Name 	if (wmi_handle->ops->send_twt_pause_dialog_cmd)
366*5113495bSYour Name 		return wmi_handle->ops->send_twt_pause_dialog_cmd(
367*5113495bSYour Name 				wmi_handle, params);
368*5113495bSYour Name 
369*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
370*5113495bSYour Name }
371*5113495bSYour Name 
372*5113495bSYour Name QDF_STATUS
wmi_unified_twt_nudge_dialog_cmd(wmi_unified_t wmi_handle,struct wmi_twt_nudge_dialog_cmd_param * params)373*5113495bSYour Name wmi_unified_twt_nudge_dialog_cmd(wmi_unified_t wmi_handle,
374*5113495bSYour Name 				 struct wmi_twt_nudge_dialog_cmd_param *params)
375*5113495bSYour Name {
376*5113495bSYour Name 	if (wmi_handle->ops->send_twt_nudge_dialog_cmd)
377*5113495bSYour Name 		return wmi_handle->ops->send_twt_nudge_dialog_cmd(
378*5113495bSYour Name 				wmi_handle, params);
379*5113495bSYour Name 
380*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
381*5113495bSYour Name }
382*5113495bSYour Name 
wmi_unified_twt_resume_dialog_cmd(wmi_unified_t wmi_handle,struct wmi_twt_resume_dialog_cmd_param * params)383*5113495bSYour Name QDF_STATUS wmi_unified_twt_resume_dialog_cmd(
384*5113495bSYour Name 			wmi_unified_t wmi_handle,
385*5113495bSYour Name 			struct wmi_twt_resume_dialog_cmd_param *params)
386*5113495bSYour Name {
387*5113495bSYour Name 	if (wmi_handle->ops->send_twt_resume_dialog_cmd)
388*5113495bSYour Name 		return wmi_handle->ops->send_twt_resume_dialog_cmd(
389*5113495bSYour Name 				wmi_handle, params);
390*5113495bSYour Name 
391*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
392*5113495bSYour Name }
393*5113495bSYour Name 
394*5113495bSYour Name #ifdef WLAN_SUPPORT_BCAST_TWT
wmi_unified_twt_btwt_invite_sta_cmd(wmi_unified_t wmi_handle,struct wmi_twt_btwt_invite_sta_cmd_param * params)395*5113495bSYour Name QDF_STATUS wmi_unified_twt_btwt_invite_sta_cmd(
396*5113495bSYour Name 			wmi_unified_t wmi_handle,
397*5113495bSYour Name 			struct wmi_twt_btwt_invite_sta_cmd_param *params)
398*5113495bSYour Name {
399*5113495bSYour Name 	if (wmi_handle->ops->send_twt_btwt_invite_sta_cmd)
400*5113495bSYour Name 		return wmi_handle->ops->send_twt_btwt_invite_sta_cmd(
401*5113495bSYour Name 				wmi_handle, params);
402*5113495bSYour Name 
403*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
404*5113495bSYour Name }
405*5113495bSYour Name 
wmi_unified_twt_btwt_remove_sta_cmd(wmi_unified_t wmi_handle,struct wmi_twt_btwt_remove_sta_cmd_param * params)406*5113495bSYour Name QDF_STATUS wmi_unified_twt_btwt_remove_sta_cmd(
407*5113495bSYour Name 			wmi_unified_t wmi_handle,
408*5113495bSYour Name 			struct wmi_twt_btwt_remove_sta_cmd_param *params)
409*5113495bSYour Name {
410*5113495bSYour Name 	if (wmi_handle->ops->send_twt_btwt_remove_sta_cmd)
411*5113495bSYour Name 		return wmi_handle->ops->send_twt_btwt_remove_sta_cmd(
412*5113495bSYour Name 				wmi_handle, params);
413*5113495bSYour Name 
414*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
415*5113495bSYour Name }
416*5113495bSYour Name #endif
417*5113495bSYour Name 
wmi_extract_twt_enable_comp_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct wmi_twt_enable_complete_event_param * params)418*5113495bSYour Name QDF_STATUS wmi_extract_twt_enable_comp_event(
419*5113495bSYour Name 			wmi_unified_t wmi_handle,
420*5113495bSYour Name 			uint8_t *evt_buf,
421*5113495bSYour Name 			struct wmi_twt_enable_complete_event_param *params)
422*5113495bSYour Name {
423*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_enable_comp_event)
424*5113495bSYour Name 		return wmi_handle->ops->extract_twt_enable_comp_event(
425*5113495bSYour Name 				wmi_handle, evt_buf, params);
426*5113495bSYour Name 
427*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
428*5113495bSYour Name }
429*5113495bSYour Name 
wmi_extract_twt_disable_comp_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct wmi_twt_disable_complete_event * params)430*5113495bSYour Name QDF_STATUS wmi_extract_twt_disable_comp_event(
431*5113495bSYour Name 			wmi_unified_t wmi_handle,
432*5113495bSYour Name 			uint8_t *evt_buf,
433*5113495bSYour Name 			struct wmi_twt_disable_complete_event *params)
434*5113495bSYour Name {
435*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_disable_comp_event)
436*5113495bSYour Name 		return wmi_handle->ops->extract_twt_disable_comp_event(
437*5113495bSYour Name 				wmi_handle, evt_buf, params);
438*5113495bSYour Name 
439*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
440*5113495bSYour Name }
441*5113495bSYour Name 
wmi_extract_twt_add_dialog_comp_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct wmi_twt_add_dialog_complete_event_param * params)442*5113495bSYour Name QDF_STATUS wmi_extract_twt_add_dialog_comp_event(
443*5113495bSYour Name 			wmi_unified_t wmi_handle,
444*5113495bSYour Name 			uint8_t *evt_buf,
445*5113495bSYour Name 			struct wmi_twt_add_dialog_complete_event_param *params)
446*5113495bSYour Name {
447*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_add_dialog_comp_event)
448*5113495bSYour Name 		return wmi_handle->ops->extract_twt_add_dialog_comp_event(
449*5113495bSYour Name 				wmi_handle, evt_buf, params);
450*5113495bSYour Name 
451*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
452*5113495bSYour Name }
453*5113495bSYour Name 
wmi_extract_twt_add_dialog_comp_additional_params(wmi_unified_t wmi_handle,uint8_t * evt_buf,uint32_t evt_buf_len,uint32_t idx,struct wmi_twt_add_dialog_additional_params * additional_params)454*5113495bSYour Name QDF_STATUS wmi_extract_twt_add_dialog_comp_additional_params(
455*5113495bSYour Name 		wmi_unified_t wmi_handle, uint8_t *evt_buf,
456*5113495bSYour Name 		uint32_t evt_buf_len, uint32_t idx,
457*5113495bSYour Name 		struct wmi_twt_add_dialog_additional_params *additional_params)
458*5113495bSYour Name {
459*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_add_dialog_comp_additional_params)
460*5113495bSYour Name 		return wmi_handle->ops->
461*5113495bSYour Name 			extract_twt_add_dialog_comp_additional_params(
462*5113495bSYour Name 			wmi_handle, evt_buf, evt_buf_len, idx,
463*5113495bSYour Name 			additional_params);
464*5113495bSYour Name 
465*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
466*5113495bSYour Name }
467*5113495bSYour Name 
wmi_extract_twt_del_dialog_comp_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct wmi_twt_del_dialog_complete_event_param * params)468*5113495bSYour Name QDF_STATUS wmi_extract_twt_del_dialog_comp_event(
469*5113495bSYour Name 		wmi_unified_t wmi_handle,
470*5113495bSYour Name 		uint8_t *evt_buf,
471*5113495bSYour Name 		struct wmi_twt_del_dialog_complete_event_param *params)
472*5113495bSYour Name {
473*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_del_dialog_comp_event)
474*5113495bSYour Name 		return wmi_handle->ops->extract_twt_del_dialog_comp_event(
475*5113495bSYour Name 				wmi_handle, evt_buf, params);
476*5113495bSYour Name 
477*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
478*5113495bSYour Name }
479*5113495bSYour Name 
wmi_extract_twt_pause_dialog_comp_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct wmi_twt_pause_dialog_complete_event_param * params)480*5113495bSYour Name QDF_STATUS wmi_extract_twt_pause_dialog_comp_event(
481*5113495bSYour Name 		wmi_unified_t wmi_handle,
482*5113495bSYour Name 		uint8_t *evt_buf,
483*5113495bSYour Name 		struct wmi_twt_pause_dialog_complete_event_param *params)
484*5113495bSYour Name {
485*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_pause_dialog_comp_event)
486*5113495bSYour Name 		return wmi_handle->ops->extract_twt_pause_dialog_comp_event(
487*5113495bSYour Name 				wmi_handle, evt_buf, params);
488*5113495bSYour Name 
489*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
490*5113495bSYour Name }
491*5113495bSYour Name 
wmi_extract_twt_nudge_dialog_comp_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct wmi_twt_nudge_dialog_complete_event_param * params)492*5113495bSYour Name QDF_STATUS wmi_extract_twt_nudge_dialog_comp_event(
493*5113495bSYour Name 		wmi_unified_t wmi_handle,
494*5113495bSYour Name 		uint8_t *evt_buf,
495*5113495bSYour Name 		struct wmi_twt_nudge_dialog_complete_event_param *params)
496*5113495bSYour Name {
497*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_nudge_dialog_comp_event)
498*5113495bSYour Name 		return wmi_handle->ops->extract_twt_nudge_dialog_comp_event(
499*5113495bSYour Name 				wmi_handle, evt_buf, params);
500*5113495bSYour Name 
501*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
502*5113495bSYour Name }
503*5113495bSYour Name 
wmi_extract_twt_resume_dialog_comp_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct wmi_twt_resume_dialog_complete_event_param * params)504*5113495bSYour Name QDF_STATUS wmi_extract_twt_resume_dialog_comp_event(
505*5113495bSYour Name 		wmi_unified_t wmi_handle,
506*5113495bSYour Name 		uint8_t *evt_buf,
507*5113495bSYour Name 		struct wmi_twt_resume_dialog_complete_event_param *params)
508*5113495bSYour Name {
509*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_resume_dialog_comp_event)
510*5113495bSYour Name 		return wmi_handle->ops->extract_twt_resume_dialog_comp_event(
511*5113495bSYour Name 				wmi_handle, evt_buf, params);
512*5113495bSYour Name 
513*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
514*5113495bSYour Name }
515*5113495bSYour Name 
wmi_extract_twt_notify_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct wmi_twt_notify_event_param * params)516*5113495bSYour Name QDF_STATUS wmi_extract_twt_notify_event(
517*5113495bSYour Name 		wmi_unified_t wmi_handle,
518*5113495bSYour Name 		uint8_t *evt_buf,
519*5113495bSYour Name 		struct wmi_twt_notify_event_param *params)
520*5113495bSYour Name {
521*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_notify_event)
522*5113495bSYour Name 		return wmi_handle->ops->extract_twt_notify_event(wmi_handle,
523*5113495bSYour Name 								 evt_buf,
524*5113495bSYour Name 								 params);
525*5113495bSYour Name 
526*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
527*5113495bSYour Name }
528*5113495bSYour Name 
529*5113495bSYour Name #ifdef WLAN_SUPPORT_BCAST_TWT
wmi_extract_twt_btwt_invite_sta_comp_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct wmi_twt_btwt_invite_sta_complete_event_param * params)530*5113495bSYour Name QDF_STATUS wmi_extract_twt_btwt_invite_sta_comp_event(
531*5113495bSYour Name 		wmi_unified_t wmi_handle,
532*5113495bSYour Name 		uint8_t *evt_buf,
533*5113495bSYour Name 		struct wmi_twt_btwt_invite_sta_complete_event_param *params)
534*5113495bSYour Name {
535*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_btwt_invite_sta_comp_event)
536*5113495bSYour Name 		return wmi_handle->ops->extract_twt_btwt_invite_sta_comp_event(
537*5113495bSYour Name 				wmi_handle, evt_buf, params);
538*5113495bSYour Name 
539*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
540*5113495bSYour Name }
541*5113495bSYour Name 
wmi_extract_twt_btwt_remove_sta_comp_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct wmi_twt_btwt_remove_sta_complete_event_param * params)542*5113495bSYour Name QDF_STATUS wmi_extract_twt_btwt_remove_sta_comp_event(
543*5113495bSYour Name 		wmi_unified_t wmi_handle,
544*5113495bSYour Name 		uint8_t *evt_buf,
545*5113495bSYour Name 		struct wmi_twt_btwt_remove_sta_complete_event_param *params)
546*5113495bSYour Name {
547*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_btwt_remove_sta_comp_event)
548*5113495bSYour Name 		return wmi_handle->ops->extract_twt_btwt_remove_sta_comp_event(
549*5113495bSYour Name 				wmi_handle, evt_buf, params);
550*5113495bSYour Name 
551*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
552*5113495bSYour Name }
553*5113495bSYour Name #endif
554*5113495bSYour Name 
wmi_extract_twt_session_stats_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct wmi_twt_session_stats_event_param * params)555*5113495bSYour Name QDF_STATUS wmi_extract_twt_session_stats_event(
556*5113495bSYour Name 		wmi_unified_t wmi_handle,
557*5113495bSYour Name 		uint8_t *evt_buf,
558*5113495bSYour Name 		struct wmi_twt_session_stats_event_param *params)
559*5113495bSYour Name {
560*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_session_stats_event)
561*5113495bSYour Name 		return wmi_handle->ops->extract_twt_session_stats_event(
562*5113495bSYour Name 				wmi_handle, evt_buf, params);
563*5113495bSYour Name 
564*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
565*5113495bSYour Name }
566*5113495bSYour Name 
wmi_extract_twt_session_stats_data(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct wmi_twt_session_stats_event_param * params,struct wmi_host_twt_session_stats_info * session,uint32_t idx)567*5113495bSYour Name QDF_STATUS wmi_extract_twt_session_stats_data(
568*5113495bSYour Name 		wmi_unified_t wmi_handle,
569*5113495bSYour Name 		uint8_t *evt_buf,
570*5113495bSYour Name 		struct wmi_twt_session_stats_event_param *params,
571*5113495bSYour Name 		struct wmi_host_twt_session_stats_info *session,
572*5113495bSYour Name 		uint32_t idx)
573*5113495bSYour Name {
574*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_session_stats_data)
575*5113495bSYour Name 		return wmi_handle->ops->extract_twt_session_stats_data(
576*5113495bSYour Name 				wmi_handle, evt_buf, params, session, idx);
577*5113495bSYour Name 
578*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
579*5113495bSYour Name }
580*5113495bSYour Name 
wmi_extract_twt_cap_service_ready_ext2(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct wmi_twt_cap_bitmap_params * params)581*5113495bSYour Name QDF_STATUS wmi_extract_twt_cap_service_ready_ext2(
582*5113495bSYour Name 		wmi_unified_t wmi_handle,
583*5113495bSYour Name 		uint8_t *evt_buf,
584*5113495bSYour Name 		struct wmi_twt_cap_bitmap_params *params)
585*5113495bSYour Name {
586*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_cap_service_ready_ext2)
587*5113495bSYour Name 		return wmi_handle->ops->extract_twt_cap_service_ready_ext2(
588*5113495bSYour Name 				wmi_handle, evt_buf, params);
589*5113495bSYour Name 
590*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
591*5113495bSYour Name }
592*5113495bSYour Name 
wmi_extract_twt_ack_comp_event(wmi_unified_t wmi_handle,uint8_t * evt_buf,struct wmi_twt_ack_complete_event_param * params)593*5113495bSYour Name QDF_STATUS wmi_extract_twt_ack_comp_event(
594*5113495bSYour Name 		wmi_unified_t wmi_handle,
595*5113495bSYour Name 		uint8_t *evt_buf,
596*5113495bSYour Name 		struct wmi_twt_ack_complete_event_param *params)
597*5113495bSYour Name {
598*5113495bSYour Name 	if (wmi_handle->ops->extract_twt_ack_comp_event)
599*5113495bSYour Name 		return wmi_handle->ops->extract_twt_ack_comp_event(
600*5113495bSYour Name 				wmi_handle, evt_buf, params);
601*5113495bSYour Name 
602*5113495bSYour Name 	return QDF_STATUS_E_FAILURE;
603*5113495bSYour Name }
604*5113495bSYour Name #endif
605