1*5113495bSYour Name /*
2*5113495bSYour Name * Copyright (c) 2020, The Linux Foundation. All rights reserved.
3*5113495bSYour Name *
4*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for any
5*5113495bSYour Name * purpose with or without fee is hereby granted, provided that the above
6*5113495bSYour Name * copyright notice and this permission notice appear in all copies.
7*5113495bSYour Name *
8*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9*5113495bSYour Name * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10*5113495bSYour Name * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11*5113495bSYour Name * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12*5113495bSYour Name * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13*5113495bSYour Name * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14*5113495bSYour Name * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*5113495bSYour Name */
16*5113495bSYour Name #include <i_qdf_notifier.h>
17*5113495bSYour Name #include <qdf_status.h>
18*5113495bSYour Name #include <qdf_notifier.h>
19*5113495bSYour Name
qdf_register_blocking_notifier_chain(qdf_blocking_notif_head * head,qdf_notif_block * qnb)20*5113495bSYour Name QDF_STATUS qdf_register_blocking_notifier_chain(qdf_blocking_notif_head *head,
21*5113495bSYour Name qdf_notif_block *qnb)
22*5113495bSYour Name {
23*5113495bSYour Name int ret;
24*5113495bSYour Name
25*5113495bSYour Name ret = __qdf_register_blocking_notifier_chain(head, &qnb->notif_block);
26*5113495bSYour Name
27*5113495bSYour Name return qdf_status_from_os_return(ret);
28*5113495bSYour Name }
29*5113495bSYour Name
qdf_unregister_blocking_notifier_chain(qdf_blocking_notif_head * head,qdf_notif_block * qnb)30*5113495bSYour Name QDF_STATUS qdf_unregister_blocking_notifier_chain(qdf_blocking_notif_head *head,
31*5113495bSYour Name qdf_notif_block *qnb)
32*5113495bSYour Name {
33*5113495bSYour Name int ret;
34*5113495bSYour Name
35*5113495bSYour Name ret = __qdf_unregister_blocking_notifier_chain(head,
36*5113495bSYour Name &qnb->notif_block);
37*5113495bSYour Name
38*5113495bSYour Name return qdf_status_from_os_return(ret);
39*5113495bSYour Name }
40*5113495bSYour Name
qdf_blocking_notfier_call(qdf_blocking_notif_head * head,unsigned long state,void * data)41*5113495bSYour Name QDF_STATUS qdf_blocking_notfier_call(qdf_blocking_notif_head *head,
42*5113495bSYour Name unsigned long state, void *data)
43*5113495bSYour Name {
44*5113495bSYour Name int ret;
45*5113495bSYour Name
46*5113495bSYour Name ret = __qdf_blocking_notfier_call(head, state, data);
47*5113495bSYour Name
48*5113495bSYour Name return qdf_status_from_os_return(ret);
49*5113495bSYour Name }
50*5113495bSYour Name
qdf_register_atomic_notifier_chain(qdf_atomic_notif_head * head,qdf_notif_block * qnb)51*5113495bSYour Name QDF_STATUS qdf_register_atomic_notifier_chain(qdf_atomic_notif_head *head,
52*5113495bSYour Name qdf_notif_block *qnb)
53*5113495bSYour Name {
54*5113495bSYour Name int ret;
55*5113495bSYour Name
56*5113495bSYour Name ret = __qdf_register_atomic_notifier_chain(head, &qnb->notif_block);
57*5113495bSYour Name
58*5113495bSYour Name return qdf_status_from_os_return(ret);
59*5113495bSYour Name }
60*5113495bSYour Name
qdf_unregister_atomic_notifier_chain(qdf_atomic_notif_head * head,qdf_notif_block * qnb)61*5113495bSYour Name QDF_STATUS qdf_unregister_atomic_notifier_chain(qdf_atomic_notif_head *head,
62*5113495bSYour Name qdf_notif_block *qnb)
63*5113495bSYour Name {
64*5113495bSYour Name int ret;
65*5113495bSYour Name
66*5113495bSYour Name ret = __qdf_unregister_atomic_notifier_chain(head, &qnb->notif_block);
67*5113495bSYour Name
68*5113495bSYour Name return qdf_status_from_os_return(ret);
69*5113495bSYour Name }
70*5113495bSYour Name
qdf_atomic_notfier_call(qdf_atomic_notif_head * head,unsigned long v,void * data)71*5113495bSYour Name QDF_STATUS qdf_atomic_notfier_call(qdf_atomic_notif_head *head,
72*5113495bSYour Name unsigned long v, void *data)
73*5113495bSYour Name {
74*5113495bSYour Name int ret;
75*5113495bSYour Name
76*5113495bSYour Name ret = __qdf_atomic_notifier_call(head, v, data);
77*5113495bSYour Name
78*5113495bSYour Name return qdf_status_from_os_return(ret);
79*5113495bSYour Name }
80