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