1 /*
2 * Copyright (c) 2023 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 #ifndef _WLAN_HDD_SYSFS_DIRECT_LINK_UT_CMD_H
18 #define _WLAN_HDD_SYSFS_DIRECT_LINK_UT_CMD_H
19
20 #if defined(WLAN_SYSFS) && defined(FEATURE_DIRECT_LINK)
21 /**
22 * hdd_sysfs_direct_link_ut_cmd_create() - API to create direct link unit test
23 * command sysfs entry
24 * @adapter: HDD adapter
25 *
26 * file path: /sys/class/net/wlanxx/direct_link_ut_cmd
27 * This sysfs entry is created per adapter
28 *
29 * usage:
30 * echo [0/1] <duration> <flush> <pkts> <size> <ether> <dest_mac> > file path
31 *
32 * Return: 0 on success
33 */
34 int hdd_sysfs_direct_link_ut_cmd_create(struct hdd_adapter *adapter);
35
36 /**
37 * hdd_sysfs_direct_link_ut_destroy() - API to destroy direct link unit test
38 * command sysfs entry
39 * @adapter: HDD adapter
40 *
41 * Return: None
42 */
43 void hdd_sysfs_direct_link_ut_destroy(struct hdd_adapter *adapter);
44 #else
45 static inline
hdd_sysfs_direct_link_ut_cmd_create(struct hdd_adapter * adapter)46 int hdd_sysfs_direct_link_ut_cmd_create(struct hdd_adapter *adapter)
47 {
48 return 0;
49 }
50
51 static inline
hdd_sysfs_direct_link_ut_destroy(struct hdd_adapter * adapter)52 void hdd_sysfs_direct_link_ut_destroy(struct hdd_adapter *adapter)
53 {
54 }
55 #endif
56 #endif
57