xref: /wlan-driver/qca-wifi-host-cmn/target_if/twt/inc/target_if_ext_twt.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
3*5113495bSYour Name  *
4*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for any
5*5113495bSYour Name  * purpose with or without fee is hereby granted, provided that the above
6*5113495bSYour Name  * copyright notice and this permission notice appear in all copies.
7*5113495bSYour Name  *
8*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9*5113495bSYour Name  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10*5113495bSYour Name  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11*5113495bSYour Name  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12*5113495bSYour Name  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13*5113495bSYour Name  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14*5113495bSYour Name  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*5113495bSYour Name  */
16*5113495bSYour Name 
17*5113495bSYour Name /**
18*5113495bSYour Name  *  DOC: target_if_ext_twt.h
19*5113495bSYour Name  *  This file contains twt component's target related APIs
20*5113495bSYour Name  */
21*5113495bSYour Name 
22*5113495bSYour Name #ifndef _TARGET_IF_EXT_TWT_H_
23*5113495bSYour Name #define _TARGET_IF_EXT_TWT_H_
24*5113495bSYour Name 
25*5113495bSYour Name #include <wlan_lmac_if_def.h>
26*5113495bSYour Name 
27*5113495bSYour Name #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
28*5113495bSYour Name 
29*5113495bSYour Name /**
30*5113495bSYour Name  * target_if_twt_register_ext_events() - Register twt ext wmi events
31*5113495bSYour Name  * @psoc: psoc handle
32*5113495bSYour Name  *
33*5113495bSYour Name  * Register TWT ext (outside of qcacmn) WMI events
34*5113495bSYour Name  *
35*5113495bSYour Name  * return: QDF_STATUS
36*5113495bSYour Name  */
37*5113495bSYour Name QDF_STATUS
38*5113495bSYour Name target_if_twt_register_ext_events(struct wlan_objmgr_psoc *psoc);
39*5113495bSYour Name 
40*5113495bSYour Name /**
41*5113495bSYour Name  * target_if_twt_deregister_ext_events() - De-register twt ext wmi events
42*5113495bSYour Name  * @psoc: psoc handle
43*5113495bSYour Name  *
44*5113495bSYour Name  * Register TWT ext (outside of qcacmn) WMI events
45*5113495bSYour Name  *
46*5113495bSYour Name  * return: QDF_STATUS
47*5113495bSYour Name  */
48*5113495bSYour Name QDF_STATUS
49*5113495bSYour Name target_if_twt_deregister_ext_events(struct wlan_objmgr_psoc *psoc);
50*5113495bSYour Name 
51*5113495bSYour Name /**
52*5113495bSYour Name  * target_if_twt_register_ext_tx_ops() - Register twt tx ops
53*5113495bSYour Name  * @twt_tx_ops: twt_tx_ops structure
54*5113495bSYour Name  *
55*5113495bSYour Name  * return: QDF_STATUS
56*5113495bSYour Name  */
57*5113495bSYour Name QDF_STATUS
58*5113495bSYour Name target_if_twt_register_ext_tx_ops(struct wlan_lmac_if_twt_tx_ops *twt_tx_ops);
59*5113495bSYour Name 
60*5113495bSYour Name /**
61*5113495bSYour Name  * target_if_twt_setup_req() - target if twt setup request
62*5113495bSYour Name  * @psoc: psoc handle
63*5113495bSYour Name  * @req: TWT add dialog request structure
64*5113495bSYour Name  *
65*5113495bSYour Name  * return: QDF_STATUS
66*5113495bSYour Name  */
67*5113495bSYour Name QDF_STATUS
68*5113495bSYour Name target_if_twt_setup_req(struct wlan_objmgr_psoc *psoc,
69*5113495bSYour Name 			struct twt_add_dialog_param *req);
70*5113495bSYour Name 
71*5113495bSYour Name /**
72*5113495bSYour Name  * target_if_twt_teardown_req() - target if twt teardown request
73*5113495bSYour Name  * @psoc: psoc handle
74*5113495bSYour Name  * @req: TWT del dialog request structure
75*5113495bSYour Name  *
76*5113495bSYour Name  * return: QDF_STATUS
77*5113495bSYour Name  */
78*5113495bSYour Name QDF_STATUS
79*5113495bSYour Name target_if_twt_teardown_req(struct wlan_objmgr_psoc *psoc,
80*5113495bSYour Name 			   struct twt_del_dialog_param *req);
81*5113495bSYour Name 
82*5113495bSYour Name /**
83*5113495bSYour Name  * target_if_twt_pause_req() - target if twt pause request
84*5113495bSYour Name  * @psoc: psoc handle
85*5113495bSYour Name  * @req: TWT pause dialog request structure
86*5113495bSYour Name  *
87*5113495bSYour Name  * return: QDF_STATUS
88*5113495bSYour Name  */
89*5113495bSYour Name QDF_STATUS
90*5113495bSYour Name target_if_twt_pause_req(struct wlan_objmgr_psoc *psoc,
91*5113495bSYour Name 			struct twt_pause_dialog_cmd_param *req);
92*5113495bSYour Name 
93*5113495bSYour Name /**
94*5113495bSYour Name  * target_if_twt_resume_req() - target if twt resume request
95*5113495bSYour Name  * @psoc: psoc handle
96*5113495bSYour Name  * @req: TWT resume dialog request structure
97*5113495bSYour Name  *
98*5113495bSYour Name  * return: QDF_STATUS
99*5113495bSYour Name  */
100*5113495bSYour Name QDF_STATUS
101*5113495bSYour Name target_if_twt_resume_req(struct wlan_objmgr_psoc *psoc,
102*5113495bSYour Name 			 struct twt_resume_dialog_cmd_param *req);
103*5113495bSYour Name 
104*5113495bSYour Name /**
105*5113495bSYour Name  * target_if_twt_nudge_req() - target if twt nudge request
106*5113495bSYour Name  * @psoc: psoc handle
107*5113495bSYour Name  * @req: TWT nudge dialog request structure
108*5113495bSYour Name  *
109*5113495bSYour Name  * return: QDF_STATUS
110*5113495bSYour Name  */
111*5113495bSYour Name QDF_STATUS
112*5113495bSYour Name target_if_twt_nudge_req(struct wlan_objmgr_psoc *psoc,
113*5113495bSYour Name 			struct twt_nudge_dialog_cmd_param *req);
114*5113495bSYour Name 
115*5113495bSYour Name /**
116*5113495bSYour Name  * target_if_twt_ac_param_send() - pdev TWT param send
117*5113495bSYour Name  * @psoc: Pointer to psoc object
118*5113495bSYour Name  * @twt_ac: TWT access category
119*5113495bSYour Name  * @mac_id: radio context
120*5113495bSYour Name  *
121*5113495bSYour Name  * Return: QDF Status
122*5113495bSYour Name  */
123*5113495bSYour Name QDF_STATUS
124*5113495bSYour Name target_if_twt_ac_param_send(struct wlan_objmgr_psoc *psoc,
125*5113495bSYour Name 			    enum twt_traffic_ac twt_ac, uint8_t mac_id);
126*5113495bSYour Name #else
127*5113495bSYour Name static inline QDF_STATUS
target_if_twt_register_ext_tx_ops(struct wlan_lmac_if_twt_tx_ops * twt_tx_ops)128*5113495bSYour Name target_if_twt_register_ext_tx_ops(struct wlan_lmac_if_twt_tx_ops *twt_tx_ops)
129*5113495bSYour Name {
130*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
131*5113495bSYour Name }
132*5113495bSYour Name 
133*5113495bSYour Name static inline QDF_STATUS
target_if_twt_register_ext_events(struct wlan_objmgr_psoc * psoc)134*5113495bSYour Name target_if_twt_register_ext_events(struct wlan_objmgr_psoc *psoc)
135*5113495bSYour Name {
136*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
137*5113495bSYour Name }
138*5113495bSYour Name 
139*5113495bSYour Name static inline QDF_STATUS
target_if_twt_deregister_ext_events(struct wlan_objmgr_psoc * psoc)140*5113495bSYour Name target_if_twt_deregister_ext_events(struct wlan_objmgr_psoc *psoc)
141*5113495bSYour Name {
142*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
143*5113495bSYour Name }
144*5113495bSYour Name 
145*5113495bSYour Name static inline QDF_STATUS
target_if_twt_setup_req(struct wlan_objmgr_psoc * psoc,struct twt_add_dialog_param * req)146*5113495bSYour Name target_if_twt_setup_req(struct wlan_objmgr_psoc *psoc,
147*5113495bSYour Name 			struct twt_add_dialog_param *req)
148*5113495bSYour Name {
149*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
150*5113495bSYour Name }
151*5113495bSYour Name 
152*5113495bSYour Name static inline QDF_STATUS
target_if_twt_teardown_req(struct wlan_objmgr_psoc * psoc,struct twt_del_dialog_param * req)153*5113495bSYour Name target_if_twt_teardown_req(struct wlan_objmgr_psoc *psoc,
154*5113495bSYour Name 			   struct twt_del_dialog_param *req)
155*5113495bSYour Name {
156*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
157*5113495bSYour Name }
158*5113495bSYour Name 
159*5113495bSYour Name static inline QDF_STATUS
target_if_twt_pause_req(struct wlan_objmgr_psoc * psoc,struct twt_pause_dialog_cmd_param * req)160*5113495bSYour Name target_if_twt_pause_req(struct wlan_objmgr_psoc *psoc,
161*5113495bSYour Name 			struct twt_pause_dialog_cmd_param *req)
162*5113495bSYour Name {
163*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
164*5113495bSYour Name }
165*5113495bSYour Name 
166*5113495bSYour Name static inline QDF_STATUS
target_if_twt_resume_req(struct wlan_objmgr_psoc * psoc,struct twt_resume_dialog_cmd_param * req)167*5113495bSYour Name target_if_twt_resume_req(struct wlan_objmgr_psoc *psoc,
168*5113495bSYour Name 			 struct twt_resume_dialog_cmd_param *req)
169*5113495bSYour Name {
170*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
171*5113495bSYour Name }
172*5113495bSYour Name 
173*5113495bSYour Name static inline QDF_STATUS
target_if_twt_nudge_req(struct wlan_objmgr_psoc * psoc,struct twt_nudge_dialog_cmd_param * req)174*5113495bSYour Name target_if_twt_nudge_req(struct wlan_objmgr_psoc *psoc,
175*5113495bSYour Name 			struct twt_nudge_dialog_cmd_param *req)
176*5113495bSYour Name {
177*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
178*5113495bSYour Name }
179*5113495bSYour Name 
180*5113495bSYour Name QDF_STATUS
target_if_twt_ac_param_send(struct wlan_objmgr_psoc * psoc,enum twt_traffic_ac twt_ac,uint8_t mac_id)181*5113495bSYour Name target_if_twt_ac_param_send(struct wlan_objmgr_psoc *psoc,
182*5113495bSYour Name 			    enum twt_traffic_ac twt_ac, uint8_t mac_id)
183*5113495bSYour Name {
184*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
185*5113495bSYour Name }
186*5113495bSYour Name #endif
187*5113495bSYour Name #endif /*_TARGET_IF_EXT_TWT_H_ */
188*5113495bSYour Name 
189