1 /*
2 * Copyright (c) 2019, 2021 The Linux Foundation. All rights reserved.
3 * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
4 *
5 * Permission to use, copy, modify, and/or distribute this software for
6 * any purpose with or without fee is hereby granted, provided that the
7 * above copyright notice and this permission notice appear in all
8 * copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17 * PERFORMANCE OF THIS SOFTWARE.
18 */
19
20 /**
21 * DOC: vdev_mgr_iface_api.h
22 *
23 * API declarations required for following
24 * - get/set common mlme data structure fields
25 * - send WMI command using Tx Ops
26 */
27
28 #ifndef __WLAN_VDEV_MGR_TX_OPS_API_H__
29 #define __WLAN_VDEV_MGR_TX_OPS_API_H__
30
31 #include <wlan_objmgr_vdev_obj.h>
32 #include <wlan_vdev_mgr_tgt_if_tx_defs.h>
33 #include <include/wlan_vdev_mlme.h>
34
35 /**
36 * tgt_vdev_mgr_create_send() - API to send create command
37 * @mlme_obj: pointer to vdev_mlme_obj
38 * @param: pointer to vdev_create_params
39 *
40 * Return: QDF_STATUS - Success or Failure
41 */
42 QDF_STATUS tgt_vdev_mgr_create_send(
43 struct vdev_mlme_obj *mlme_obj,
44 struct vdev_create_params *param);
45
46 /**
47 * tgt_vdev_mgr_create_complete() - API to send wmi cfg corresponding
48 * to create command
49 * @mlme_obj: pointer to vdev_mlme_obj
50 *
51 * Return: QDF_STATUS - Success or Failure
52 */
53 QDF_STATUS tgt_vdev_mgr_create_complete(struct vdev_mlme_obj *mlme_obj);
54
55 /**
56 * tgt_vdev_mgr_start_send() - API to send start command
57 * @mlme_obj: pointer to vdev_mlme_obj
58 * @param: pointer to vdev_start_params
59 *
60 * Return: QDF_STATUS - Success or Failure
61 */
62 QDF_STATUS tgt_vdev_mgr_start_send(
63 struct vdev_mlme_obj *mlme_obj,
64 struct vdev_start_params *param);
65
66 /**
67 * tgt_vdev_mgr_delete_send() - API to send delete
68 * @mlme_obj: pointer to vdev_mlme_obj
69 * @param: pointer to vdev_delete_params
70 *
71 * Return: QDF_STATUS - Success or Failure
72 */
73 QDF_STATUS tgt_vdev_mgr_delete_send(
74 struct vdev_mlme_obj *mlme_obj,
75 struct vdev_delete_params *param);
76
77 /**
78 * tgt_vdev_mgr_peer_flush_tids_send() - API to send peer flush tids in FW
79 * @mlme_obj: pointer to vdev_mlme_obj
80 * @param: pointer to peer_flush_params
81 *
82 * Return: QDF_STATUS - Success or Failure
83 */
84 QDF_STATUS tgt_vdev_mgr_peer_flush_tids_send(
85 struct vdev_mlme_obj *mlme_obj,
86 struct peer_flush_params *param);
87
88 /**
89 * tgt_vdev_mgr_stop_send() - API to send stop command
90 * @mlme_obj: pointer to vdev_mlme_obj
91 * @param: pointer to vdev_stop_params
92 *
93 * Return: QDF_STATUS - Success or Failure
94 */
95 QDF_STATUS tgt_vdev_mgr_stop_send(
96 struct vdev_mlme_obj *mlme_obj,
97 struct vdev_stop_params *param);
98
99 /**
100 * tgt_vdev_mgr_beacon_stop() - API to handle beacon buffer
101 * @mlme_obj: pointer to vdev_mlme_obj
102 *
103 * Return: QDF_STATUS - Success or Failure
104 */
105 QDF_STATUS tgt_vdev_mgr_beacon_stop(struct vdev_mlme_obj *mlme_obj);
106
107 /**
108 * tgt_vdev_mgr_beacon_free() - API to free beacon buffer
109 * @mlme_obj: pointer to vdev_mlme_obj
110 *
111 * Return: QDF_STATUS - Success or Failure
112 */
113 QDF_STATUS tgt_vdev_mgr_beacon_free(struct vdev_mlme_obj *mlme_obj);
114
115 /**
116 * tgt_vdev_mgr_up_send() - API to send up
117 * @mlme_obj: pointer to vdev_mlme_obj
118 * @param: pointer to vdev_up_params
119 *
120 * Return: QDF_STATUS - Success or Failure
121 */
122 QDF_STATUS tgt_vdev_mgr_up_send(
123 struct vdev_mlme_obj *mlme_obj,
124 struct vdev_up_params *param);
125
126 /**
127 * tgt_vdev_mgr_down_send() - API to send down
128 * @mlme_obj: pointer to vdev_mlme_obj
129 * @param: pointer to vdev_down_params
130 *
131 * Return: QDF_STATUS - Success or Failure
132 */
133 QDF_STATUS tgt_vdev_mgr_down_send(
134 struct vdev_mlme_obj *mlme_obj,
135 struct vdev_down_params *param);
136
137 /**
138 * tgt_vdev_mgr_set_neighbour_rx_cmd_send() - API to send neighbour rx
139 * @mlme_obj: pointer to vdev_mlme_obj
140 * @param: pointer to set_neighbour_rx_params
141 *
142 * Return: QDF_STATUS - Success or Failure
143 */
144 QDF_STATUS tgt_vdev_mgr_set_neighbour_rx_cmd_send(
145 struct vdev_mlme_obj *mlme_obj,
146 struct set_neighbour_rx_params *param);
147
148 /**
149 * tgt_vdev_mgr_nac_rssi_send() - API to send NAC RSSI
150 * @mlme_obj: pointer to vdev_mlme_obj
151 * @param: pointer to vdev_scan_nac_rssi_params
152 *
153 * Return: QDF_STATUS - Success or Failure
154 */
155 QDF_STATUS tgt_vdev_mgr_nac_rssi_send(
156 struct vdev_mlme_obj *mlme_obj,
157 struct vdev_scan_nac_rssi_params *param);
158
159 /**
160 * tgt_vdev_mgr_sifs_trigger_send() - API to send SIFS trigger
161 * @mlme_obj: pointer to vdev_mlme_obj
162 * @param: pointer to sifs_trigger_param
163 *
164 * Return: QDF_STATUS - Success or Failure
165 */
166 QDF_STATUS tgt_vdev_mgr_sifs_trigger_send(
167 struct vdev_mlme_obj *mlme_obj,
168 struct sifs_trigger_param *param);
169
170 /**
171 * tgt_vdev_mgr_set_custom_aggr_size_send() - API to send custom aggr size
172 * @mlme_obj: pointer to vdev_mlme_obj
173 * @param: pointer to set_custom_aggr_size_params
174 *
175 * Return: QDF_STATUS - Success or Failure
176 */
177 QDF_STATUS tgt_vdev_mgr_set_custom_aggr_size_send(
178 struct vdev_mlme_obj *mlme_obj,
179 struct set_custom_aggr_size_params *param);
180
181 /**
182 * tgt_vdev_mgr_config_ratemask_cmd_send() - API to configure ratemask
183 * @mlme_obj: pointer to vdev_mlme_obj
184 * @param: pointer to config_ratemask_params
185 *
186 * Return: QDF_STATUS - Success or Failure
187 */
188 QDF_STATUS tgt_vdev_mgr_config_ratemask_cmd_send(
189 struct vdev_mlme_obj *mlme_obj,
190 struct config_ratemask_params *param);
191
192 /**
193 * tgt_vdev_mgr_sta_ps_param_send() - API to send sta power save configuration
194 * @mlme_obj: pointer to vdev_mlme_obj
195 * @param: pointer to sta_ps_params
196 *
197 * Return: QDF_STATUS - Success or Failure
198 */
199 QDF_STATUS tgt_vdev_mgr_sta_ps_param_send(
200 struct vdev_mlme_obj *mlme_obj,
201 struct sta_ps_params *param);
202
203 /**
204 * tgt_vdev_mgr_beacon_cmd_send() - API to send beacon
205 * @mlme_obj: pointer to vdev_mlme_obj
206 * @param: pointer to beacon_params
207 *
208 * Return: QDF_STATUS - Success or Failure
209 */
210 QDF_STATUS tgt_vdev_mgr_beacon_cmd_send(
211 struct vdev_mlme_obj *mlme_obj,
212 struct beacon_params *param);
213
214 /**
215 * tgt_vdev_mgr_beacon_tmpl_send() - API to send beacon template
216 * @mlme_obj: pointer to vdev_mlme_obj
217 * @param: pointer to beacon_tmpl_params
218 *
219 * Return: QDF_STATUS - Success or Failure
220 */
221 QDF_STATUS tgt_vdev_mgr_beacon_tmpl_send(
222 struct vdev_mlme_obj *mlme_obj,
223 struct beacon_tmpl_params *param);
224
225 #if defined(WLAN_SUPPORT_FILS) || defined(CONFIG_BAND_6GHZ)
226 /**
227 * tgt_vdev_mgr_fils_enable_send()- API to send fils enable command
228 * @mlme_obj: pointer to vdev_mlme_obj
229 * @param: pointer to config_fils_params struct
230 *
231 * Return: QDF_STATUS - Success or Failure
232 */
233 QDF_STATUS tgt_vdev_mgr_fils_enable_send(
234 struct vdev_mlme_obj *mlme_obj,
235 struct config_fils_params *param);
236 #else
237 /**
238 * tgt_vdev_mgr_fils_enable_send()- API to send fils enable command
239 * @mlme_obj: pointer to vdev_mlme_obj
240 * @param: pointer to config_fils_params struct
241 *
242 * Return: QDF_STATUS - Success or Failure
243 */
tgt_vdev_mgr_fils_enable_send(struct vdev_mlme_obj * mlme_obj,struct config_fils_params * param)244 static inline QDF_STATUS tgt_vdev_mgr_fils_enable_send(
245 struct vdev_mlme_obj *mlme_obj,
246 struct config_fils_params *param)
247 {
248 return QDF_STATUS_SUCCESS;
249 }
250 #endif
251
252 /**
253 * tgt_vdev_mgr_multiple_vdev_restart_send() - API to send multiple vdev
254 * restart
255 * @pdev: pointer to pdev
256 * @param: pointer to multiple_vdev_restart_params
257 *
258 * Return: QDF_STATUS - Success or Failure
259 */
260 QDF_STATUS tgt_vdev_mgr_multiple_vdev_restart_send(
261 struct wlan_objmgr_pdev *pdev,
262 struct multiple_vdev_restart_params *param);
263
264 /**
265 * tgt_vdev_mgr_multiple_vdev_set_param() - API to send multiple vdev
266 * param
267 * @pdev: pointer to pdev
268 * @param: pointer to multiple_vdev_set_param
269 *
270 * Return: QDF_STATUS - Success or Failure
271 */
272 QDF_STATUS tgt_vdev_mgr_multiple_vdev_set_param(
273 struct wlan_objmgr_pdev *pdev,
274 struct multiple_vdev_set_param *param);
275
276 /**
277 * tgt_vdev_mgr_set_tx_rx_decap_type() - API to send tx rx decap type
278 * @mlme_obj: pointer to vdev mlme obj
279 * @param_id: param id
280 * @value: value to set for param id
281 *
282 * Return: QDF_STATUS - Success or Failure
283 */
284 QDF_STATUS tgt_vdev_mgr_set_tx_rx_decap_type(struct vdev_mlme_obj *mlme_obj,
285 enum wlan_mlme_cfg_id param_id,
286 uint32_t value);
287
288 /**
289 * tgt_vdev_mgr_set_param_send() - API to send parameter cfg
290 * @mlme_obj: pointer to vdev_mlme_obj
291 * @param: pointer to vdev_set_params
292 *
293 * Return: QDF_STATUS - Success or Failure
294 */
295 QDF_STATUS tgt_vdev_mgr_set_param_send(
296 struct vdev_mlme_obj *mlme_obj,
297 struct vdev_set_params *param);
298
299 /**
300 * tgt_vdev_mgr_bcn_miss_offload_send() - API to send beacon miss offload
301 * @mlme_obj: pointer to vdev_mlme_obj
302 *
303 * Return: QDF_STATUS - Success or Failure
304 */
305 QDF_STATUS tgt_vdev_mgr_bcn_miss_offload_send(struct vdev_mlme_obj *mlme_obj);
306
307 /**
308 * tgt_vdev_mgr_peer_delete_all_send() - API to send peer delete all request
309 * @mlme_obj: pointer to vdev_mlme_obj
310 * @param: pointer to peer_delete_all_params
311 *
312 * Return: QDF_STATUS - Success or Failure
313 */
314 QDF_STATUS tgt_vdev_mgr_peer_delete_all_send(
315 struct vdev_mlme_obj *mlme_obj,
316 struct peer_delete_all_params *param);
317
318 #ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE
319 /**
320 * tgt_vdev_mgr_send_set_mac_addr() - Send set MAC address command to FW
321 * @mac_addr: VDEV MAC address
322 * @mld_addr: VDEV MLD address
323 * @vdev: Pointer to object manager VDEV
324 *
325 * API to send set MAC address request to FW
326 *
327 * Return: QDF_STATUS
328 */
329 QDF_STATUS tgt_vdev_mgr_send_set_mac_addr(struct qdf_mac_addr mac_addr,
330 struct qdf_mac_addr mld_addr,
331 struct wlan_objmgr_vdev *vdev);
332
333 /**
334 * tgt_vdev_mgr_cdp_vdev_attach() - API to send CDP VDEV attach
335 * @mlme_obj: pointer to vdev_mlme_obj
336 *
337 * Return: QDF_STATUS - Success or Failure
338 */
339 QDF_STATUS tgt_vdev_mgr_cdp_vdev_attach(struct vdev_mlme_obj *mlme_obj);
340
341 /**
342 * tgt_vdev_mgr_cdp_vdev_detach() - API to send CDP VDEV detach
343 * @mlme_obj: pointer to vdev_mlme_obj
344 *
345 * Return: QDF_STATUS - Success or Failure
346 */
347 QDF_STATUS tgt_vdev_mgr_cdp_vdev_detach(struct vdev_mlme_obj *mlme_obj);
348 #endif
349
350 /**
351 * tgt_vdev_peer_set_param_send() - API to send peer param
352 * @vdev: Pointer to object manager VDEV
353 * @peer_mac_addr: pointer to peer mac address
354 * @param_id: peer param id
355 * @param_value: peer param value
356 *
357 * Return: QDF_STATUS
358 */
359 QDF_STATUS tgt_vdev_peer_set_param_send(struct wlan_objmgr_vdev *vdev,
360 uint8_t *peer_mac_addr,
361 uint32_t param_id,
362 uint32_t param_value);
363 #endif /* __WLAN_VDEV_MGR_TX_OPS_API_H__ */
364