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