1 /*
2 * Copyright (c) 2011-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_dl_modes.h
20 *
21 * implementation for creating sysfs file dl_modes
22 */
23
24 #ifndef _WLAN_HDD_SYSFS_DL_MODES_H
25 #define _WLAN_HDD_SYSFS_DL_MODES_H
26
27 #if defined(WLAN_SYSFS) && defined(CONFIG_WLAN_DL_MODES)
28 /**
29 * hdd_sysfs_dl_modes_create() - API to create motion
30 * detection sysfs attributes
31 * @adapter: hdd adapter
32 *
33 * This API creates the following sysfs attributes:
34 * 1. dl_loglevel
35 * 2. dl_mod_loglevel
36 * 3. dl_modoff
37 * 4. dl_modon
38 * 5. dl_report
39 * 6. dl_type
40 * 7. dl_vapoff
41 * 8. dl_vapon
42 *
43 * dl_loglevel: this file is created per adapter.
44 * file path: /sys/class/net/wlanxx/dl_loglevel
45 * (wlanxx is adapter name)
46 * usage:
47 * echo [arg_0] > dl_loglevel
48 *
49 * dl_mod_loglevel: this file is created per adapter.
50 * file path: /sys/class/net/wlanxx/dl_mod_loglevel
51 * (wlanxx is adapter name)
52 * usage:
53 * echo [arg_0] > dl_mod_loglevel
54 *
55 * dl_modoff: this file is created per adapter.
56 * file path: /sys/class/net/wlanxx/dl_modoff
57 * (wlanxx is adapter name)
58 * usage:
59 * echo [arg_0] > mt_config
60 *
61 * dl_modon: this file is created per adapter.
62 * file path: /sys/class/net/wlanxx/dl_modon
63 * (wlanxx is adapter name)
64 * usage:
65 * echo [arg_0] > dl_modon
66 *
67 * dl_report: this file is created per adapter.
68 * file path: /sys/class/net/wlanxx/dl_report
69 * (wlanxx is adapter name)
70 * usage:
71 * echo [arg_0] > dl_report
72 *
73 * dl_type: this file is created per adapter.
74 * file path: /sys/class/net/wlanxx/dl_type
75 * (wlanxx is adapter name)
76 * usage:
77 * echo [arg_0] > dl_type
78 *
79 * dl_vapoff: this file is created per adapter.
80 * file path: /sys/class/net/wlanxx/dl_vapoff
81 * (wlanxx is adapter name)
82 * usage:
83 * echo [arg_0] > dl_vapoff
84 *
85 * dl_vapon: this file is created per adapter.
86 * file path: /sys/class/net/wlanxx/dl_vapon
87 * (wlanxx is adapter name)
88 * usage:
89 * echo [arg_0] > dl_vapon
90 *
91 * Return: None
92 */
93 void hdd_sysfs_dl_modes_create(struct hdd_adapter *adapter);
94
95 /**
96 * hdd_sysfs_dl_modes_destroy() -
97 * API to destroy dl mode sysfs attributes
98 * @adapter: pointer to adapter
99 *
100 * Return: none
101 */
102 void hdd_sysfs_dl_modes_destroy(struct hdd_adapter *adapter);
103
104 #else
105 static inline void
hdd_sysfs_dl_modes_create(struct hdd_adapter * adapter)106 hdd_sysfs_dl_modes_create(struct hdd_adapter *adapter)
107 {
108 }
109
110 static inline void
hdd_sysfs_dl_modes_destroy(struct hdd_adapter * adapter)111 hdd_sysfs_dl_modes_destroy(struct hdd_adapter *adapter)
112 {
113 }
114 #endif
115 #endif /* #ifndef _WLAN_HDD_SYSFS_DL_MODES_H */
116