xref: /wlan-driver/qcacld-3.0/core/hdd/src/wlan_hdd_sysfs_modify_acl.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 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 /**
18  * DOC: wlan_hdd_sysfs_modify_acl.h
19  *
20  * implementation for creating sysfs file modify_acl
21  */
22 
23 #ifndef _WLAN_HDD_SYSFS_MODIFY_ACL_H
24 #define _WLAN_HDD_SYSFS_MODIFY_ACL_H
25 
26 #if defined(WLAN_SYSFS)
27 /**
28  * hdd_sysfs_modify_acl_create() - API to create modify_acl
29  * @adapter: hdd adapter
30  *
31  * this file is created for sap adapter.
32  * file path: /sys/class/net/wlan_xx/modify_acl
33  *                (wlan_xx is adapter name)
34  * usage:
35  *      echo <6 octet mac addr> <list type> <cmd type> > modify_acl
36  *      eg:  echo 0x00 0x11 0x22 0x33 0x44 0x55 0 0 >modify_acls
37  * Return: 0 on success and errno on failure
38  */
39 int hdd_sysfs_modify_acl_create(struct hdd_adapter *adapter);
40 
41 /**
42  * hdd_sysfs_modify_acl_destroy() -
43  *   API to destroy modify_acl sys file
44  * @adapter: pointer to adapter
45  *
46  * Return: none
47  */
48 void hdd_sysfs_modify_acl_destroy(struct hdd_adapter *adapter);
49 #else
50 static inline int
hdd_sysfs_modify_acl_create(struct hdd_adapter * adapter)51 hdd_sysfs_modify_acl_create(struct hdd_adapter *adapter)
52 {
53 	return 0;
54 }
55 
56 static inline void
hdd_sysfs_modify_acl_destroy(struct hdd_adapter * adapter)57 hdd_sysfs_modify_acl_destroy(struct hdd_adapter *adapter)
58 {
59 }
60 #endif
61 #endif /* #ifndef _WLAN_HDD_SYSFS_MODIFY_ACL_H */
62