xref: /wlan-driver/qca-wifi-host-cmn/utils/pktlog/include/pktlog_wifi2.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /**
2  * Copyright (c) 2013-2020, The Linux Foundation. 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 #include "ol_txrx_types.h"
18 #include "ol_htt_tx_api.h"
19 #include "ol_tx_desc.h"
20 #include "qdf_mem.h"
21 #include "htt.h"
22 #include "htt_internal.h"
23 #include "pktlog_ac_i.h"
24 #include "wma_api.h"
25 #include "wlan_logging_sock_svc.h"
26 
27 #define TX_DESC_ID_LOW_MASK     0xffff
28 #define TX_DESC_ID_LOW_SHIFT    0
29 #define TX_DESC_ID_HIGH_MASK    0xffff0000
30 #define TX_DESC_ID_HIGH_SHIFT   16
31 
32 #ifndef REMOVE_PKT_LOG
33 /**
34  * process_tx_info() - process tx pktlog buffers
35  * @txrx_pdev: ol pdev handle
36  * @data: pktlog buffer
37  *
38  * Return: 0 - success/non-zero - failure
39  */
40 A_STATUS process_tx_info(struct cdp_pdev *txrx_pdev, void *data);
41 
42 /**
43  * process_rx_info_remote() - process rx pktlog buffers
44  * @txrx_pdev: ol pdev handle
45  * @data: pktlog buffer
46  *
47  * Return: 0 - success/non-zero - failure
48  */
49 A_STATUS process_rx_info_remote(void *pdev, void *data);
50 
51 /**
52  * process_rx_info() - process rx pktlog buffers
53  * @txrx_pdev: ol pdev handle
54  * @data: pktlog buffer
55  *
56  * Return: 0 - success/non-zero - failure
57  */
58 A_STATUS process_rx_info(void *pdev, void *data);
59 
60 /**
61  * process_rate_find() - process rate event pktlog buffers
62  * @txrx_pdev: ol pdev handle
63  * @data: pktlog buffer
64  *
65  * Return: 0 - success/non-zero - failure
66  */
67 A_STATUS process_rate_find(void *pdev, void *data);
68 
69 /**
70  * process_rate_update() - process rate event pktlog buffers
71  * @txrx_pdev: ol pdev handle
72  * @data: pktlog buffer
73  *
74  * Return: 0 - success/non-zero - failure
75  */
76 A_STATUS process_rate_update(void *pdev, void *data);
77 
78 /**
79  * process_sw_event() - process sw event pktlog buffers
80  * @txrx_pdev: ol pdev handle
81  * @data: pktlog buffer
82  *
83  * Return: 0 - success/non-zero - failure
84  */
85 A_STATUS process_sw_event(void *pdev, void *data);
86 #else
87 static inline
process_tx_info(struct cdp_pdev * txrx_pdev,void * data)88 A_STATUS process_tx_info(struct cdp_pdev *txrx_pdev, void *data)
89 {
90 	return 0;
91 }
92 
93 static inline
process_rx_info_remote(void * pdev,void * data)94 A_STATUS process_rx_info_remote(void *pdev, void *data)
95 {
96 	return 0;
97 }
98 
99 static inline
process_rx_info(void * pdev,void * data)100 A_STATUS process_rx_info(void *pdev, void *data)
101 {
102 	return 0;
103 }
104 
105 static inline
process_rate_find(void * pdev,void * data)106 A_STATUS process_rate_find(void *pdev, void *data)
107 {
108 	return 0;
109 }
110 
111 static inline
process_rate_update(void * pdev,void * data)112 A_STATUS process_rate_update(void *pdev, void *data)
113 {
114 	return 0;
115 }
116 
117 static inline
process_sw_event(void * pdev,void * data)118 A_STATUS process_sw_event(void *pdev, void *data)
119 {
120 	return 0;
121 }
122 #endif /* REMOVE_PKT_LOG */
123 
124 /**
125  * process_offload_pktlog_wifi3() - Process full pktlog events
126  * pdev: abstract pdev handle
127  * data: pktlog buffer
128  *
129  * Return: zero on success, non-zero on failure
130  */
131 static inline A_STATUS
process_offload_pktlog_wifi3(struct cdp_pdev * pdev,void * data)132 process_offload_pktlog_wifi3(struct cdp_pdev *pdev, void *data)
133 {
134 	return 0;
135 }
136 
137 /**
138  * process_rx_desc_remote_wifi3() - Process pktlog buffers received
139  *                                  from monitor status ring
140  * @pdev: pdev handle
141  * @data: pktlog buffer pointer
142  *
143  * Return: 0 - success/non-zero - failure
144  */
145 static inline int
process_rx_desc_remote_wifi3(void * pdev,void * data)146 process_rx_desc_remote_wifi3(void *pdev, void *data)
147 {
148 	return 0;
149 }
150 
151 /**
152  * process_pktlog_lite_wifi3() - Process pktlog buffers received
153  *                               from monitor status ring
154  * @pdev: pdev handle
155  * @data: pktlog buffer pointer
156  *
157  * Return: 0 - success/non-zero - failure
158  */
159 static inline int
process_pktlog_lite_wifi3(void * context,void * log_data,uint16_t log_type)160 process_pktlog_lite_wifi3(void *context, void *log_data,
161 			  uint16_t log_type)
162 {
163 	return 0;
164 }
165