xref: /wlan-driver/qcacld-3.0/components/pkt_capture/dispatcher/inc/wlan_pkt_capture_tgt_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2020-2021, 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 /**
18  * DOC: packet capture south bound interface declaration
19  */
20 #ifndef _WLAN_PKT_CAPTURE_TGT_API_H
21 #define _WLAN_PKT_CAPTURE_TGT_API_H
22 
23 #include "wlan_pkt_capture_objmgr.h"
24 #include "wlan_pkt_capture_main.h"
25 #include "wlan_pkt_capture_public_structs.h"
26 
27 /**
28  * tgt_pkt_capture_register_ev_handler() - register pkt capture ev handler
29  * @vdev: pointer to vdev object
30  *
31  * Return: QDF_STATUS
32  */
33 QDF_STATUS
34 tgt_pkt_capture_register_ev_handler(struct wlan_objmgr_vdev *vdev);
35 
36 /**
37  * tgt_pkt_capture_unregister_ev_handler() - unregister pkt capture ev handler
38  * @vdev: pointer to vdev object
39  *
40  * Return: QDF_STATUS
41  */
42 QDF_STATUS
43 tgt_pkt_capture_unregister_ev_handler(struct wlan_objmgr_vdev *vdev);
44 
45 /**
46  * tgt_pkt_capture_send_mode() - send packet capture mode to firmware
47  * @vdev: pointer to vdev object
48  * @mode: packet capture mode
49  *
50  * Return: QDF_STATUS
51  */
52 QDF_STATUS
53 tgt_pkt_capture_send_mode(struct wlan_objmgr_vdev *vdev,
54 			  enum pkt_capture_mode mode);
55 
56 /**
57  * tgt_pkt_capture_send_beacon_interval() - send beacon interval to firmware
58  * @vdev: pointer to vdev object
59  * @nth_value: Beacon report period
60  *
61  * Return: QDF_STATUS
62  */
63 QDF_STATUS
64 tgt_pkt_capture_send_beacon_interval(struct wlan_objmgr_vdev *vdev,
65 				     uint32_t nth_value);
66 
67 /**
68  * tgt_pkt_capture_send_config() - send packet capture config to firmware
69  * @vdev: pointer to vdev object
70  * @config: packet capture config
71  *
72  * Return: QDF_STATUS
73  */
74 QDF_STATUS
75 tgt_pkt_capture_send_config(struct wlan_objmgr_vdev *vdev,
76 			    enum pkt_capture_config config);
77 
78 #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
79 /**
80  * tgt_pkt_capture_smu_event() - Receive smart monitor event from firmware
81  * @psoc: pointer to psoc
82  * @param: smart monitor event params
83  *
84  * Return: QDF_STATUS
85  */
86 QDF_STATUS
87 tgt_pkt_capture_smu_event(struct wlan_objmgr_psoc *psoc,
88 			  struct smu_event_params *param);
89 #else
90 static inline QDF_STATUS
tgt_pkt_capture_smu_event(struct wlan_objmgr_psoc * psoc,struct smu_event_params * param)91 tgt_pkt_capture_smu_event(struct wlan_objmgr_psoc *psoc,
92 			  struct smu_event_params *param)
93 {
94 	return QDF_STATUS_SUCCESS;
95 }
96 #endif
97 
98 #endif /* _WLAN_PKT_CAPTURE_TGT_API_H */
99