xref: /wlan-dirver/qca-wifi-host-cmn/umac/cmn_services/interface_mgr/inc/wlan_if_mgr_api.h (revision 901120c066e139c7f8a2c8e4820561fdd83c67ef)
1 /*
2  * Copyright (c) 2020-2021, 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 
18 /*
19  * DOC: contains interface manager public api
20  */
21 
22 #ifndef _WLAN_IF_MGR_API_H_
23 #define _WLAN_IF_MGR_API_H_
24 
25 #include "wlan_objmgr_psoc_obj.h"
26 #include "wlan_objmgr_vdev_obj.h"
27 #include "wlan_if_mgr_public_struct.h"
28 
29 #ifdef WLAN_FEATURE_INTERFACE_MGR
30 
31 /**
32  * if_mgr_deliver_event() - interface mgr event handler
33  * @vdev: vdev object
34  * @event: interface manager event
35  * @event_data: Interface mgr event data
36  *
37  * Return: QDF_STATUS
38  */
39 QDF_STATUS if_mgr_deliver_event(struct wlan_objmgr_vdev *vdev,
40 				enum wlan_if_mgr_evt event,
41 				struct if_mgr_event_data *event_data);
42 /**
43  * if_mgr_get_event_str() - get event string
44  * @event: interface manager event
45  *
46  * Return: Interface event string
47  */
48 const char *if_mgr_get_event_str(enum wlan_if_mgr_evt event);
49 
50 /**
51  * if_mgr_deliver_mbss_event() - interface mgr MBSS event handler
52  * @vdev: vdev object
53  * @event: interface manager event
54  * @event_data: Interface mgr event data
55  *
56  * Return: QDF_STATUS
57  */
58 QDF_STATUS if_mgr_deliver_mbss_event(struct wlan_objmgr_vdev *vdev,
59 				     enum wlan_if_mgr_evt event,
60 				     struct if_mgr_event_data *event_data);
61 
62 #else
63 static inline
64 QDF_STATUS if_mgr_deliver_event(struct wlan_objmgr_vdev *vdev,
65 				enum wlan_if_mgr_evt event,
66 				struct if_mgr_event_data *event_data)
67 {
68 	return QDF_STATUS_SUCCESS;
69 }
70 
71 static inline const char *if_mgr_get_event_str(enum wlan_if_mgr_evt event)
72 {
73 	return "";
74 }
75 
76 #endif /* WLAN_FEATURE_INTERFACE_MGR */
77 #endif
78