xref: /wlan-driver/qcacld-3.0/os_if/twt/inc/osif_twt_ext_rsp.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2022 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_ext_rsp.h
21  *
22  * WLAN Host Device Driver file for TWT (Target Wake Time) support.
23  *
24  */
25 
26 #ifndef _OSIF_TWT_EXT_RSP_H_
27 #define _OSIF_TWT_EXT_RSP_H_
28 
29 #include <wlan_osif_request_manager.h>
30 
31 #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
32 /**
33  * osif_twt_setup_complete_cb() - setup complete osif callback
34  * @psoc: psoc pointer
35  * @event: setup complete response
36  * @renego_fail: flag to indicate if renegotiation failure case
37  *
38  * Return: QDF_STATUS
39  */
40 QDF_STATUS
41 osif_twt_setup_complete_cb(struct wlan_objmgr_psoc *psoc,
42 			   struct twt_add_dialog_complete_event *event,
43 			   bool renego_fail);
44 
45 /**
46  * osif_twt_teardown_complete_cb() - teardown complete osif callback
47  * @psoc: psoc pointer
48  * @event: teardown complete response
49  *
50  * Return: QDF_STATUS
51  */
52 QDF_STATUS
53 osif_twt_teardown_complete_cb(struct wlan_objmgr_psoc *psoc,
54 			     struct twt_del_dialog_complete_event_param *event);
55 
56 /**
57  * osif_twt_pause_complete_cb() - pause complete osif callback
58  * @psoc: psoc pointer
59  * @event: pause complete response
60  *
61  * Return: QDF_STATUS
62  */
63 QDF_STATUS
64 osif_twt_pause_complete_cb(struct wlan_objmgr_psoc *psoc,
65 			   struct twt_pause_dialog_complete_event_param *event);
66 
67 /**
68  * osif_twt_resume_complete_cb() - resume complete osif callback
69  * @psoc: psoc pointer
70  * @event: resume complete response
71  *
72  * Return: QDF_STATUS
73  */
74 QDF_STATUS
75 osif_twt_resume_complete_cb(struct wlan_objmgr_psoc *psoc,
76 			  struct twt_resume_dialog_complete_event_param *event);
77 
78 /**
79  * osif_twt_nudge_complete_cb() - nudge complete osif callback
80  * @psoc: psoc pointer
81  * @event: nudge complete response
82  *
83  * Return: QDF_STATUS
84  */
85 QDF_STATUS
86 osif_twt_nudge_complete_cb(struct wlan_objmgr_psoc *psoc,
87 			   struct twt_nudge_dialog_complete_event_param *event);
88 
89 /**
90  * osif_twt_notify_complete_cb() - notify complete osif callback
91  * @psoc: psoc pointer
92  * @event: notify complete response
93  *
94  * Return: QDF_STATUS
95  */
96 QDF_STATUS
97 osif_twt_notify_complete_cb(struct wlan_objmgr_psoc *psoc,
98 			    struct twt_notify_event_param *event);
99 
100 /**
101  * osif_twt_ack_complete_cb() - ack complete osif callback
102  * @psoc: psoc pointer
103  * @params: ack complete response
104  * @context: context
105  *
106  * Return: QDF_STATUS
107  */
108 QDF_STATUS
109 osif_twt_ack_complete_cb(struct wlan_objmgr_psoc *psoc,
110 			 struct twt_ack_complete_event_param *params,
111 			 void *context);
112 
113 #else
114 static inline QDF_STATUS
osif_twt_setup_complete_cb(struct wlan_objmgr_psoc * psoc,struct twt_add_dialog_complete_event * event,bool renego_fail)115 osif_twt_setup_complete_cb(struct wlan_objmgr_psoc *psoc,
116 			   struct twt_add_dialog_complete_event *event,
117 			   bool renego_fail)
118 {
119 	return QDF_STATUS_SUCCESS;
120 }
121 
122 static inline QDF_STATUS
osif_twt_teardown_complete_cb(struct wlan_objmgr_psoc * psoc,struct twt_del_dialog_complete_event_param * event)123 osif_twt_teardown_complete_cb(struct wlan_objmgr_psoc *psoc,
124 			      struct twt_del_dialog_complete_event_param *event)
125 {
126 	return QDF_STATUS_SUCCESS;
127 }
128 
129 static inline QDF_STATUS
osif_twt_pause_complete_cb(struct wlan_objmgr_psoc * psoc,struct twt_pause_dialog_complete_event_param * event)130 osif_twt_pause_complete_cb(struct wlan_objmgr_psoc *psoc,
131 			   struct twt_pause_dialog_complete_event_param *event)
132 {
133 	return QDF_STATUS_SUCCESS;
134 }
135 
136 static inline QDF_STATUS
osif_twt_resume_complete_cb(struct wlan_objmgr_psoc * psoc,struct twt_resume_dialog_complete_event_param * event)137 osif_twt_resume_complete_cb(struct wlan_objmgr_psoc *psoc,
138 			   struct twt_resume_dialog_complete_event_param *event)
139 {
140 	return QDF_STATUS_SUCCESS;
141 }
142 
143 static inline QDF_STATUS
osif_twt_nudge_complete_cb(struct wlan_objmgr_psoc * psoc,struct twt_nudge_dialog_complete_event_param * event)144 osif_twt_nudge_complete_cb(struct wlan_objmgr_psoc *psoc,
145 			   struct twt_nudge_dialog_complete_event_param *event)
146 {
147 	return QDF_STATUS_SUCCESS;
148 }
149 
150 static inline QDF_STATUS
osif_twt_notify_complete_cb(struct wlan_objmgr_psoc * psoc,struct twt_notify_event_param * event)151 osif_twt_notify_complete_cb(struct wlan_objmgr_psoc *psoc,
152 			    struct twt_notify_event_param *event)
153 {
154 	return QDF_STATUS_SUCCESS;
155 }
156 
157 static inline QDF_STATUS
osif_twt_ack_complete_cb(struct wlan_objmgr_psoc * psoc,struct twt_ack_complete_event_param * params,void * context)158 osif_twt_ack_complete_cb(struct wlan_objmgr_psoc *psoc,
159 			 struct twt_ack_complete_event_param *params,
160 			 void *context)
161 {
162 	return QDF_STATUS_SUCCESS;
163 }
164 
165 #endif
166 #endif /* _OSIF_TWT_RSP_H_ */
167 
168