1 /*
2  * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /**
21  * DOC: dp_cal_client_api.h
22  *      define timer to update DP stats
23  */
24 #ifndef _DP_CAL_CLIENT_H_
25 #define _DP_CAL_CLIENT_H_
26 
27 #include<cdp_txrx_stats_struct.h>
28 #include <qdf_timer.h>
29 #include <qdf_mem.h>
30 #include <cdp_txrx_handle.h>
31 
32 /*timer will run every 1 sec*/
33 #define DP_CAL_CLIENT_TIME 1000
34 
35 struct cal_client {
36 	qdf_timer_t cal_client_timer;
37 	void (*iterate_update_peer_list)(struct cdp_pdev *ctx);
38 	struct cdp_pdev *pdev_hdl;
39 };
40 
41 void dp_cal_client_attach(struct cdp_cal_client **cal_client_ctx,
42 			  struct cdp_pdev *pdev, qdf_device_t osdev,
43 			  void (*iterate_peer_list)(struct cdp_pdev *));
44 void dp_cal_client_detach(struct cdp_cal_client **cal_client_ctx);
45 void dp_cal_client_timer_start(void *ctx);
46 void dp_cal_client_timer_stop(void *ctx);
47 void dp_cal_client_stats_timer_fn(void *pdev_hdl);
48 void dp_cal_client_update_peer_stats(struct cdp_peer_stats *peer_stats);
49 void dp_cal_client_update_peer_stats_wifi3(struct cdp_calibr_stats_intf *stats_intf,
50 					   struct cdp_calibr_stats *calibr_stats);
51 
52 #ifndef ATH_SUPPORT_EXT_STAT
dp_cal_client_attach(struct cdp_cal_client ** cal_client_ctx,struct cdp_pdev * pdev,qdf_device_t osdev,void (* iterate_peer_list)(struct cdp_pdev *))53 void dp_cal_client_attach(struct cdp_cal_client **cal_client_ctx,
54 			  struct cdp_pdev *pdev, qdf_device_t osdev,
55 			  void (*iterate_peer_list)(struct cdp_pdev *))
56 {
57 }
58 
dp_cal_client_detach(struct cdp_cal_client ** cal_client_ctx)59 void dp_cal_client_detach(struct cdp_cal_client **cal_client_ctx)
60 {
61 }
62 
dp_cal_client_timer_start(void * ctx)63 void dp_cal_client_timer_start(void *ctx)
64 {
65 }
66 
dp_cal_client_timer_stop(void * ctx)67 void dp_cal_client_timer_stop(void *ctx)
68 {
69 }
70 
dp_cal_client_stats_timer_fn(void * pdev_hdl)71 void dp_cal_client_stats_timer_fn(void *pdev_hdl)
72 {
73 }
74 
dp_cal_client_update_peer_stats(struct cdp_peer_stats * peer_stats)75 void dp_cal_client_update_peer_stats(struct cdp_peer_stats *peer_stats)
76 {
77 }
78 
dp_cal_client_update_peer_stats_wifi3(struct cdp_calibr_stats_intf * stats_intf,struct cdp_calibr_stats * calibr_stats)79 void dp_cal_client_update_peer_stats_wifi3(struct cdp_calibr_stats_intf *stats_intf,
80 					   struct cdp_calibr_stats *calibr_stats)
81 {
82 }
83 #endif
84 
85 #endif /*_DP_CAL_CLIENT_H_*/
86