xref: /wlan-driver/qcacld-3.0/core/hdd/src/wlan_hdd_sysfs_txrx_stats_console.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 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: wlan_hdd_sysfs_txrx_stats
19  *
20  * implementation for creating sysfs files:
21  *
22  * txrx_stats
23  */
24 
25 int
26 hdd_sysfs_dp_txrx_stats_sysfs_create(struct kobject *drv_kobj);
27 
28 void
29 hdd_sysfs_dp_txrx_stats_sysfs_destroy(struct kobject *drv_kobj);
30 
31 #ifdef WLAN_SYSFS_DP_STATS
32 
33 /**
34  * hdd_sysfs_dp_txrx_stats_sysfs_create() - API to create txrx stats related
35  * sysfs entry.
36  * @drv_kobj: sysfs driver kobject
37  *
38  * file path: /sys/kernel/wifi/txrx_stats
39  *
40  * Return: 0 on success and errno on failure
41  */
42 
43 int
44 hdd_sysfs_dp_txrx_stats_sysfs_create(struct kobject *drv_kobj);
45 
46 /**
47  * hdd_sysfs_dp_txrx_stats_sysfs_destroy() - API to destroy txrx stats
48  * related sysfs entry.
49  * @drv_kobj: sysfs driver kobject
50  *
51  * Return: None
52  */
53 
54 void
55 hdd_sysfs_dp_txrx_stats_sysfs_destroy(struct kobject *drv_kobj);
56 
57 #else /* WLAN_SYSFS_DP_STATS */
58 
59 int
hdd_sysfs_dp_txrx_stats_sysfs_create(struct kobject * drv_kobj)60 hdd_sysfs_dp_txrx_stats_sysfs_create(struct kobject *drv_kobj)
61 {
62 	return 0;
63 }
64 
65 void
hdd_sysfs_dp_txrx_stats_sysfs_destroy(struct kobject * drv_kobj)66 hdd_sysfs_dp_txrx_stats_sysfs_destroy(struct kobject *drv_kobj)
67 {
68 }
69 
70 #endif /* WLAN_SYSFS_DP_STATS */
71