xref: /wlan-driver/qca-wifi-host-cmn/wmi/inc/wmi_unified_dbr_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2013-2019 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  * DOC: Implement API's specific to DBR component.
21  */
22 
23 #ifndef _WMI_UNIFIED_DBR_API_H_
24 #define _WMI_UNIFIED_DBR_API_H_
25 
26 #include "wmi_unified_dbr_param.h"
27 
28 /**
29  * wmi_unified_dbr_ring_cfg: Configure direct buffer rx rings
30  * @wmi_handle: WMI handle
31  * @cfg: pointer to direct buffer rx config request
32  *
33  * Return: QDF status of operation
34  */
35 QDF_STATUS wmi_unified_dbr_ring_cfg(wmi_unified_t wmi_handle,
36 				    struct direct_buf_rx_cfg_req *cfg);
37 
38 /**
39  * wmi_extract_dbr_buf_release_fixed : Extract direct buffer rx fixed param
40  *				     from buffer release event
41  * @wmi_handle: WMI handle
42  * @evt_buf: Event buffer
43  * @param: Pointer to direct buffer rx response struct
44  *
45  * Return: QDF status of operation
46  */
47 QDF_STATUS wmi_extract_dbr_buf_release_fixed(
48 			wmi_unified_t wmi_handle,
49 			uint8_t *evt_buf,
50 			struct direct_buf_rx_rsp *param);
51 
52 /**
53  * wmi_extract_dbr_buf_release_entry: Extract direct buffer rx buffer tlv
54  *
55  * @wmi_handle: WMI handle
56  * @evt_buf: Event buffer
57  * @idx: Index of the module for which capability is received
58  * @param: Pointer to direct buffer rx entry
59  *
60  * Return: QDF status of operation
61  */
62 QDF_STATUS wmi_extract_dbr_buf_release_entry(
63 			wmi_unified_t wmi_handle,
64 			uint8_t *evt_buf, uint8_t idx,
65 			struct direct_buf_rx_entry *param);
66 
67 /**
68  * wmi_extract_dbr_buf_metadata: Extract direct buffer metadata
69  *
70  * @wmi_handle: WMI handle
71  * @evt_buf: Event buffer
72  * @idx: Index of the module for which capability is received
73  * @param: Pointer to direct buffer metadata
74  *
75  * Return: QDF status of operation
76  */
77 QDF_STATUS wmi_extract_dbr_buf_metadata(
78 			wmi_unified_t wmi_handle,
79 			uint8_t *evt_buf, uint8_t idx,
80 			struct direct_buf_rx_metadata *param);
81 
82 /**
83  * wmi_extract_dbr_buf_cv_metadata: Extract direct buffer TxBF cbf cv metadata
84  *
85  * @wmi_handle: WMI handle
86  * @evt_buf: Event buffer
87  * @idx: Index of the module for which capability is received
88  * @param: Pointer to direct buffer cv metadata
89  *
90  * Return: QDF status of operation
91  */
92 QDF_STATUS wmi_extract_dbr_buf_cv_metadata(
93 			wmi_unified_t wmi_handle,
94 			uint8_t *evt_buf, uint8_t idx,
95 			struct direct_buf_rx_cv_metadata *param);
96 
97 /**
98  * wmi_extract_dbr_buf_cqi_metadata: Extract direct buffer TxBF cqi metadata
99  *
100  * @wmi_handle: WMI handle
101  * @evt_buf: Event buffer
102  * @idx: Index of the module for which capability is received
103  * @param: Pointer to direct buffer cqi metadata
104  *
105  * Return: QDF status of operation
106  */
107 QDF_STATUS wmi_extract_dbr_buf_cqi_metadata(
108 			wmi_unified_t wmi_handle,
109 			uint8_t *evt_buf, uint8_t idx,
110 			struct direct_buf_rx_cqi_metadata *param);
111 #endif /* _WMI_UNIFIED_DBR_API_H_ */
112