qcacld-3.0: Add ini for FTM time sync component
Add ini config required for FTM time sync feature. "enable_time_sync_ftm"- ini to enable/disable the feature. "time_sync_ftm_mode" - ini to configure the burst/aggregated mode. In burst mode the offset derived for each RTT frame is sent by firmware, in aggregated mode only one offset is sent by firmware. "time_sync_ftm_role" - ini to configure slave(STA)/master(SAP) role. Change-Id: I6a06d6fdc4c7556c32ab2d28f1cbaa936b98a85b CRs-Fixed: 2618654
This commit is contained in:

committed by
nshrivas

parent
639c7cc44a
commit
492308b08f
96
components/ftm_time_sync/dispatcher/inc/cfg_ftm_time_sync.h
Normal file
96
components/ftm_time_sync/dispatcher/inc/cfg_ftm_time_sync.h
Normal file
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#if !defined(__FTM_TIME_SYNC_CFG_H__)
|
||||
#define __FTM_TIME_SYNC_CFG_H__
|
||||
|
||||
/**
|
||||
*
|
||||
* DOC: ftm_time_sync_cfg.h
|
||||
*
|
||||
* FTM TIME SYNC feature INI configuration parameter definitions
|
||||
*/
|
||||
|
||||
#ifdef FEATURE_WLAN_TIME_SYNC_FTM
|
||||
|
||||
#include "cfg_define.h"
|
||||
#include "cfg_converged.h"
|
||||
#include "qdf_types.h"
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* enable_time_sync_ftm - Time Sync FTM feature support
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 0
|
||||
*
|
||||
* When set to 1 Time Sync FTM feature will be enabled.
|
||||
*
|
||||
* Supported Feature: Time Sync FTM
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_ENABLE_TIME_SYNC_FTM CFG_INI_BOOL("enable_time_sync_ftm", \
|
||||
0, \
|
||||
"Enable Time Sync FTM Support")
|
||||
/*
|
||||
* <ini>
|
||||
* time_sync_ftm_mode- Time Sync FTM feature Mode configuration
|
||||
* @Min: 0 - Aggregated Mode
|
||||
* @Max: 1 - Burst Mode
|
||||
* @Default: 0
|
||||
*
|
||||
* This ini is applicable only if enable_time_sync_ftm is set to 1.
|
||||
*
|
||||
* Supported Feature: Time Sync FTM
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_TIME_SYNC_FTM_MODE CFG_INI_BOOL("time_sync_ftm_mode", \
|
||||
0, \
|
||||
"Configure Time Sync FTM Mode")
|
||||
/*
|
||||
* <ini>
|
||||
* time_sync_ftm_role- Time Sync FTM feature Role configuration
|
||||
* @Min: 0 - Slave Role
|
||||
* @Max: 1 - Master Role
|
||||
* @Default: 0
|
||||
*
|
||||
* This ini is applicable only if enable_time_sync_ftm is set to 1.
|
||||
*
|
||||
* Supported Feature: Time Sync FTM
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_TIME_SYNC_FTM_ROLE CFG_INI_BOOL("time_sync_ftm_role", \
|
||||
0, \
|
||||
"Configure Time Sync FTM Role")
|
||||
|
||||
#define CFG_TIME_SYNC_FTM_ALL \
|
||||
CFG(CFG_ENABLE_TIME_SYNC_FTM) \
|
||||
CFG(CFG_TIME_SYNC_FTM_MODE) \
|
||||
CFG(CFG_TIME_SYNC_FTM_ROLE)
|
||||
|
||||
#else
|
||||
#define CFG_TIME_SYNC_FTM_ALL
|
||||
#endif /* FEATURE_WLAN_TIME_SYNC_FTM */
|
||||
#endif /* __FTM_TIME_SYNC_CFG_H__ */
|
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* DOC: Declare public API related to the ftm timesync called by north bound
|
||||
* DOC: Declare public API related to the ftm time_sync called by north bound
|
||||
* HDD/OSIF/LIM
|
||||
*/
|
||||
|
||||
@@ -24,13 +24,12 @@
|
||||
|
||||
#include <qdf_status.h>
|
||||
#include <qdf_types.h>
|
||||
//#include "ftm_time_sync_public_struct.h"
|
||||
#include "ftm_time_sync_objmgr.h"
|
||||
|
||||
#ifdef FEATURE_WLAN_TIME_SYNC_FTM
|
||||
|
||||
/**
|
||||
* ucfg_ftm_timesync_init() - FTM time sync component initialization.
|
||||
* ucfg_ftm_time_sync_init() - FTM time sync component initialization.
|
||||
*
|
||||
* This function initializes the ftm time sync component and registers
|
||||
* the handlers which are invoked on vdev creation.
|
||||
@@ -38,29 +37,59 @@
|
||||
* Return: For successful registration - QDF_STATUS_SUCCESS,
|
||||
* else QDF_STATUS error codes.
|
||||
*/
|
||||
QDF_STATUS ucfg_ftm_timesync_init(void);
|
||||
QDF_STATUS ucfg_ftm_time_sync_init(void);
|
||||
|
||||
/**
|
||||
* ucfg_ftm_timesync_deinit() - FTM time sync component deinit.
|
||||
* ucfg_ftm_time_sync_deinit() - FTM time sync component deinit.
|
||||
*
|
||||
* This function deinits ftm time sync component.
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void ucfg_ftm_timesync_deinit(void);
|
||||
void ucfg_ftm_time_sync_deinit(void);
|
||||
|
||||
/**
|
||||
* ucfg_is_ftm_time_sync_enable() - FTM time sync feature enable/disable
|
||||
* @psoc: psoc context
|
||||
*
|
||||
* This function advertises whether the ftm time sync feature is enabled or not
|
||||
*
|
||||
* Return: true if enable else false
|
||||
*/
|
||||
bool ucfg_is_ftm_time_sync_enable(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* ucfg_ftm_time_sync_set_enable() - FTM time sync feature set enable/disable
|
||||
* @psoc: psoc context
|
||||
* @value: value to be set
|
||||
*
|
||||
* This function enables/disables the feature.
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void ucfg_ftm_time_sync_set_enable(struct wlan_objmgr_psoc *psoc, bool value);
|
||||
#else
|
||||
|
||||
static inline
|
||||
QDF_STATUS ucfg_ftm_timesync_init(void)
|
||||
QDF_STATUS ucfg_ftm_time_sync_init(void)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline
|
||||
void ucfg_ftm_timesync_deinit(void)
|
||||
void ucfg_ftm_time_sync_deinit(void)
|
||||
{
|
||||
}
|
||||
|
||||
static inline
|
||||
bool ucfg_is_ftm_time_sync_enable(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline
|
||||
void ucfg_ftm_time_sync_set_enable(struct wlan_objmgr_psoc *psoc, bool value)
|
||||
{
|
||||
}
|
||||
#endif /* FEATURE_WLAN_TIME_SYNC_FTM */
|
||||
#endif /* _FTM_TIME_SYNC_UCFG_API_H_ */
|
||||
|
@@ -25,14 +25,38 @@
|
||||
#ifndef _WLAN_TIME_SYNC_FTM_PUBLIC_STRUCT_H_
|
||||
#define _WLAN_TIME_SYNC_FTM_PUBLIC_STRUCT_H_
|
||||
|
||||
struct wlan_objmgr_psoc;
|
||||
|
||||
/**
|
||||
* struct wlan_ftm_timesync_tx_ops - structure of tx operation function
|
||||
* pointers for ftm timesync component
|
||||
* enum ftm_time_sync_mode - ftm time sync modes
|
||||
* @FTM_TIMESYNC_AGGREGATED_MODE: Ftm time sync aggregated mode
|
||||
* Only one aggregated offset is provided
|
||||
* @FTM_TIMESYNC_BURST_MODE: Ftm time sync burst mode, offset for each FTM
|
||||
* frame is provided
|
||||
*/
|
||||
enum ftm_time_sync_mode {
|
||||
FTM_TIMESYNC_AGGREGATED_MODE,
|
||||
FTM_TIMESYNC_BURST_MODE,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum ftm_time_sync_role - ftm time sync role
|
||||
* @FTM_TIMESYNC_SLAVE_ROLE: Slave/STA role
|
||||
* @FTM_TIMESYNC_MASTER_ROLE: Master/SAP role
|
||||
*/
|
||||
enum ftm_time_sync_role {
|
||||
FTM_TIMESYNC_SLAVE_ROLE,
|
||||
FTM_TIMESYNC_MASTER_ROLE,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wlan_ftm_time_sync_tx_ops - structure of tx operation function
|
||||
* pointers for ftm time_sync component
|
||||
* @ftm_time_sync_send_qtime: send qtime wmi cmd to FW
|
||||
* @ftm_time_sync_send_trigger: send ftm time sync trigger cmd
|
||||
*
|
||||
*/
|
||||
struct wlan_ftm_timesync_tx_ops {
|
||||
struct wlan_ftm_time_sync_tx_ops {
|
||||
QDF_STATUS (*ftm_time_sync_send_qtime)(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t vdev_id,
|
||||
uint64_t lpass_ts);
|
||||
@@ -41,16 +65,16 @@ struct wlan_ftm_timesync_tx_ops {
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wlan_ftm_timesync_rx_ops - structure of rx operation function
|
||||
* pointers for ftm timesync component
|
||||
* @ftm_timesync_register_start_stop: register ftm timesync start stop event
|
||||
* @ftm_timesync_regiser_master_slave_offset: register master slave qtime
|
||||
* offset event
|
||||
* struct wlan_ftm_time_sync_rx_ops - structure of rx operation function
|
||||
* pointers for ftm time_sync component
|
||||
* @ftm_time_sync_register_start_stop: register ftm time_sync start stop event
|
||||
* @ftm_time_sync_regiser_master_slave_offset: register master slave qtime
|
||||
* offset event
|
||||
*/
|
||||
struct wlan_ftm_timesync_rx_ops {
|
||||
QDF_STATUS (*ftm_timesync_register_start_stop)
|
||||
struct wlan_ftm_time_sync_rx_ops {
|
||||
QDF_STATUS (*ftm_time_sync_register_start_stop)
|
||||
(struct wlan_objmgr_psoc *psoc);
|
||||
QDF_STATUS (*ftm_timesync_regiser_master_slave_offset)
|
||||
QDF_STATUS (*ftm_time_sync_regiser_master_slave_offset)
|
||||
(struct wlan_objmgr_psoc *psoc);
|
||||
};
|
||||
#endif /*_WLAN_TIME_SYNC_FTM_PUBLIC_STRUCT_H_ */
|
||||
|
Reference in New Issue
Block a user