xref: /wlan-dirver/qca-wifi-host-cmn/umac/wifi_pos/inc/wifi_pos_api.h (revision d0c05845839e5f2ba5a8dcebe0cd3e4cd4e8dfcf)
1 /*
2  * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /**
21  * DOC: wifi_pos_api.h
22  * This file declares public APIs of wifi positioning component
23  */
24 #ifndef _WIFI_POS_API_H_
25 #define _WIFI_POS_API_H_
26 
27 /* Include files */
28 #include "wifi_pos_utils_pub.h"
29 #include "wifi_pos_utils_i.h"
30 
31 /* forward reference */
32 struct wlan_objmgr_psoc;
33 struct wifi_pos_driver_caps;
34 
35 /**
36  * enum RTT_FIELD_ID - identifies which field is being specified
37  * @META_DATA_SUB_TYPE: oem data req sub type
38  * @META_DATA_CHANNEL_MHZ: channel mhz info
39  * @META_DATA_PDEV: pdev info
40  */
41 enum RTT_FIELD_ID {
42 	META_DATA_SUB_TYPE,
43 	META_DATA_CHANNEL_MHZ,
44 	META_DATA_PDEV,
45 };
46 
47 /**
48  * struct wifi_pos_field - wifi positioning field element
49  * @id: RTT field id
50  * @offset: data offset in field info buffer
51  * @length: length of related data in field info buffer
52  */
53 struct wifi_pos_field {
54 	uint32_t id;
55 	uint32_t offset;
56 	uint32_t length;
57 };
58 
59 /**
60  * struct wifi_pos_field_info - wifi positioning field info buffer
61  * @count: number of @wifi_pos_field elements
62  * @fields: buffer to hold @wifi_pos_field elements
63  */
64 struct wifi_pos_field_info {
65 	uint32_t count;
66 	struct wifi_pos_field fields[1];
67 };
68 
69 /* Length of interface name */
70 #define INTERFACE_LEN 16
71 /**
72  * struct wifi_pos_interface - wifi positioning interface structure
73  * @length: interface length
74  * @dev_name: device name
75  */
76 struct wifi_pos_interface {
77 	uint8_t length;
78 	char dev_name[INTERFACE_LEN];
79 };
80 
81 #ifdef WIFI_POS_CONVERGED
82 /**
83  * enum oem_err_msg - err msg returned to user space
84  * @OEM_ERR_NULL_CONTEXT: NULL context
85  * @OEM_ERR_APP_NOT_REGISTERED: OEM App is not registered
86  * @OEM_ERR_INVALID_SIGNATURE: Invalid signature
87  * @OEM_ERR_NULL_MESSAGE_HEADER: Invalid message header
88  * @OEM_ERR_INVALID_MESSAGE_TYPE: Invalid message type
89  * @OEM_ERR_INVALID_MESSAGE_LENGTH: Invalid length in message body
90  * @OEM_ERR_REQUEST_REJECTED: Request is rejected by the driver
91  */
92 enum oem_err_msg {
93 	OEM_ERR_NULL_CONTEXT = 1,
94 	OEM_ERR_APP_NOT_REGISTERED,
95 	OEM_ERR_INVALID_SIGNATURE,
96 	OEM_ERR_NULL_MESSAGE_HEADER,
97 	OEM_ERR_INVALID_MESSAGE_TYPE,
98 	OEM_ERR_INVALID_MESSAGE_LENGTH,
99 	OEM_ERR_REQUEST_REJECTED
100 };
101 
102 /* this struct is needed since MLME is not converged yet */
103 struct wifi_pos_ch_info {
104 	uint8_t chan_id;
105 	uint32_t mhz;
106 	uint32_t band_center_freq1;
107 	uint32_t band_center_freq2;
108 	uint32_t info;
109 	uint32_t reg_info_1;
110 	uint32_t reg_info_2;
111 	uint8_t nss;
112 	uint32_t rate_flags;
113 	uint8_t sec_ch_offset;
114 	uint32_t ch_width;
115 };
116 
117 /**
118  * typedef wifi_pos_ch_info_rsp - Channel information
119  * @chan_id: channel id
120  * @reserved0: reserved for padding and future use
121  * @mhz: primary 20 MHz channel frequency in mhz
122  * @band_center_freq1: Center frequency 1 in MHz
123  * @band_center_freq2: Center frequency 2 in MHz, valid only for 11ac
124  *      VHT 80+80 mode
125  * @info: channel info
126  * @reg_info_1: regulatory information field 1 which contains min power,
127  *      max power, reg power and reg class id
128  * @reg_info_2: regulatory information field 2 which contains antennamax
129  */
130 struct qdf_packed wifi_pos_ch_info_rsp {
131 	uint32_t chan_id;
132 	uint32_t reserved0;
133 	uint32_t mhz;
134 	uint32_t band_center_freq1;
135 	uint32_t band_center_freq2;
136 	uint32_t info;
137 	uint32_t reg_info_1;
138 	uint32_t reg_info_2;
139 };
140 
141 /**
142  * struct wifi_pos_peer_status_info - Status information for a given peer
143  * @peer_mac_addr: peer mac address
144  * @peer_status: peer status: 1: CONNECTED, 2: DISCONNECTED
145  * @vdev_id: vdev_id for the peer mac
146  * @peer_capability: peer capability: 0: RTT/RTT2, 1: RTT3. Default is 0
147  * @reserved0: reserved0
148  * @peer_chan_info: channel info on which peer is connected
149  */
150 struct qdf_packed wifi_pos_peer_status_info {
151 	uint8_t peer_mac_addr[ETH_ALEN];
152 	uint8_t peer_status;
153 	uint8_t vdev_id;
154 	uint32_t peer_capability;
155 	uint32_t reserved0;
156 	struct wifi_pos_ch_info_rsp peer_chan_info;
157 };
158 
159 /**
160  * struct wifi_pos_req_msg - wifi pos request struct
161  * @msg_type: message type
162  * @pid: process id
163  * @buf: request buffer
164  * @buf_len: request buffer length
165  * @field_info_buf: buffer containing field info
166  * @field_info_buf_len: length of field info buffer
167  * @rsp_version: nl type or ani type
168  * @interface: contains interface name and length
169  */
170 struct wifi_pos_req_msg {
171 	enum wifi_pos_cmd_ids msg_type;
172 	uint32_t pid;
173 	uint8_t *buf;
174 	uint32_t buf_len;
175 	struct wifi_pos_field_info *field_info_buf;
176 	uint32_t field_info_buf_len;
177 	uint32_t rsp_version;
178 	struct wifi_pos_interface interface;
179 };
180 
181 /**
182  * ucfg_wifi_pos_process_req: ucfg API to be called from HDD/OS_IF to process a
183  * wifi_pos request from userspace
184  * @psoc: pointer to psoc object
185  * @req: wifi_pos request msg
186  * @send_rsp_cb: callback pointer required to send msg to userspace
187  *
188  * Return: status of operation
189  */
190 QDF_STATUS ucfg_wifi_pos_process_req(struct wlan_objmgr_psoc *psoc,
191 				     struct wifi_pos_req_msg *req,
192 				     wifi_pos_send_rsp_handler send_rsp_cb);
193 
194 /**
195  * wifi_pos_init: initializes WIFI POS component, called by dispatcher init
196  *
197  * Return: status of operation
198  */
199 QDF_STATUS wifi_pos_init(void);
200 
201 /**
202  * wifi_pos_deinit: de-initializes WIFI POS component, called by dispatcher init
203  *
204  * Return: status of operation
205  */
206 QDF_STATUS wifi_pos_deinit(void);
207 
208 /**
209  * wifi_pos_psoc_enable: psoc enable API for wifi positioning component
210  * @psoc: pointer to PSOC
211  *
212  * Return: status of operation
213  */
214 QDF_STATUS wifi_pos_psoc_enable(struct wlan_objmgr_psoc *psoc);
215 
216 /**
217  * wifi_pos_psoc_disable: psoc disable API for wifi positioning component
218  * @psoc: pointer to PSOC
219  *
220  * Return: status of operation
221  */
222 QDF_STATUS wifi_pos_psoc_disable(struct wlan_objmgr_psoc *psoc);
223 
224 /**
225  * wifi_pos_set_oem_target_type: public API to set param in wifi_pos private
226  * object
227  * @psoc: pointer to PSOC
228  * @val: value to set
229  *
230  * Return: None
231  */
232 void wifi_pos_set_oem_target_type(struct wlan_objmgr_psoc *psoc, uint32_t val);
233 
234 /**
235  * wifi_pos_set_oem_fw_version: public API to set param in wifi_pos private
236  * object
237  * @psoc: pointer to PSOC
238  * @val: value to set
239  *
240  * Return: None
241  */
242 void wifi_pos_set_oem_fw_version(struct wlan_objmgr_psoc *psoc, uint32_t val);
243 
244 /**
245  * wifi_pos_set_drv_ver_major: public API to set param in wifi_pos private
246  * object
247  * @psoc: pointer to PSOC
248  * @val: value to set
249  *
250  * Return: None
251  */
252 void wifi_pos_set_drv_ver_major(struct wlan_objmgr_psoc *psoc, uint8_t val);
253 
254 /**
255  * wifi_pos_set_drv_ver_minor: public API to set param in wifi_pos private
256  * object
257  * @psoc: pointer to PSOC
258  * @val: value to set
259  *
260  * Return: None
261  */
262 void wifi_pos_set_drv_ver_minor(struct wlan_objmgr_psoc *psoc, uint8_t val);
263 
264 /**
265  * wifi_pos_set_drv_ver_patch: public API to set param in wifi_pos private
266  * object
267  * @psoc: pointer to PSOC
268  * @val: value to set
269  *
270  * Return: None
271  */
272 void wifi_pos_set_drv_ver_patch(struct wlan_objmgr_psoc *psoc, uint8_t val);
273 
274 /**
275  * wifi_pos_set_drv_ver_build: public API to set param in wifi_pos private
276  * object
277  * @psoc: pointer to PSOC
278  * @val: value to set
279  *
280  * Return: None
281  */
282 void wifi_pos_set_drv_ver_build(struct wlan_objmgr_psoc *psoc, uint8_t val);
283 
284 /**
285  * wifi_pos_set_dwell_time_min: public API to set param in wifi_pos private
286  * object
287  * @psoc: pointer to PSOC
288  * @val: value to set
289  *
290  * Return: None
291  */
292 void wifi_pos_set_dwell_time_min(struct wlan_objmgr_psoc *psoc, uint16_t val);
293 
294 /**
295  * wifi_pos_set_dwell_time_max: public API to set param in wifi_pos private
296  * object
297  * @psoc: pointer to PSOC
298  * @val: value to set
299  *
300  * Return: None
301  */
302 void wifi_pos_set_dwell_time_max(struct wlan_objmgr_psoc *psoc, uint16_t val);
303 
304 /**
305  * wifi_pos_set_current_dwell_time_min: public API to set param in wifi_pos
306  * private object
307  * @psoc: pointer to PSOC
308  * @val: value to set
309  *
310  * Return: None
311  */
312 void wifi_pos_set_current_dwell_time_min(struct wlan_objmgr_psoc *psoc,
313 					 uint16_t val);
314 
315 /**
316  * wifi_pos_set_current_dwell_time_max: public API to set param in wifi_pos
317  * private object
318  * @psoc: pointer to PSOC
319  * @val: value to set
320  *
321  * Return: None
322  */
323 void wifi_pos_set_current_dwell_time_max(struct wlan_objmgr_psoc *psoc,
324 					 uint16_t val);
325 
326 /**
327  * wifi_pos_populate_caps() - populate oem capabilities
328  * @psoc: psoc object
329  * @caps: pointer to populate the capabilities
330  *
331  * Return: error code
332  */
333 QDF_STATUS wifi_pos_populate_caps(struct wlan_objmgr_psoc *psoc,
334 			   struct wifi_pos_driver_caps *caps);
335 
336 struct wlan_lmac_if_rx_ops;
337 /**
338  * wifi_pos_register_rx_ops: function to register with lmac rx ops
339  * @rx_ops: lmac rx ops struct object
340  *
341  * Return: None
342  */
343 void wifi_pos_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops);
344 
345 /**
346  * wifi_pos_get_tx_ops: api to get tx ops
347  * @psoc: pointer to psoc object
348  *
349  * Return: tx ops
350  */
351 struct wlan_lmac_if_wifi_pos_tx_ops *
352 wifi_pos_get_tx_ops(struct wlan_objmgr_psoc *psoc);
353 
354 /**
355  * wifi_pos_get_rx_ops: api to get rx ops
356  * @psoc: pointer to psoc object
357  *
358  * Return: rx ops
359  */
360 struct wlan_lmac_if_wifi_pos_rx_ops *
361 wifi_pos_get_rx_ops(struct wlan_objmgr_psoc *psoc);
362 
363 /**
364  * ucfg_wifi_pos_get_ftm_cap: API to get fine timing measurement caps
365  * @psoc: psoc object
366  *
367  * Return: FTM value
368  */
369 uint32_t ucfg_wifi_pos_get_ftm_cap(struct wlan_objmgr_psoc *psoc);
370 
371 /**
372  * ucfg_wifi_pos_set_ftm_cap: API to set fine timing measurement caps
373  * @psoc: psoc object
374  * @val: value to set
375  *
376  * Return: None
377  */
378 void ucfg_wifi_pos_set_ftm_cap(struct wlan_objmgr_psoc *psoc, uint32_t val);
379 
380 /**
381  * ucfg_wifi_pos_set_oem_6g_supported: API to set oem target 6g enabled/disabled
382  * @psoc: psoc object
383  * @val: value to set
384  *
385  * Return: None
386  */
387 void ucfg_wifi_pos_set_oem_6g_supported(struct wlan_objmgr_psoc *psoc,
388 					bool val);
389 
390 /**
391  * ucfg_wifi_pos_is_nl_rsp: API to check if response is nl or ani type
392  * @psoc: psoc object
393  *
394  * Return: true if response is nl type
395  */
396 bool ucfg_wifi_pos_is_nl_rsp(struct wlan_objmgr_psoc *psoc);
397 
398 /**
399  * wifi_pos_get_app_pid: returns oem app pid.
400  * @psoc: pointer to psoc object
401  *
402  * Return: oem app pid
403  */
404 uint32_t wifi_pos_get_app_pid(struct wlan_objmgr_psoc *psoc);
405 
406 /**
407  * wifi_pos_is_app_registered: indicates if oem app is registered.
408  * @psoc: pointer to psoc object
409  *
410  * Return: true if app is registered, false otherwise
411  */
412 bool wifi_pos_is_app_registered(struct wlan_objmgr_psoc *psoc);
413 
414 /**
415  * wifi_pos_get_psoc: API to get global PSOC object
416  *
417  * Since request from userspace is not associated with any vdev/pdev/psoc, this
418  * API is used to get global psoc object.
419  * Return: global psoc object.
420  */
421 struct wlan_objmgr_psoc *wifi_pos_get_psoc(void);
422 
423 /**
424  * wifi_pos_get_legacy_ops() - Get wifi pos legacy ops
425  * @psoc: PSOC pointer
426  *
427  * Return: Pointer to legacy ops
428  */
429 struct wifi_pos_legacy_ops *
430 wifi_pos_get_legacy_ops(struct wlan_objmgr_psoc *psoc);
431 
432 /**
433  * wifi_pos_set_legacy_ops() - Set Wifi Pos legacy ops
434  * @psoc: PSOC pointer
435  * @legacy_ops: Legacy ops
436  *
437  * Return: QDF_STATUS
438  */
439 QDF_STATUS
440 wifi_pos_set_legacy_ops(struct wlan_objmgr_psoc *psoc,
441 			struct wifi_pos_legacy_ops *legacy_ops);
442 #else
443 static inline QDF_STATUS wifi_pos_init(void)
444 {
445 	return QDF_STATUS_SUCCESS;
446 }
447 
448 static inline QDF_STATUS wifi_pos_deinit(void)
449 {
450 	return QDF_STATUS_SUCCESS;
451 }
452 
453 static inline QDF_STATUS wifi_pos_psoc_enable(struct wlan_objmgr_psoc *psoc)
454 {
455 	return QDF_STATUS_SUCCESS;
456 }
457 
458 static inline QDF_STATUS wifi_pos_psoc_disable(struct wlan_objmgr_psoc *psoc)
459 {
460 	return QDF_STATUS_SUCCESS;
461 }
462 #endif
463 
464 #if defined(WLAN_FEATURE_CIF_CFR) && defined(WIFI_POS_CONVERGED)
465 /**
466  * wifi_pos_init_cir_cfr_rings: API to set DMA ring cap in wifi pos psoc private
467  * object
468  * @psoc: pointer to psoc object
469  * @hal_soc: hal soc pointer
470  * @num_mac: number of macs
471  * @buf: buffer containing dma ring cap
472  *
473  * Return: status of operation.
474  */
475 QDF_STATUS wifi_pos_init_cir_cfr_rings(struct wlan_objmgr_psoc *psoc,
476 				   void *hal_soc, uint8_t num_mac, void *buf);
477 #else
478 static inline QDF_STATUS wifi_pos_init_cir_cfr_rings(
479 				struct wlan_objmgr_psoc *psoc,
480 				void *hal_soc, uint8_t num_mac, void *buf)
481 {
482 	return QDF_STATUS_SUCCESS;
483 }
484 #endif
485 
486 /**
487  * wifi_pos_register_get_fw_phy_mode_for_freq_cb: API to register callback
488  * to get current PHY mode
489  * @psoc: pointer to psoc object
490  * @handler: callback to be registered
491  *
492  * Return: QDF_STATUS_SUCCESS in case of success, error codes in
493  * case of failure
494  */
495 QDF_STATUS wifi_pos_register_get_fw_phy_mode_for_freq_cb(
496 			struct wlan_objmgr_psoc *psoc,
497 			void (*handler)(uint32_t, uint32_t, uint32_t *));
498 
499 /**
500  * wifi_pos_register_get_phy_mode_cb: API to register callback to get
501  * current PHY mode
502  * @psoc: pointer to psoc object
503  * @handler: callback to be registered
504  *
505  * Return: QDF_STATUS_SUCCESS in case of success, error codes in
506  * case of failure
507  */
508 QDF_STATUS wifi_pos_register_get_phy_mode_cb(
509 			struct wlan_objmgr_psoc *psoc,
510 			void (*handler)(qdf_freq_t, uint32_t, uint32_t *));
511 
512 /**
513  * wifi_pos_register_send_action: API to register callback to send
514  * action frames
515  * @psoc: pointer to psoc object
516  * @handler: callback to be registered
517  *
518  * Return: QDF_STATUS_SUCCESS in case of success, error codes in
519  * case of failure
520  */
521 QDF_STATUS wifi_pos_register_send_action(
522 				struct wlan_objmgr_psoc *psoc,
523 				void (*handler)(struct wlan_objmgr_psoc *psoc,
524 						uint32_t sub_type,
525 						uint8_t *buf,
526 						uint32_t buf_len));
527 
528 #ifndef CNSS_GENL
529 /**
530  * ucfg_wifi_psoc_get_pdev_id_by_dev_name: ucfg API to get pdev_id and psoc from
531  *                                         devname.
532  * @dev_name: dev name received from LOWI application
533  * @pdev_id: get pdev_id from dev_name
534  * @psoc: get psoc corresponding psoc from dev_name
535  */
536 QDF_STATUS ucfg_wifi_psoc_get_pdev_id_by_dev_name(
537 		char *dev_name, uint8_t *pdev_id,
538 		struct wlan_objmgr_psoc **psoc);
539 
540 /**
541  * wifi_pos_register_get_pdev_id_by_dev_name: API to register callback to get
542  * pdev_id from dev name
543  * @psoc: pointer to global psoc object
544  * @handler: callback to be registered
545  *
546  * Return: QDF_STATUS_SUCCESS in case of success, error codes in
547  * case of failure
548  */
549 QDF_STATUS wifi_pos_register_get_pdev_id_by_dev_name(
550 		struct wlan_objmgr_psoc *psoc,
551 		QDF_STATUS (*handler)(char *dev_name, uint8_t *pdev_id,
552 				      struct wlan_objmgr_psoc **psoc));
553 
554 /**
555  * wifi_pos_register_get_max_fw_phymode_for_channels: API to register callback
556  * to get FW phymode for the given channels.
557  * @psoc:  pointer to global psoc object
558  * @handler: callback to be registered
559  *
560  * Return: QDF_STATUS_SUCCESS in case of success, error codes in case of failure
561  */
562 QDF_STATUS wifi_pos_register_get_max_fw_phymode_for_channels(
563 		struct wlan_objmgr_psoc *psoc,
564 		QDF_STATUS (*handler)(struct wlan_objmgr_pdev *pdev,
565 				      struct wifi_pos_channel_power *chan_list,
566 				      uint16_t wifi_pos_num_chans));
567 #endif /* CNSS_GENL */
568 
569 #if !defined(CNSS_GENL) && defined(WLAN_RTT_MEASUREMENT_NOTIFICATION)
570 /**
571  * ucfg_wifi_pos_measurement_request_notification: ucfg API to notify
572  * measurement request received from the LOWI application
573  * @pdev: Pointer to pdev structure
574  * @req: Pointer to wifi_pos_req_msg structure
575  *
576  * Return: QDF_STATUS_SUCCESS in case of success, error codes in
577  * case of failure
578  */
579 QDF_STATUS ucfg_wifi_pos_measurement_request_notification(
580 		struct wlan_objmgr_pdev *pdev,
581 		struct wifi_pos_req_msg *req);
582 
583 /**
584  * wifi_pos_register_measurement_request_notification: API to register a
585  * callback that needs to be called when the driver receives a measurement
586  * request from the LOWI application.
587  * @psoc: pointer to global psoc object
588  * @handler: callback to be registered
589  *
590  * Return: QDF_STATUS_SUCCESS in case of success, error codes in case of
591  * failure.
592  */
593 QDF_STATUS wifi_pos_register_measurement_request_notification(
594 		struct wlan_objmgr_psoc *psoc,
595 		QDF_STATUS (*handler)(struct wlan_objmgr_pdev *pdev,
596 				      struct rtt_channel_info *chinfo));
597 #else
598 static inline QDF_STATUS ucfg_wifi_pos_measurement_request_notification(
599 		struct wlan_objmgr_pdev *pdev,
600 		struct wifi_pos_req_msg *req)
601 {
602 	return QDF_STATUS_SUCCESS;
603 }
604 
605 static inline QDF_STATUS wifi_pos_register_measurement_request_notification(
606 		struct wlan_objmgr_psoc *psoc,
607 		QDF_STATUS (*handler)(struct wlan_objmgr_pdev *pdev,
608 				      struct rtt_channel_info *chinfo))
609 {
610 	return QDF_STATUS_SUCCESS;
611 }
612 #endif /*!defined(CNSS_GENL) && defined(WLAN_RTT_MEASUREMENT_NOTIFICATION)*/
613 
614 /**
615  * wifi_pos_send_report_resp: Send report to osif
616  * @psoc: pointer to psoc object
617  * @req_id: Request id
618  * @dest_mac: destination mac address
619  * @err_code: Error code to be sent
620  *
621  * Return: QDF_STATUS_SUCCESS in case of success, error codes in
622  * case of failure
623  */
624 QDF_STATUS wifi_pos_send_report_resp(struct wlan_objmgr_psoc *psoc,
625 				     int req_id, uint8_t *dest_mac,
626 				     int err_code);
627 
628 /**
629  * wifi_pos_convert_host_pdev_id_to_target: convert host pdev_id to target
630  * pdev_id
631  * @psoc: pointer to psoc object
632  * @host_pdev_id: host pdev id
633  * @target_pdev_id: target pdev id
634  *
635  * Return: QDF_STATUS_SUCCESS in case of success, error codes in
636  * case of failure
637  */
638 QDF_STATUS wifi_pos_convert_host_pdev_id_to_target(
639 	struct wlan_objmgr_psoc *psoc, uint32_t host_pdev_id,
640 	uint32_t *target_pdev_id);
641 
642 #ifdef WIFI_POS_CONVERGED
643 /**
644  * wifi_pos_get_peer_private_object() - Wifi Pos get peer private object
645  * @peer: Peer object pointer
646  *
647  * Return: Peer private object pointer
648  */
649 struct wlan_wifi_pos_peer_priv_obj *
650 wifi_pos_get_peer_private_object(struct wlan_objmgr_peer *peer);
651 
652 /**
653  * wifi_pos_register_osif_callbacks() - Register OSIF callbacks
654  * @psoc: Pointer to psoc object
655  * @ops: Osif callbacks pointer
656  *
657  * Return: QDF_STATUS
658  */
659 QDF_STATUS
660 wifi_pos_register_osif_callbacks(struct wlan_objmgr_psoc *psoc,
661 				 struct wifi_pos_osif_ops *ops);
662 
663 /**
664  * wifi_pos_get_osif_callbacks() - Get OS IF callbacks
665  * @psoc: Pointer to PSOC object
666  *
667  * Return: struct wifi_pos_osif_ops pointer
668  */
669 struct wifi_pos_osif_ops *
670 wifi_pos_get_osif_callbacks(struct wlan_objmgr_psoc *psoc);
671 #endif /* WIFI_POS_CONVERGED */
672 #endif /* _WIFI_POS_API_H_ */
673