1 /*
2 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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: WLAN Host Device Driver periodic STA statistics related implementation
19 */
20
21 #if !defined(WLAN_DP_PERIODIC_STA_STATS_H)
22 #define WLAN_DP_PERIODIC_STA_STATS_H
23
24 #include "wlan_dp_priv.h"
25 #include "wlan_objmgr_psoc_obj.h"
26
27 #ifdef WLAN_FEATURE_PERIODIC_STA_STATS
28
29 /**
30 * dp_periodic_sta_stats_config() - Initialize periodic stats configuration
31 * @config: Pointer to dp configuration
32 * @psoc: Pointer to psoc
33 *
34 * Return: none
35 */
36 void dp_periodic_sta_stats_config(struct wlan_dp_psoc_cfg *config,
37 struct wlan_objmgr_psoc *psoc);
38
39 /**
40 * dp_periodic_sta_stats_init() - Initialize periodic stats display flag
41 * @dp_intf: Pointer to the station interface
42 *
43 * Return: none
44 */
45 void dp_periodic_sta_stats_init(struct wlan_dp_intf *dp_intf);
46
47 /**
48 * dp_periodic_sta_stats_display() - Display periodic stats at STA
49 * @dp_ctx: dp context
50 *
51 * Return: none
52 */
53 void dp_periodic_sta_stats_display(struct wlan_dp_psoc_context *dp_ctx);
54
55 /**
56 * dp_periodic_sta_stats_start() - Start displaying periodic stats for STA
57 * @vdev: vdev handle
58 *
59 * Return: none
60 */
61 void dp_periodic_sta_stats_start(struct wlan_objmgr_vdev *vdev);
62
63 /**
64 * dp_periodic_sta_stats_stop() - Stop displaying periodic stats for STA
65 * @vdev: vdev handle
66 *
67 * Return: none
68 */
69 void dp_periodic_sta_stats_stop(struct wlan_objmgr_vdev *vdev);
70
71 /**
72 * dp_periodic_sta_stats_mutex_create() - Create mutex for STA periodic stats
73 * @dp_intf: Pointer to the station interface
74 *
75 * Return: none
76 */
77 void dp_periodic_sta_stats_mutex_create(struct wlan_dp_intf *dp_intf);
78
79 /**
80 * dp_periodic_sta_stats_mutex_destroy() - Destroy STA periodic stats mutex
81 * @dp_intf: Pointer to the station interface
82 *
83 * Return: none
84 */
85 void dp_periodic_sta_stats_mutex_destroy(struct wlan_dp_intf *dp_intf);
86
87 #else
88 static inline void
dp_periodic_sta_stats_display(struct wlan_dp_psoc_context * dp_ctx)89 dp_periodic_sta_stats_display(struct wlan_dp_psoc_context *dp_ctx)
90 {
91 }
92
93 static inline void
dp_periodic_sta_stats_config(struct wlan_dp_psoc_cfg * config,struct wlan_objmgr_psoc * psoc)94 dp_periodic_sta_stats_config(struct wlan_dp_psoc_cfg *config,
95 struct wlan_objmgr_psoc *psoc)
96 {
97 }
98
dp_periodic_sta_stats_start(struct wlan_objmgr_vdev * vdev)99 static inline void dp_periodic_sta_stats_start(struct wlan_objmgr_vdev *vdev)
100 {
101 }
102
dp_periodic_sta_stats_stop(struct wlan_objmgr_vdev * vdev)103 static inline void dp_periodic_sta_stats_stop(struct wlan_objmgr_vdev *vdev)
104 {
105 }
106
107 static inline void
dp_periodic_sta_stats_init(struct wlan_dp_intf * dp_intf)108 dp_periodic_sta_stats_init(struct wlan_dp_intf *dp_intf)
109 {
110 }
111
112 static inline void
dp_periodic_sta_stats_mutex_create(struct wlan_dp_intf * dp_intf)113 dp_periodic_sta_stats_mutex_create(struct wlan_dp_intf *dp_intf)
114 {
115 }
116
117 static inline void
dp_periodic_sta_stats_mutex_destroy(struct wlan_dp_intf * dp_intf)118 dp_periodic_sta_stats_mutex_destroy(struct wlan_dp_intf *dp_intf)
119 {
120 }
121 #endif /* end #ifdef WLAN_FEATURE_PERIODIC_STA_STATS */
122 #endif /* end #if !defined(WLAN_DP_PERIODIC_STA_STATS_H) */
123