xref: /wlan-driver/qcacld-3.0/core/hdd/src/wlan_hdd_sysfs_monitor_mode_channel.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2011-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_monitor_mode_channel.h
21  *
22  * Implementation for creating sysfs file monitor_mode_channel
23  */
24 
25 #ifndef _WLAN_HDD_SYSFS_MONITOR_MODE_CHANNEL_H
26 #define _WLAN_HDD_SYSFS_MONITOR_MODE_CHANNEL_H
27 
28 #if defined(WLAN_SYSFS) && defined(CONFIG_WLAN_SYSFS_MONITOR_MODE_CHANNEL)
29 /**
30  * hdd_sysfs_monitor_mode_channel_create() -
31  *  API to create monitor_mode_channel
32  * @adapter: hdd adapter
33  *
34  * this file is created per adapter.
35  * file path: /sys/class/net/wlanxx/monitor_mode_channel
36  *                (wlanxx is adapter name)
37  * usage:
38  *      echo [arg_0] [arg_1] > monitor_mode_channel
39  *
40  * Return: 0 on success and errno on failure
41  */
42 int hdd_sysfs_monitor_mode_channel_create(struct hdd_adapter *adapter);
43 
44 /**
45  * hdd_sysfs_monitor_mode_channel_destroy() -
46  *   API to destroy monitor_mode_channel sysfs file
47  * @adapter: pointer to adapter
48  *
49  * Return: none
50  */
51 void hdd_sysfs_monitor_mode_channel_destroy(struct hdd_adapter *adapter);
52 #else
53 static inline int
hdd_sysfs_monitor_mode_channel_create(struct hdd_adapter * adapter)54 hdd_sysfs_monitor_mode_channel_create(struct hdd_adapter *adapter)
55 {
56 	return 0;
57 }
58 
59 static inline void
hdd_sysfs_monitor_mode_channel_destroy(struct hdd_adapter * adapter)60 hdd_sysfs_monitor_mode_channel_destroy(struct hdd_adapter *adapter)
61 {
62 }
63 #endif
64 #endif /* #ifndef _WLAN_HDD_SYSFS_MONITOR_MODE_CHANNEL_H */
65