1 /* 2 * Copyright (c) 2018 The Linux Foundation. All rights reserved. 3 * 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: declare the ftm service data structure and apis 22 */ 23 #ifndef _WLAN_FTM_SVC_H_ 24 #define _WLAN_FTM_SVC_H_ 25 26 #include <qdf_types.h> 27 #include <qdf_status.h> 28 #include <wlan_objmgr_pdev_obj.h> 29 30 /** 31 * struct ftm_seg_hdr_info - the segment header for the event from FW 32 * @len: length of the segment header 33 * @msgref: message reference 34 * @segment_info: segment information 35 * @pad: padding 36 * 37 */ 38 struct ftm_seg_hdr_info { 39 uint32_t len; 40 uint32_t msgref; 41 uint32_t segment_info; 42 uint32_t pad; 43 }; 44 45 /** 46 * wlan_ftm_pdev_obj_create_notification() - ftm pdev create handler 47 * @pdev: pdev pointer 48 * @arg_list: argument list 49 * 50 * return: QDF_STATUS_SUCCESS for success or error code 51 */ 52 QDF_STATUS wlan_ftm_pdev_obj_create_notification(struct wlan_objmgr_pdev *pdev, 53 void *arg_list); 54 55 /** 56 * wlan_ftm_pdev_obj_destroy_notification() - ftm pdev destroy handler 57 * @pdev: pdev pointer 58 * @arg_list: argument list 59 * 60 * return: QDF_STATUS_SUCCESS for success or error code 61 */ 62 QDF_STATUS wlan_ftm_pdev_obj_destroy_notification(struct wlan_objmgr_pdev *pdev, 63 void *arg_list); 64 65 /** 66 * wlan_ftm_cmd_send() - send ftm command to target_if layer 67 * @pdev: pdev pointer 68 * @buf: data buffer 69 * @len: event length 70 * 71 * return: QDF_STATUS_SUCCESS for success or error code 72 */ 73 QDF_STATUS wlan_ftm_cmd_send(struct wlan_objmgr_pdev *pdev, uint8_t *buf, 74 uint32_t len, uint8_t pdev_id); 75 76 /** 77 * wlan_ftm_testmode_attach() - Attach FTM UTF handle 78 * @psoc: psoc pointer 79 * 80 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 81 */ 82 QDF_STATUS wlan_ftm_testmode_attach(struct wlan_objmgr_psoc *psoc); 83 84 /** 85 * wlan_ftm_testmode_detach() - Attach FTM UTF handle 86 * @psoc: psoc pointer 87 * 88 * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error 89 */ 90 QDF_STATUS wlan_ftm_testmode_detach(struct wlan_objmgr_psoc *psoc); 91 #endif /* _WLAN_FTM_SVC_H_ */ 92