xref: /wlan-driver/qcacld-3.0/core/hdd/src/wlan_hdd_sysfs_bmiss.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 /**
20  * DOC: wlan_hdd_sysfs_bmiss.h
21  *
22  * implementation for creating sysfs file bmiss
23  */
24 
25 #ifndef _WLAN_HDD_SYSFS_BMISS_H
26 #define _WLAN_HDD_SYSFS_BMISS_H
27 
28 #if defined(WLAN_SYSFS) && defined(CONFIG_WLAN_BMISS)
29 /**
30  * hdd_sysfs_bmiss_create() - API to create bmiss
31  * @adapter: pointer to adapter
32  *
33  * this file is created per adapter.
34  * file path: /sys/class/net/wlanxx/bmiss
35  * where wlanxx is adapter name
36  *
37  * usage:
38  *      cat /sys/class/net/wlanxx/bmiss
39  *
40  * Return: 0 on success and errno on failure
41  */
42 int hdd_sysfs_bmiss_create(struct hdd_adapter *adapter);
43 
44 /**
45  * hdd_sysfs_bmiss_destroy() - API to destroy bmiss sysfs file
46  * @adapter: pointer to adapter
47  *
48  * Return: none
49  */
50 void hdd_sysfs_bmiss_destroy(struct hdd_adapter *adapter);
51 #else
52 static inline int
hdd_sysfs_bmiss_create(struct hdd_adapter * adapter)53 hdd_sysfs_bmiss_create(struct hdd_adapter *adapter)
54 {
55 	return 0;
56 }
57 
58 static inline void
hdd_sysfs_bmiss_destroy(struct hdd_adapter * adapter)59 hdd_sysfs_bmiss_destroy(struct hdd_adapter *adapter)
60 {
61 }
62 #endif
63 #endif /* #ifndef _WLAN_HDD_SYSFS_BMISS_H */
64 
65