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 any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 /**
17  * DOC: declare WIFI POS interface APIs exposed by the mlme component
18  */
19 
20 #ifndef _WLAN_WIFI_POS_IFACE_API_H_
21 #define _WLAN_WIFI_POS_IFACE_API_H_
22 
23 #include <wlan_objmgr_vdev_obj.h>
24 #include "lim_types.h"
25 #include "wifi_pos_pasn_api.h"
26 
27 #if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT)
28 /**
29  * wlan_wifi_pos_pasn_peer_delete_all  - Delete all pasn peer callback
30  * @psoc: Psoc pointer
31  * @vdev_id: vdev for which PASN peers are to be deleted
32  *
33  * Return: True if PASN peer delete all is required
34  */
35 bool wlan_wifi_pos_pasn_peer_delete_all(struct wlan_objmgr_psoc *psoc,
36 					uint8_t vdev_id);
37 
38 /**
39  * wifi_pos_register_legacy_ops() - Register wifi pos legacy callbacks
40  * @psoc: Psoc pointer
41  *
42  * Return: QDF_STATUS
43  */
44 QDF_STATUS
45 wifi_pos_register_legacy_ops(struct wlan_objmgr_psoc *psoc);
46 
47 /**
48  * wifi_pos_deregister_legacy_ops() - Deregister wifi pos legacy callbacks
49  * @psoc: Psoc pointer
50  *
51  * Return: QDF_STATUS
52  */
53 QDF_STATUS
54 wifi_pos_deregister_legacy_ops(struct wlan_objmgr_psoc *psoc);
55 #else
56 static inline QDF_STATUS
wifi_pos_register_legacy_ops(struct wlan_objmgr_psoc * psoc)57 wifi_pos_register_legacy_ops(struct wlan_objmgr_psoc *psoc)
58 {
59 	return QDF_STATUS_SUCCESS;
60 }
61 
62 static inline QDF_STATUS
wifi_pos_deregister_legacy_ops(struct wlan_objmgr_psoc * psoc)63 wifi_pos_deregister_legacy_ops(struct wlan_objmgr_psoc *psoc)
64 {
65 	return QDF_STATUS_SUCCESS;
66 }
67 
68 static inline bool
wlan_wifi_pos_pasn_peer_delete_all(struct wlan_objmgr_psoc * psoc,uint8_t vdev_id)69 wlan_wifi_pos_pasn_peer_delete_all(struct wlan_objmgr_psoc *psoc,
70 				   uint8_t vdev_id)
71 {
72 	return false;
73 }
74 #endif
75 #endif /* _WLAN_WIFI_POS_IFACE_API_H_ */
76