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_hdd_sysfs_dp_tx_delay_stats.h
19 *
20 * implementation for creating sysfs files:
21 *
22 * dp_tx_delay_stats
23 */
24
25 #ifndef _WLAN_HDD_SYSFS_DP_TX_DELAY_STATS_H
26 #define _WLAN_HDD_SYSFS_DP_TX_DELAY_STATS_H
27
28 #if defined(WLAN_SYSFS) && defined(HW_TX_DELAY_STATS_ENABLE)
29 /**
30 * hdd_sysfs_dp_tx_delay_stats_create() - API to create dp tx delay stats
31 * related sysfs entry
32 * @adapter: hdd adapter
33 *
34 * file path: /sys/class/net/wlanxx/dp_tx_delay_stats
35 * This sysfs entry is created per adapter
36 *
37 * usage:
38 * echo [0/1] > dp_tx_delay_stats
39 *
40 * Return: 0 on success and errno on failure
41 */
42 int
43 hdd_sysfs_dp_tx_delay_stats_create(struct hdd_adapter *adapter);
44
45 /**
46 * hdd_sysfs_dp_tx_delay_stats_destroy() - API to destroy dp tx delay stats
47 * related sysfs entry
48 * @adapter: hdd adapter
49 *
50 * Return: None
51 */
52 void
53 hdd_sysfs_dp_tx_delay_stats_destroy(struct hdd_adapter *adapter);
54 #else
55 static inline int
hdd_sysfs_dp_tx_delay_stats_create(struct hdd_adapter * adapter)56 hdd_sysfs_dp_tx_delay_stats_create(struct hdd_adapter *adapter)
57 {
58 return 0;
59 }
60
61 static inline void
hdd_sysfs_dp_tx_delay_stats_destroy(struct hdd_adapter * adapter)62 hdd_sysfs_dp_tx_delay_stats_destroy(struct hdd_adapter *adapter)
63 {
64 }
65 #endif
66 #endif
67