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_range_ext.h
20 *
21 * Implementation for creating sysfs file range_ext
22 */
23
24 #ifndef _WLAN_HDD_SYSFS_RANGE_EXT_H
25 #define _WLAN_HDD_SYSFS_RANGE_EXT_H
26
27 #if defined(WLAN_SYSFS) && defined(WLAN_SYSFS_RANGE_EXT)
28 /**
29 * hdd_sysfs_range_ext_create() - API to create range_ext
30 * @adapter: hdd adapter
31 *
32 * this file is created per adapter.
33 * file path: /sys/class/net/wlanxx/range_ext
34 * (wlanxx is adapter name)
35 * usage:
36 * echo 1 > range_ext
37 *
38 * Return: none
39 */
40 void hdd_sysfs_range_ext_create(struct hdd_adapter *adapter);
41
42 /**
43 * hdd_sysfs_range_ext_destroy() - API to destroy range_ext
44 * @adapter: pointer to adapter
45 *
46 * Return: none
47 */
48 void hdd_sysfs_range_ext_destroy(struct hdd_adapter *adapter);
49 #else
50 static inline void
hdd_sysfs_range_ext_create(struct hdd_adapter * adapter)51 hdd_sysfs_range_ext_create(struct hdd_adapter *adapter)
52 {
53 }
54
55 static inline void
hdd_sysfs_range_ext_destroy(struct hdd_adapter * adapter)56 hdd_sysfs_range_ext_destroy(struct hdd_adapter *adapter)
57 {
58 }
59 #endif
60 #endif /* #ifndef _WLAN_HDD_SYSFS_RANGE_EXT_H */
61