1 /*
2 * Copyright (c) 2020 The Linux Foundation. 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_reassoc.h
21 *
22 * implementation for creating sysfs file reassoc
23 */
24
25 #ifndef _WLAN_HDD_SYSFS_REASSOC_H
26 #define _WLAN_HDD_SYSFS_REASSOC_H
27
28 #if defined(WLAN_SYSFS) && defined(CONFIG_WLAN_REASSOC)
29 /**
30 * hdd_sysfs_reassoc_create() - API to create reassoc
31 * @adapter: pointer to adapter
32 *
33 * this file is created per adapter.
34 * file path: /sys/class/net/wlanxx/reassoc
35 * where wlanxx is adapter name
36 *
37 * usage:
38 * echo [arg_0] > reassoc
39 *
40 * Return: 0 on success and errno on failure
41 */
42 int hdd_sysfs_reassoc_create(struct hdd_adapter *adapter);
43
44 /**
45 * hdd_sysfs_reassoc_destroy() -
46 * API to destroy reassoc
47 * @adapter: pointer to adapter
48 *
49 * Return: none
50 */
51 void hdd_sysfs_reassoc_destroy(struct hdd_adapter *adapter);
52 #else
53 static inline int
hdd_sysfs_reassoc_create(struct hdd_adapter * adapter)54 hdd_sysfs_reassoc_create(struct hdd_adapter *adapter)
55 {
56 return 0;
57 }
58
59 static inline void
hdd_sysfs_reassoc_destroy(struct hdd_adapter * adapter)60 hdd_sysfs_reassoc_destroy(struct hdd_adapter *adapter)
61 {
62 }
63 #endif
64 #endif /* #ifndef _WLAN_HDD_SYSFS_REASSOC_H */
65