1 /*
2 * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for
5 * any purpose with or without fee is hereby granted, provided that the
6 * above copyright notice and this permission notice appear in all
7 * copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 * PERFORMANCE OF THIS SOFTWARE.
17 */
18
19 /**
20 * DOC: osif_twt_req.h
21 *
22 */
23
24 #ifndef _OSIF_TWT_REQ_H_
25 #define _OSIF_TWT_REQ_H_
26
27 #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
28 #include <wlan_objmgr_psoc_obj.h>
29 #include <wlan_twt_public_structs.h>
30
31 /**
32 * osif_twt_requestor_enable() - TWT requestor enable api
33 * @psoc: psoc handle
34 * @req: TWT enable request
35 *
36 * Return: 0 on success, errno on failure
37 */
38 int osif_twt_requestor_enable(struct wlan_objmgr_psoc *psoc,
39 struct twt_enable_param *req);
40
41 /**
42 * osif_twt_responder_enable() - TWT responder enable api
43 * @psoc: psoc handle
44 * @req: TWT enable request
45 *
46 * Return: 0 on success, errno on failure
47 */
48 int osif_twt_responder_enable(struct wlan_objmgr_psoc *psoc,
49 struct twt_enable_param *req);
50
51 /**
52 * osif_twt_requestor_disable() - TWT requestor disable api
53 * @psoc: psoc handle
54 * @req: TWT disable request
55 *
56 * Return: 0 on success, errno on failure
57 */
58 int osif_twt_requestor_disable(struct wlan_objmgr_psoc *psoc,
59 struct twt_disable_param *req);
60
61 /**
62 * osif_twt_responder_disable() - TWT responder disable api
63 * @psoc: psoc handle
64 * @req: TWT disable request
65 *
66 * Return: 0 on success, errno on failure
67 */
68 int osif_twt_responder_disable(struct wlan_objmgr_psoc *psoc,
69 struct twt_disable_param *req);
70 #else
71 static inline
osif_twt_requestor_enable(struct wlan_objmgr_psoc * psoc,struct twt_enable_param * req)72 int osif_twt_requestor_enable(struct wlan_objmgr_psoc *psoc,
73 struct twt_enable_param *req)
74 {
75 return 0;
76 }
77
78 static inline
osif_twt_responder_enable(struct wlan_objmgr_psoc * psoc,struct twt_enable_param * req)79 int osif_twt_responder_enable(struct wlan_objmgr_psoc *psoc,
80 struct twt_enable_param *req)
81 {
82 return 0;
83 }
84
85 static inline
osif_twt_requestor_disable(struct wlan_objmgr_psoc * psoc,struct twt_disable_param * req)86 int osif_twt_requestor_disable(struct wlan_objmgr_psoc *psoc,
87 struct twt_disable_param *req)
88 {
89 return 0;
90 }
91
92 static inline
osif_twt_responder_disable(struct wlan_objmgr_psoc * psoc,struct twt_disable_param * req)93 int osif_twt_responder_disable(struct wlan_objmgr_psoc *psoc,
94 struct twt_disable_param *req)
95 {
96 return 0;
97 }
98 #endif
99 #endif /* _OSIF_TWT_REQ_H_ */
100
101