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 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 #ifndef WLAN_HDD_HANG_EVENT_H
18 #define WLAN_HDD_HANG_EVENT_H
19 #include <qdf_hang_event_notifier.h>
20 #include <wlan_hdd_main.h>
21
22 #ifdef WLAN_HANG_EVENT
23 /**
24 * wlan_hdd_hang_event_notifier_register() - HDD hang event notifier register
25 * @hdd_ctx: HDD context
26 *
27 * This function registers hdd layer notifier for the hang event notifier chain.
28 *
29 * Return: QDF_STATUS
30 */
31 QDF_STATUS wlan_hdd_hang_event_notifier_register(struct hdd_context *hdd_ctx);
32 /**
33 * wlan_hdd_hang_event_notifier_unregister() - HDD hang event notifier
34 * unregister
35 *
36 * This function unregisters hdd layer notifier for the hang event notifier
37 * chain.
38 *
39 * Return: QDF_STATUS
40 */
41 QDF_STATUS wlan_hdd_hang_event_notifier_unregister(void);
42 #else
43 static inline
wlan_hdd_hang_event_notifier_register(struct hdd_context * hdd_ctx)44 QDF_STATUS wlan_hdd_hang_event_notifier_register(struct hdd_context *hdd_ctx)
45 {
46 return QDF_STATUS_SUCCESS;
47 }
48
49 static inline
wlan_hdd_hang_event_notifier_unregister(void)50 QDF_STATUS wlan_hdd_hang_event_notifier_unregister(void)
51 {
52 return QDF_STATUS_SUCCESS;
53 }
54 #endif
55 #endif
56