xref: /wlan-driver/qca-wifi-host-cmn/target_if/ftm/inc/target_if_ftm.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2018 The Linux Foundation. All rights reserved.
3  * Copyright (c) 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: declare the ftm service data structure and apis
22  */
23 #ifndef _TARGET_IF_FTM_H_
24 #define _TARGET_IF_FTM_H_
25 
26 #include <qdf_types.h>
27 #include <qdf_status.h>
28 #include <wlan_objmgr_psoc_obj.h>
29 
30 /**
31  * target_if_ftm_register_tx_ops() - register ftm tx ops
32  * @tx_ops: tx ops pointer
33  *
34  * Register ftm tx ops
35  *
36  * Return: QDF_STATUS
37  */
38 QDF_STATUS target_if_ftm_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops);
39 
40 /**
41  * target_if_ftm_attach() - Register FW event handler
42  * @psoc: psoc pointer
43  *
44  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
45  */
46 QDF_STATUS
47 target_if_ftm_attach(struct wlan_objmgr_psoc *psoc);
48 
49 /**
50  * target_if_ftm_detach() - De-Register FW event handler
51  * @psoc: psoc pointer
52  *
53  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
54  */
55 QDF_STATUS
56 target_if_ftm_detach(struct wlan_objmgr_psoc *psoc);
57 
58 /**
59  * target_if_ftm_cmd_send() - Send WMI command for FTM requests
60  * @pdev: pdev pointer
61  * @buf: data to be sent to FW
62  * @len: length of the data
63  * @pdev_id: pdev id
64  *
65  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
66  */
67 QDF_STATUS
68 target_if_ftm_cmd_send(struct wlan_objmgr_pdev *pdev,
69 				uint8_t *buf, uint32_t len, uint8_t pdev_id);
70 #endif /* _TARGET_IF_FTM_H_ */
71