xref: /wlan-driver/qca-wifi-host-cmn/umac/cmn_services/interface_mgr/inc/wlan_if_mgr_ap.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021, 2023 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 
18 /*
19  * DOC: contains interface manager public file containing AP event handlers
20  */
21 
22 #ifndef _WLAN_IF_MGR_AP_H_
23 #define _WLAN_IF_MGR_AP_H_
24 
25 /**
26  * if_mgr_ap_start_bss() - Start BSS event handler
27  * @vdev: vdev object
28  * @event_data: Interface mgr event data
29  *
30  * Interface manager start bss event handler
31  *
32  * Context: It should run in thread context
33  *
34  * Return: QDF_STATUS
35  */
36 QDF_STATUS
37 if_mgr_ap_start_bss(struct wlan_objmgr_vdev *vdev,
38 		    struct if_mgr_event_data *event_data);
39 
40 /**
41  * if_mgr_ap_start_bss_complete() - Start BSS complete event handler
42  * @vdev: vdev object
43  * @event_data: Interface mgr event data
44  *
45  * Interface manager start bss complete event handler
46  *
47  * Context: It should run in thread context
48  *
49  * Return: QDF_STATUS
50  */
51 QDF_STATUS
52 if_mgr_ap_start_bss_complete(struct wlan_objmgr_vdev *vdev,
53 			     struct if_mgr_event_data *event_data);
54 
55 /**
56  * if_mgr_ap_stop_bss() - Stop BSS event handler
57  * @vdev: vdev object
58  * @event_data: Interface mgr event data
59  *
60  * Interface manager stop bss event handler
61  *
62  * Context: It should run in thread context
63  *
64  * Return: QDF_STATUS
65  */
66 QDF_STATUS
67 if_mgr_ap_stop_bss(struct wlan_objmgr_vdev *vdev,
68 		   struct if_mgr_event_data *event_data);
69 
70 /**
71  * if_mgr_ap_stop_bss_complete() - Stop BSS event complete handler
72  * @vdev: vdev object
73  * @event_data: Interface mgr event data
74  *
75  * Interface manager stop bss complete event handler
76  *
77  * Context: It should run in thread context
78  *
79  * Return: QDF_STATUS
80  */
81 QDF_STATUS
82 if_mgr_ap_stop_bss_complete(struct wlan_objmgr_vdev *vdev,
83 			    struct if_mgr_event_data *event_data);
84 /**
85  * if_mgr_ap_csa_complete() - CSA event complete handler
86  * @vdev: vdev object
87  * @event_data: Interface mgr event data
88  *
89  * Interface manager csa complete event handler
90  *
91  * Context: It should run in thread context
92  *
93  * Return: QDF_STATUS
94  */
95 QDF_STATUS
96 if_mgr_ap_csa_complete(struct wlan_objmgr_vdev *vdev,
97 		       struct if_mgr_event_data *event_data);
98 
99 /**
100  * if_mgr_ap_csa_start() - CSA start handler for SAP/P2P_GO
101  * @vdev: Pointer to vdev object
102  * @event_data: Interface manager event data
103  *
104  * Return: QDF_STATUS
105  */
106 QDF_STATUS if_mgr_ap_csa_start(struct wlan_objmgr_vdev *vdev,
107 			       struct if_mgr_event_data *event_data);
108 
109 #if defined WLAN_MBSS
110 /**
111  * if_mgr_ap_start_acs() - ACS start event handler
112  * @vdev: vdev object
113  * @event_data: Interface mgr event data
114  *
115  * This function handles the ACS start event for interface
116  * manager
117  *
118  * Context: It can run in process/tasklet context
119  *
120  * Return: QDF_STATUS
121  */
122 QDF_STATUS if_mgr_ap_start_acs(struct wlan_objmgr_vdev *vdev,
123 			    struct if_mgr_event_data *event_data);
124 
125 /**
126  * if_mgr_ap_stop_acs() - ACS stop event handler
127  * @vdev: vdev object
128  * @event_data: Interface mgr event data
129  *
130  * This function handles the ACS stop event for interface
131  * manager
132  *
133  * Context: It can run in process/tasklet context
134  *
135  * Return: QDF_STATUS
136  */
137 QDF_STATUS if_mgr_ap_stop_acs(struct wlan_objmgr_vdev *vdev,
138 			      struct if_mgr_event_data *event_data);
139 
140 /**
141  * if_mgr_ap_done_acs() - ACS done event handler
142  * @vdev: vdev object
143  * @event_data: Interface mgr event data
144  *
145  * This function handles the ACS stop event for interface
146  * manager
147  *
148  * Context: It can run in process/tasklet context
149  *
150  * Return: QDF_STATUS
151  */
152 QDF_STATUS if_mgr_ap_done_acs(struct wlan_objmgr_vdev *vdev,
153 			      struct if_mgr_event_data *event_data);
154 
155 /**
156  * if_mgr_ap_cancel_acs() - ACS cancel event handler
157  * @vdev: vdev object
158  * @event_data: Interface mgr event data
159  *
160  * This function handles the ACS cancel event for interface
161  * manager
162  *
163  * Context: It can run in process/tasklet context
164  *
165  * Return: QDF_STATUS
166  */
167 QDF_STATUS if_mgr_ap_cancel_acs(struct wlan_objmgr_vdev *vdev,
168 				struct if_mgr_event_data *event_data);
169 
170 /**
171  * if_mgr_ap_start_ht40() - HT40 scan start event handler
172  * @vdev: vdev object
173  * @event_data: Interface mgr event data
174  *
175  * This function handles the HT40 scan start event for interface
176  * manager
177  *
178  * Context: It can run in process/tasklet context
179  *
180  * Return: QDF_STATUS
181  */
182 QDF_STATUS if_mgr_ap_start_ht40(struct wlan_objmgr_vdev *vdev,
183 				struct if_mgr_event_data *event_data);
184 
185 /**
186  * if_mgr_ap_stop_ht40() - HT40 scan stop event handler
187  * @vdev: vdev object
188  * @event_data: Interface mgr event data
189  *
190  * This function handles the HT40 scan stop event for interface
191  * manager
192  *
193  * Context: It can run in process/tasklet context
194  *
195  * Return: QDF_STATUS
196  */
197 QDF_STATUS if_mgr_ap_stop_ht40(struct wlan_objmgr_vdev *vdev,
198 			       struct if_mgr_event_data *event_data);
199 
200 /**
201  * if_mgr_ap_done_ht40() - HT40 scan done event handler
202  * @vdev: vdev object
203  * @event_data: Interface mgr event data
204  *
205  * This function handles the HT40 scan done event for interface
206  * manager
207  *
208  * Context: It can run in process/tasklet context
209  *
210  * Return: QDF_STATUS
211  */
212 QDF_STATUS if_mgr_ap_done_ht40(struct wlan_objmgr_vdev *vdev,
213 			       struct if_mgr_event_data *event_data);
214 
215 /**
216  * if_mgr_ap_cancel_ht40() - HT40 scan cancel event handler
217  * @vdev: vdev object
218  * @event_data: Interface mgr event data
219  *
220  * This function handles the HT40 scan cancel event for interface
221  * manager
222  *
223  * Context: It can run in process/tasklet context
224  *
225  * Return: QDF_STATUS
226  */
227 QDF_STATUS if_mgr_ap_cancel_ht40(struct wlan_objmgr_vdev *vdev,
228 				 struct if_mgr_event_data *event_data);
229 #else
230 static inline QDF_STATUS
if_mgr_ap_start_acs(struct wlan_objmgr_vdev * vdev,struct if_mgr_event_data * event_data)231 if_mgr_ap_start_acs(struct wlan_objmgr_vdev *vdev,
232 		    struct if_mgr_event_data *event_data)
233 {
234 	return QDF_STATUS_SUCCESS;
235 }
236 
237 static inline QDF_STATUS
if_mgr_ap_stop_acs(struct wlan_objmgr_vdev * vdev,struct if_mgr_event_data * event_data)238 if_mgr_ap_stop_acs(struct wlan_objmgr_vdev *vdev,
239 		   struct if_mgr_event_data *event_data)
240 {
241 	return QDF_STATUS_SUCCESS;
242 }
243 
244 static inline QDF_STATUS
if_mgr_ap_cancel_acs(struct wlan_objmgr_vdev * vdev,struct if_mgr_event_data * event_data)245 if_mgr_ap_cancel_acs(struct wlan_objmgr_vdev *vdev,
246 		     struct if_mgr_event_data *event_data)
247 {
248 	return QDF_STATUS_SUCCESS;
249 }
250 
251 static inline QDF_STATUS
if_mgr_ap_start_ht40(struct wlan_objmgr_vdev * vdev,struct if_mgr_event_data * event_data)252 if_mgr_ap_start_ht40(struct wlan_objmgr_vdev *vdev,
253 		     struct if_mgr_event_data *event_data)
254 {
255 	return QDF_STATUS_SUCCESS;
256 }
257 
258 static inline QDF_STATUS
if_mgr_ap_stop_ht40(struct wlan_objmgr_vdev * vdev,struct if_mgr_event_data * event_data)259 if_mgr_ap_stop_ht40(struct wlan_objmgr_vdev *vdev,
260 		    struct if_mgr_event_data *event_data)
261 {
262 	return QDF_STATUS_SUCCESS;
263 }
264 
265 static inline QDF_STATUS
if_mgr_ap_done_ht40(struct wlan_objmgr_vdev * vdev,struct if_mgr_event_data * event_data)266 if_mgr_ap_done_ht40(struct wlan_objmgr_vdev *vdev,
267 		    struct if_mgr_event_data *event_data)
268 {
269 	return QDF_STATUS_SUCCESS;
270 }
271 
272 static inline QDF_STATUS
if_mgr_ap_cancel_ht40(struct wlan_objmgr_vdev * vdev,struct if_mgr_event_data * event_data)273 if_mgr_ap_cancel_ht40(struct wlan_objmgr_vdev *vdev,
274 		      struct if_mgr_event_data *event_data)
275 {
276 	return QDF_STATUS_SUCCESS;
277 }
278 #endif /* WLAN_MBSS */
279 #endif /* _WLAN_IF_MGR_AP_H_ */
280 
281