1 /* 2 * Copyright (c) 2020, The Linux Foundation. All rights reserved. 3 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 */ 17 18 /** 19 * DOC: Declare various struct, macros which are used for obj mgmt in ftm time 20 * sync. 21 * 22 * Note: This file shall not contain public API's prototype/declarations. 23 * 24 */ 25 26 #ifndef _WLAN_TIME_SYNC_FTM_PUBLIC_STRUCT_H_ 27 #define _WLAN_TIME_SYNC_FTM_PUBLIC_STRUCT_H_ 28 29 struct wlan_objmgr_psoc; 30 31 /** 32 * enum ftm_time_sync_mode - ftm time sync modes 33 * @FTM_TIMESYNC_AGGREGATED_MODE: Ftm time sync aggregated mode 34 * Only one aggregated offset is provided 35 * @FTM_TIMESYNC_BURST_MODE: Ftm time sync burst mode, offset for each FTM 36 * frame is provided 37 */ 38 enum ftm_time_sync_mode { 39 FTM_TIMESYNC_AGGREGATED_MODE, 40 FTM_TIMESYNC_BURST_MODE, 41 }; 42 43 /** 44 * enum ftm_time_sync_role - ftm time sync role 45 * @FTM_TIMESYNC_TARGET_ROLE: Target/STA role 46 * @FTM_TIMESYNC_INITIATOR_ROLE: Initiator/SAP role 47 */ 48 enum ftm_time_sync_role { 49 FTM_TIMESYNC_TARGET_ROLE, 50 FTM_TIMESYNC_INITIATOR_ROLE, 51 }; 52 53 /** 54 * enum ftm_time_sync_sta_state - ftm time sync sta states 55 * @FTM_TIME_SYNC_STA_CONNECTED: STA connected to AP 56 * @FTM_TIME_SYNC_STA_DISCONNECTED: STA disconnected 57 */ 58 enum ftm_time_sync_sta_state { 59 FTM_TIME_SYNC_STA_CONNECTED, 60 FTM_TIME_SYNC_STA_DISCONNECTED, 61 }; 62 63 /** 64 * enum ftm_time_sync_bss_state - ftm time sync bss states 65 * @FTM_TIME_SYNC_BSS_STARTED: BSS started 66 * @FTM_TIME_SYNC_BSS_STOPPED: BSS stopped 67 */ 68 enum ftm_time_sync_bss_state { 69 FTM_TIME_SYNC_BSS_STARTED, 70 FTM_TIME_SYNC_BSS_STOPPED, 71 }; 72 /** 73 * struct wlan_ftm_time_sync_tx_ops - structure of tx operation function 74 * pointers for ftm time_sync component 75 * @ftm_time_sync_send_qtime: send qtime wmi cmd to FW 76 * @ftm_time_sync_send_trigger: send ftm time sync trigger cmd 77 * 78 */ 79 struct wlan_ftm_time_sync_tx_ops { 80 QDF_STATUS (*ftm_time_sync_send_qtime)(struct wlan_objmgr_psoc *psoc, 81 uint32_t vdev_id, 82 uint64_t lpass_ts); 83 QDF_STATUS (*ftm_time_sync_send_trigger)(struct wlan_objmgr_psoc *psoc, 84 uint32_t vdev_id, bool mode); 85 }; 86 87 /** 88 * struct wlan_ftm_time_sync_rx_ops - structure of rx operation function 89 * pointers for ftm time_sync component 90 * @ftm_time_sync_register_start_stop: register ftm time_sync start stop event 91 * @ftm_time_sync_regiser_initiator_target_offset: register initiator target 92 * qtime offset event 93 */ 94 struct wlan_ftm_time_sync_rx_ops { 95 QDF_STATUS (*ftm_time_sync_register_start_stop) 96 (struct wlan_objmgr_psoc *psoc); 97 QDF_STATUS (*ftm_time_sync_regiser_initiator_target_offset) 98 (struct wlan_objmgr_psoc *psoc); 99 }; 100 #endif /*_WLAN_TIME_SYNC_FTM_PUBLIC_STRUCT_H_ */ 101