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