1 /*
2 * Copyright (c) 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
6 * any purpose with or without fee is hereby granted, provided that the
7 * above copyright notice and this permission notice appear in all
8 * copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17 * PERFORMANCE OF THIS SOFTWARE.
18 */
19
20 /**
21 * DOC: wlan_hdd_debugfs_unit_test.h
22 *
23 * WLAN Host Device Driver implementation to create debugfs
24 * unit_test_host/unit_test_target
25 */
26
27 #ifndef _WLAN_HDD_DEBUGFS_UNIT_TEST_H
28 #define _WLAN_HDD_DEBUGFS_UNIT_TEST_H
29
30 #if defined(WLAN_DEBUGFS) && defined(WLAN_UNIT_TEST)
31 /**
32 * wlan_hdd_debugfs_unit_test_host_create() - API to create unit_test_target
33 * @hdd_ctx: hdd context
34 *
35 * this file is created per driver.
36 * file path: /sys/kernel/debug/wlan_xx/unit_test_host
37 * (wlan_xx is driver name)
38 * usage:
39 * echo 'all'>unit_test_host
40 * echo 'qdf_periodic_work'>unit_test_host
41 *
42 * Return: 0 on success and errno on failure
43 */
44 int wlan_hdd_debugfs_unit_test_host_create(struct hdd_context *hdd_ctx);
45 #else
46 static inline int
wlan_hdd_debugfs_unit_test_host_create(struct hdd_context * hdd_ctx)47 wlan_hdd_debugfs_unit_test_host_create(struct hdd_context *hdd_ctx)
48 {
49 return 0;
50 }
51 #endif
52 #endif /* _WLAN_HDD_DEBUGFS_UNIT_TEST_H */
53