xref: /wlan-driver/qcacld-3.0/core/hdd/src/wlan_hdd_sysfs_dp_traffic_end_indication.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2022 Qualcomm Innovation Center, Inc. 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_dp_traffic_end_indication.h
19  *
20  * implementation for creating sysfs files:
21  *
22  * dp_traffic_end_indication
23  */
24 
25 #ifndef _WLAN_HDD_SYSFS_DP_TRAFFIC_END_INDICATION_H
26 #define _WLAN_HDD_SYSFS_DP_TRAFFIC_END_INDICATION_H
27 
28 #ifdef DP_TRAFFIC_END_INDICATION
29 /**
30  * hdd_sysfs_dp_traffic_end_indication_create() - API to create dp tx data end
31  * indication related sysfs entry
32  * @adapter: hdd adapter
33  *
34  * file path: /sys/class/net/wlanxx/dp_traffic_end_indication
35  * This sysfs entry is created per adapter
36  *
37  * usage:
38  *      echo <0/1> <Default DSCP> <Special DSCP> > dp_traffic_end_indication
39  *
40  * Return: 0 on success and errno on failure
41  */
42 int
43 hdd_sysfs_dp_traffic_end_indication_create(struct hdd_adapter *adapter);
44 
45 /**
46  * hdd_sysfs_dp_traffic_end_indication_destroy() - API to destroy dp traffic end
47  * indication related sysfs entry
48  * @adapter: hdd adapter
49  *
50  * Return: None
51  */
52 void
53 hdd_sysfs_dp_traffic_end_indication_destroy(struct hdd_adapter *adapter);
54 #else
55 static inline int
hdd_sysfs_dp_traffic_end_indication_create(struct hdd_adapter * adapter)56 hdd_sysfs_dp_traffic_end_indication_create(struct hdd_adapter *adapter)
57 {
58 	return 0;
59 }
60 
61 static inline void
hdd_sysfs_dp_traffic_end_indication_destroy(struct hdd_adapter * adapter)62 hdd_sysfs_dp_traffic_end_indication_destroy(struct hdd_adapter *adapter)
63 {
64 }
65 #endif
66 #endif
67