1 /*
2  * Copyright (c) 2023 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 #ifndef _WLAN_HDD_SYSFS_WDS_MODE_H
18 #define _WLAN_HDD_SYSFS_WDS_MODE_H
19 
20 #if defined(WLAN_SYSFS) && defined(FEATURE_SYSFS_WDS_MODE)
21 
22 /**
23  * hdd_sysfs_wds_mode_create() - API to create wds mode sysfs file
24  * @driver_kobject: sysfs driver kobject
25  *
26  * file path: /sys/kernel/kiwi_v2/wds_mode
27  *
28  * usage:
29  *      echo [arg_0] > wds_mode
30  *
31  * Return: 0 on success and errno on failure
32  */
33 int hdd_sysfs_wds_mode_create(struct kobject *driver_kobject);
34 
35 /**
36  * hdd_sysfs_wds_mode_destroy() - destroy hdd wds mode sysfs node
37  * @driver_kobject: pointer to driver kobject
38  *
39  * Return: void
40  *
41  */
42 void
43 hdd_sysfs_wds_mode_destroy(struct kobject *driver_kobject);
44 
45 #else
46 
47 static inline int
hdd_sysfs_wds_mode_create(struct kobject * driver_kobject)48 hdd_sysfs_wds_mode_create(struct kobject *driver_kobject)
49 {
50 	return 0;
51 }
52 
53 static inline void
hdd_sysfs_wds_mode_destroy(struct kobject * driver_kobject)54 hdd_sysfs_wds_mode_destroy(struct kobject *driver_kobject)
55 {
56 }
57 #endif
58 #endif
59