1 /* 2 * Copyright (c) 2018 The Linux Foundation. All rights reserved. 3 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * 6 * Permission to use, copy, modify, and/or distribute this software for 7 * any purpose with or without fee is hereby granted, provided that the 8 * above copyright notice and this permission notice appear in all 9 * copies. 10 * 11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 12 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 13 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 14 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 15 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 16 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 17 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 18 * PERFORMANCE OF THIS SOFTWARE. 19 */ 20 21 /** 22 * DOC: declare the ftm service data structure and apis 23 */ 24 #ifndef _WLAN_FTM_SVC_H_ 25 #define _WLAN_FTM_SVC_H_ 26 27 #include <qdf_types.h> 28 #include <qdf_status.h> 29 #include <wlan_objmgr_pdev_obj.h> 30 31 /** 32 * struct ftm_seg_hdr_info - the segment header for the event from FW 33 * @len: length of the segment header 34 * @msgref: message reference 35 * @segment_info: segment information 36 * @pad: padding 37 * 38 */ 39 struct ftm_seg_hdr_info { 40 uint32_t len; 41 uint32_t msgref; 42 uint32_t segment_info; 43 uint32_t pad; 44 }; 45 46 /** 47 * wlan_ftm_pdev_obj_create_notification() - ftm pdev create handler 48 * @pdev: pdev pointer 49 * @arg_list: argument list 50 * 51 * Return: QDF_STATUS_SUCCESS for success or error code 52 */ 53 QDF_STATUS wlan_ftm_pdev_obj_create_notification(struct wlan_objmgr_pdev *pdev, 54 void *arg_list); 55 56 /** 57 * wlan_ftm_pdev_obj_destroy_notification() - ftm pdev destroy handler 58 * @pdev: pdev pointer 59 * @arg_list: argument list 60 * 61 * Return: QDF_STATUS_SUCCESS for success or error code 62 */ 63 QDF_STATUS wlan_ftm_pdev_obj_destroy_notification(struct wlan_objmgr_pdev *pdev, 64 void *arg_list); 65 66 /** 67 * wlan_ftm_cmd_send() - send ftm command to target_if layer 68 * @pdev: pdev pointer 69 * @buf: data buffer 70 * @len: event length 71 * @pdev_id: pdev id 72 * 73 * Return: QDF_STATUS_SUCCESS for success or error code 74 */ 75 QDF_STATUS wlan_ftm_cmd_send(struct wlan_objmgr_pdev *pdev, uint8_t *buf, 76 uint32_t len, uint8_t pdev_id); 77 78 /** 79 * wlan_ftm_testmode_attach() - Attach FTM UTF handle 80 * @psoc: psoc pointer 81 * 82 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 83 */ 84 QDF_STATUS wlan_ftm_testmode_attach(struct wlan_objmgr_psoc *psoc); 85 86 /** 87 * wlan_ftm_testmode_detach() - Attach FTM UTF handle 88 * @psoc: psoc pointer 89 * 90 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 91 */ 92 QDF_STATUS wlan_ftm_testmode_detach(struct wlan_objmgr_psoc *psoc); 93 #endif /* _WLAN_FTM_SVC_H_ */ 94