1 /*
2 * Copyright (c) 2020 The Linux Foundation. All rights reserved.
3 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
4 *
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18 /**
19 * DOC: wlan_hdd_sysfs_dp_aggregation.h
20 *
21 * implementation for creating sysfs files:
22 *
23 * dp_aggregation
24 */
25
26 #ifndef _WLAN_HDD_SYSFS_DP_AGGREGATION_H
27 #define _WLAN_HDD_SYSFS_DP_AGGREGATION_H
28
29 #if defined(WLAN_SYSFS)
30 /**
31 * hdd_sysfs_dp_aggregation_create() - API to create dp aggregation
32 * related sysfs entry
33 * @driver_kobject: sysfs driver kobject
34 *
35 * file path: /sys/kernel/wifi/dp_aggregation
36 *
37 * usage:
38 * echo [0/1] > dp_aggregation
39 *
40 * Return: 0 on success and errno on failure
41 */
42 int
43 hdd_sysfs_dp_aggregation_create(struct kobject *driver_kobject);
44
45 /**
46 * hdd_sysfs_dp_aggregation_destroy() - API to destroy dp aggregation
47 * related sysfs entry
48 * @driver_kobject: sysfs driver kobject
49 *
50 * Return: None
51 */
52 void
53 hdd_sysfs_dp_aggregation_destroy(struct kobject *driver_kobject);
54 #else
55 static inline int
hdd_sysfs_dp_aggregation_create(struct kobject * driver_kobject)56 hdd_sysfs_dp_aggregation_create(struct kobject *driver_kobject)
57 {
58 return 0;
59 }
60
61 static inline void
hdd_sysfs_dp_aggregation_destroy(struct kobject * driver_kobject)62 hdd_sysfs_dp_aggregation_destroy(struct kobject *driver_kobject)
63 {
64 }
65 #endif
66 #endif /* #ifndef _WLAN_HDD_SYSFS_DP_AGGREGATION_H */
67