1*5113495bSYour Name /*
2*5113495bSYour Name * Copyright (c) 2017, 2019-2020 The Linux Foundation. All rights reserved.
3*5113495bSYour Name * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name *
5*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for
6*5113495bSYour Name * any purpose with or without fee is hereby granted, provided that the
7*5113495bSYour Name * above copyright notice and this permission notice appear in all
8*5113495bSYour Name * copies.
9*5113495bSYour Name *
10*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11*5113495bSYour Name * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12*5113495bSYour Name * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13*5113495bSYour Name * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14*5113495bSYour Name * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15*5113495bSYour Name * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16*5113495bSYour Name * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17*5113495bSYour Name * PERFORMANCE OF THIS SOFTWARE.
18*5113495bSYour Name */
19*5113495bSYour Name
20*5113495bSYour Name /**
21*5113495bSYour Name * DOC: wifi_pos_main_i.h
22*5113495bSYour Name * This file prototyps the important functions pertinent to wifi positioning
23*5113495bSYour Name * component.
24*5113495bSYour Name */
25*5113495bSYour Name
26*5113495bSYour Name #ifndef _WIFI_POS_MAIN_H_
27*5113495bSYour Name #define _WIFI_POS_MAIN_H_
28*5113495bSYour Name
29*5113495bSYour Name #ifdef CNSS_GENL
30*5113495bSYour Name #define ENHNC_FLAGS_LEN 4
31*5113495bSYour Name #define NL_ENABLE_OEM_REQ_RSP 0x00000001
32*5113495bSYour Name #endif
33*5113495bSYour Name
34*5113495bSYour Name /* forward reference */
35*5113495bSYour Name struct wlan_objmgr_psoc;
36*5113495bSYour Name
37*5113495bSYour Name #if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT)
38*5113495bSYour Name /**
39*5113495bSYour Name * wifi_pos_init_11az_context - Initialize 11az context
40*5113495bSYour Name * @vdev_pos_obj: Vdev private object of WIFI Pos component
41*5113495bSYour Name *
42*5113495bSYour Name * Return: None
43*5113495bSYour Name */
44*5113495bSYour Name void
45*5113495bSYour Name wifi_pos_init_11az_context(struct wifi_pos_vdev_priv_obj *vdev_pos_obj);
46*5113495bSYour Name #else
47*5113495bSYour Name static inline void
wifi_pos_init_11az_context(struct wifi_pos_vdev_priv_obj * vdev_pos_obj)48*5113495bSYour Name wifi_pos_init_11az_context(struct wifi_pos_vdev_priv_obj *vdev_pos_obj)
49*5113495bSYour Name {}
50*5113495bSYour Name #endif
51*5113495bSYour Name
52*5113495bSYour Name /**
53*5113495bSYour Name * wifi_pos_psoc_obj_created_notification: callback registered to be called when
54*5113495bSYour Name * psoc object is created.
55*5113495bSYour Name * @psoc: pointer to psoc object just created
56*5113495bSYour Name * @arg_list: argument list
57*5113495bSYour Name *
58*5113495bSYour Name * This function will:
59*5113495bSYour Name * create WIFI POS psoc object and attach to psoc
60*5113495bSYour Name * register TLV vs nonTLV callbacks
61*5113495bSYour Name * Return: status of operation
62*5113495bSYour Name */
63*5113495bSYour Name QDF_STATUS wifi_pos_psoc_obj_created_notification(
64*5113495bSYour Name struct wlan_objmgr_psoc *psoc, void *arg_list);
65*5113495bSYour Name
66*5113495bSYour Name /**
67*5113495bSYour Name * wifi_pos_psoc_obj_destroyed_notification: callback registered to be called
68*5113495bSYour Name * when psoc object is destroyed.
69*5113495bSYour Name * @psoc: pointer to psoc object just about to be destroyed
70*5113495bSYour Name * @arg_list: argument list
71*5113495bSYour Name *
72*5113495bSYour Name * This function will:
73*5113495bSYour Name * detach WIFI POS from psoc object and free
74*5113495bSYour Name * Return: status of operation
75*5113495bSYour Name */
76*5113495bSYour Name QDF_STATUS wifi_pos_psoc_obj_destroyed_notification(
77*5113495bSYour Name struct wlan_objmgr_psoc *psoc, void *arg_list);
78*5113495bSYour Name
79*5113495bSYour Name /**
80*5113495bSYour Name * wifi_pos_vdev_created_notification() - Vdev created notification callback
81*5113495bSYour Name * @vdev: Vdev object
82*5113495bSYour Name * @arg_list: argument list
83*5113495bSYour Name *
84*5113495bSYour Name * Return: QDF_STATUS
85*5113495bSYour Name */
86*5113495bSYour Name QDF_STATUS
87*5113495bSYour Name wifi_pos_vdev_created_notification(struct wlan_objmgr_vdev *vdev,
88*5113495bSYour Name void *arg_list);
89*5113495bSYour Name
90*5113495bSYour Name /**
91*5113495bSYour Name * wifi_pos_vdev_destroyed_notification() - Wifi Pos vdev destroyed callback
92*5113495bSYour Name * @vdev: Vdev object
93*5113495bSYour Name * @arg_list: argument list
94*5113495bSYour Name *
95*5113495bSYour Name * This function will detach the Wifi Pos vdev private object and free it
96*5113495bSYour Name *
97*5113495bSYour Name * Return: QDF_STATUS
98*5113495bSYour Name */
99*5113495bSYour Name QDF_STATUS
100*5113495bSYour Name wifi_pos_vdev_destroyed_notification(struct wlan_objmgr_vdev *vdev,
101*5113495bSYour Name void *arg_list);
102*5113495bSYour Name
103*5113495bSYour Name /**
104*5113495bSYour Name * wifi_pos_peer_object_created_notification() - Handle peer object created
105*5113495bSYour Name * notification.
106*5113495bSYour Name * @peer: Objmgr peer
107*5113495bSYour Name * @arg: Argument
108*5113495bSYour Name *
109*5113495bSYour Name * Return: QDF_STATUS
110*5113495bSYour Name */
111*5113495bSYour Name QDF_STATUS
112*5113495bSYour Name wifi_pos_peer_object_created_notification(struct wlan_objmgr_peer *peer,
113*5113495bSYour Name void *arg);
114*5113495bSYour Name
115*5113495bSYour Name /**
116*5113495bSYour Name * wifi_pos_peer_object_destroyed_notification() - Handler for peer object
117*5113495bSYour Name * deleted notification
118*5113495bSYour Name * @peer: Objmgr peer
119*5113495bSYour Name * @arg: Argument
120*5113495bSYour Name *
121*5113495bSYour Name * Return: QDF_STATUS
122*5113495bSYour Name */
123*5113495bSYour Name QDF_STATUS
124*5113495bSYour Name wifi_pos_peer_object_destroyed_notification(struct wlan_objmgr_peer *peer,
125*5113495bSYour Name void *arg);
126*5113495bSYour Name
127*5113495bSYour Name /**
128*5113495bSYour Name * wifi_pos_oem_rsp_handler: lmac rx ops registered
129*5113495bSYour Name * @psoc: pointer to psoc object
130*5113495bSYour Name * @oem_rsp: response from firmware
131*5113495bSYour Name *
132*5113495bSYour Name * Return: status of operation
133*5113495bSYour Name */
134*5113495bSYour Name int wifi_pos_oem_rsp_handler(struct wlan_objmgr_psoc *psoc,
135*5113495bSYour Name struct oem_data_rsp *oem_rsp);
136*5113495bSYour Name #endif
137