xref: /wlan-dirver/qca-wifi-host-cmn/os_if/linux/cp_stats/inc/wlan_cfg80211_ic_cp_stats.h (revision a175314c51a4ce5cec2835cc8a8c7dc0c1810915)
1 /*
2  * Copyright (c) 2018 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 /**
20  * DOC: wlan_cfg80211_ic_cp_stats.h
21  *
22  * This Header file provide declaration for cfg80211 command handler API
23  * registered cp stats and specific with ic
24  */
25 
26 #ifndef __WLAN_CFG80211_IC_CP_STATS_H__
27 #define __WLAN_CFG80211_IC_CP_STATS_H__
28 
29 #ifdef QCA_SUPPORT_CP_STATS
30 #include <wlan_objmgr_cmn.h>
31 #include <wlan_cp_stats_ic_defs.h>
32 #ifdef WLAN_ATF_ENABLE
33 #include <wlan_cp_stats_ic_atf_defs.h>
34 #endif
35 #include <wlan_cp_stats_ic_dcs_defs.h>
36 
37 /**
38  * wlan_cfg80211_get_peer_cp_stats() - API to get peer stats object
39  * @peer_obj: peer object as input
40  * @peer_cp_stats: peer stats object to populate
41  *
42  * Return: 0 on success, negative value on failure
43  */
44 int wlan_cfg80211_get_peer_cp_stats(struct wlan_objmgr_peer *peer_obj,
45 				    struct peer_ic_cp_stats *peer_cp_stats);
46 
47 /**
48  * wlan_cfg80211_get_vdev_cp_stats() - API to get vdev stats object
49  * @vdev_obj: vdev object as input
50  * @vdev_cp_stats: vdev stats object to populate
51  *
52  * Return: 0 on success, negative value on failure
53  */
54 int wlan_cfg80211_get_vdev_cp_stats(struct wlan_objmgr_vdev *vdev_obj,
55 				    struct vdev_ic_cp_stats *vdev_cp_stats);
56 
57 /**
58  * wlan_cfg80211_get_pdev_cp_stats() - API to get pdev cp stats object
59  * @pdev_obj: pdev object as input
60  * @pdev_cp_stats: pdev cp stats object to populate
61  *
62  * Return: 0 on success, negative value on failure
63  */
64 int wlan_cfg80211_get_pdev_cp_stats(struct wlan_objmgr_pdev *pdev_obj,
65 				    struct pdev_ic_cp_stats *pdev_cp_stats);
66 
67 #ifdef WLAN_ATF_ENABLE
68 /**
69  * wlan_cfg80211_get_peer_atf_cp_stats() - API to get ATF peer stats object
70  * @peer_obj: peer object as input
71  * @atf_cp_stats: atf peer cp stats object to populate
72  *
73  * Return: 0 on success, negative value on failure
74  */
75 int
76 wlan_cfg80211_get_atf_peer_cp_stats(struct wlan_objmgr_peer *peer_obj,
77 				    struct atf_peer_cp_stats *atf_cp_stats);
78 
79 /**
80  * wlan_cfg80211_get_peer_atf_cp_stats_from_mac() - API to get ATF peer
81  * stats object from peer mac address
82  * @vdev_obj: vdev object as input
83  * @mac: peer mac address as input
84  * @atf_cp_stats: atf peer cp stats object to populate
85  *
86  * API used from ucfg layer to get ATF peer cp stats object when only peer
87  * mac address is available
88  *
89  * Return: 0 on success, negative value on failure
90  */
91 int wlan_cfg80211_get_atf_peer_cp_stats_from_mac(
92 		struct wlan_objmgr_vdev *vdev_obj,
93 		uint8_t *mac,
94 		struct atf_peer_cp_stats *atf_cp_stats);
95 #endif /* WLAN_ATF_ENABLE */
96 
97 /**
98  * wlan_cfg80211_get_dcs_pdev_cp_stats() - API to get DCS chan stats
99  * @pdev_obj: pdev object as input
100  * @dcs_chan_stats: DCS pdev stats object to populate
101  *
102  * Return: 0 on success, negative value on failure
103  */
104 int wlan_cfg80211_get_dcs_pdev_cp_stats(
105 		struct wlan_objmgr_pdev *pdev_obj,
106 		struct pdev_dcs_chan_stats *dcs_chan_stats);
107 
108 #endif /* QCA_SUPPORT_CP_STATS */
109 #endif /* __WLAN_CFG80211_IC_CP_STATS_H__ */
110