xref: /wlan-dirver/qca-wifi-host-cmn/os_if/linux/wifi_pos/inc/os_if_wifi_pos_utils.h (revision 5ee6661e575b5422cbb88a7703b46f397b551bd9)
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 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 /**
18  * DOC: os_if_wifi_pos_utils.h
19  * This file provide declaration of wifi_pos's os_if APIs
20  */
21 #ifndef _OS_IF_WIFI_POS_UTILS_H_
22 #define _OS_IF_WIFI_POS_UTILS_H_
23 
24 #include "qdf_types.h"
25 #include "qdf_status.h"
26 #include <wlan_objmgr_cmn.h>
27 #include "wifi_pos_public_struct.h"
28 
29 #if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT)
30 /**
31  * struct wifi_pos_osif_ops - Wifi POS osif callbacks
32  * @osif_initiate_pasn_cb: Callback to initiate PASN authentication
33  */
34 struct wifi_pos_osif_ops {
35 	QDF_STATUS (*osif_initiate_pasn_cb)(struct wlan_objmgr_vdev *vdev,
36 					    struct wlan_pasn_request *pasn_peer,
37 					    uint8_t num_pasn_peers,
38 					    bool is_initiate_pasn);
39 };
40 
41 /**
42  * osif_wifi_pos_register_ops() - Register Wifi-Pos module OS_IF callbacks
43  * @psoc: Pointer to PSOC obj
44  *
45  * Return: QDF_STATUS
46  */
47 QDF_STATUS
48 osif_wifi_pos_register_ops(struct wlan_objmgr_psoc *psoc);
49 
50 /**
51  * osif_wifi_pos_deregister_ops  - Deregister the wifi pos OS_IF callbacks
52  * @psoc: Pointer to PSOC obj
53  *
54  * Return: QDF_STATUS
55  */
56 QDF_STATUS
57 osif_wifi_pos_deregister_ops(struct wlan_objmgr_psoc *psoc);
58 #else
59 static inline QDF_STATUS
60 osif_wifi_pos_register_ops(struct wlan_objmgr_psoc *psoc)
61 {
62 	return QDF_STATUS_SUCCESS;
63 }
64 
65 static inline QDF_STATUS
66 osif_wifi_pos_deregister_ops(struct wlan_objmgr_psoc *psoc)
67 {
68 	return QDF_STATUS_SUCCESS;
69 }
70 #endif /* WIFI_POS_CONVERGED */
71 #endif /* _OS_IF_WIFI_POS_UTILS_H_ */
72