xref: /wlan-driver/qcacld-3.0/core/hdd/src/wlan_hdd_sysfs_scan_config.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
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_scan_config.h
20  *
21  * implementation for creating sysfs file scan_config
22  */
23 
24 #ifndef _WLAN_HDD_SYSFS_SCAN_CONFIG_H
25 #define _WLAN_HDD_SYSFS_SCAN_CONFIG_H
26 
27 #if defined(WLAN_SYSFS) && defined(CONFIG_WLAN_SYSFS_SCAN_CFG)
28 /**
29  * hdd_sysfs_scan_config_create() - API to create scan_config sysfs file
30  * @driver_kobject: sysfs driver kobject
31  *
32  * file path: /sys/kernel/wifi/scan_config
33  *
34  * usage:
35  *      echo [arg_0] [arg_1] [arg_2]> scan_config
36  *
37  * Return: 0 on success and errno on failure
38  */
39 int hdd_sysfs_scan_config_create(struct kobject *driver_kobject);
40 
41 /**
42  * hdd_sysfs_scan_config_destroy() - API to destroy scan_config sysfs file
43  * @driver_kobject: sysfs driver kobject
44  *
45  * Return: none
46  */
47 void
48 hdd_sysfs_scan_config_destroy(struct kobject *driver_kobject);
49 #else
50 static inline int
hdd_sysfs_scan_config_create(struct kobject * driver_kobject)51 hdd_sysfs_scan_config_create(struct kobject *driver_kobject)
52 {
53 	return 0;
54 }
55 
56 static inline void
hdd_sysfs_scan_config_destroy(struct kobject * driver_kobject)57 hdd_sysfs_scan_config_destroy(struct kobject *driver_kobject)
58 {
59 }
60 #endif
61 #endif /* #ifndef _WLAN_HDD_SYSFS_SCAN_CONFIG_H */
62