qcacld-3.0: Add gettime of PTP for NON-QC platform
Implement NON-QC platform TSF and TSF PLUS. Implement gettime of PTP. Implement TSF PLUS for SAP/GO CRs-Fixed: 2399624 Change-Id: Id4f41a94256a8f035ae408c168c246569185c534
This commit is contained in:
@@ -158,6 +158,7 @@ struct wlan_fwol_neighbor_report_cfg {
|
|||||||
* @enable_fw_module_log_level_num: enablefw module log level num
|
* @enable_fw_module_log_level_num: enablefw module log level num
|
||||||
* @is_rate_limit_enabled: Enable/disable RA rate limited
|
* @is_rate_limit_enabled: Enable/disable RA rate limited
|
||||||
* @tsf_gpio_pin: TSF GPIO Pin config
|
* @tsf_gpio_pin: TSF GPIO Pin config
|
||||||
|
* @tsf_irq_host_gpio_pin: TSF GPIO Pin config
|
||||||
* @tsf_ptp_options: TSF Plus feature options config
|
* @tsf_ptp_options: TSF Plus feature options config
|
||||||
* @lprx_enable: LPRx feature enable config
|
* @lprx_enable: LPRx feature enable config
|
||||||
* @sae_enable: SAE feature enable config
|
* @sae_enable: SAE feature enable config
|
||||||
@@ -196,6 +197,9 @@ struct wlan_fwol_cfg {
|
|||||||
uint32_t tsf_gpio_pin;
|
uint32_t tsf_gpio_pin;
|
||||||
#ifdef WLAN_FEATURE_TSF_PLUS
|
#ifdef WLAN_FEATURE_TSF_PLUS
|
||||||
uint32_t tsf_ptp_options;
|
uint32_t tsf_ptp_options;
|
||||||
|
#ifdef WLAN_FEATURE_TSF_PLUS_EXT_GPIO_IRQ
|
||||||
|
uint32_t tsf_irq_host_gpio_pin;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
bool lprx_enable;
|
bool lprx_enable;
|
||||||
|
@@ -356,6 +356,32 @@ static void ucfg_fwol_init_tsf_ptp_options(struct wlan_objmgr_psoc *psoc,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_TSF_PLUS_EXT_GPIO_IRQ
|
||||||
|
/**
|
||||||
|
* ucfg_fwol_fetch_tsf_irq_host_gpio_pin: Populate the
|
||||||
|
* tsf_irq_host_gpio_pin from cfg
|
||||||
|
* @psoc: The global psoc handler
|
||||||
|
* @fwol_cfg: The cfg structure
|
||||||
|
*
|
||||||
|
* This function is used to populate the cfg value of host platform
|
||||||
|
* gpio pin configured to receive tsf interrupt from fw.
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
ucfg_fwol_fetch_tsf_irq_host_gpio_pin(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct wlan_fwol_cfg *fwol_cfg)
|
||||||
|
{
|
||||||
|
fwol_cfg->tsf_irq_host_gpio_pin =
|
||||||
|
cfg_get(psoc, CFG_SET_TSF_IRQ_HOST_GPIO_PIN);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
static void
|
||||||
|
ucfg_fwol_fetch_tsf_irq_host_gpio_pin(struct wlan_objmgr_psoc *psoc,
|
||||||
|
struct wlan_fwol_cfg *fwol_cfg)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
* ucfg_fwol_init_sae_cfg: Populate the sae control config from cfg
|
* ucfg_fwol_init_sae_cfg: Populate the sae control config from cfg
|
||||||
* @psoc: The global psoc handler
|
* @psoc: The global psoc handler
|
||||||
@@ -448,6 +474,7 @@ QDF_STATUS fwol_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
|||||||
fwol_init_adapt_dwelltime_in_cfg(psoc, &fwol_cfg->dwelltime_params);
|
fwol_init_adapt_dwelltime_in_cfg(psoc, &fwol_cfg->dwelltime_params);
|
||||||
ucfg_fwol_fetch_ra_filter(psoc, fwol_cfg);
|
ucfg_fwol_fetch_ra_filter(psoc, fwol_cfg);
|
||||||
ucfg_fwol_fetch_tsf_gpio_pin(psoc, fwol_cfg);
|
ucfg_fwol_fetch_tsf_gpio_pin(psoc, fwol_cfg);
|
||||||
|
ucfg_fwol_fetch_tsf_irq_host_gpio_pin(psoc, fwol_cfg);
|
||||||
ucfg_fwol_fetch_dhcp_server_settings(psoc, fwol_cfg);
|
ucfg_fwol_fetch_dhcp_server_settings(psoc, fwol_cfg);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
@@ -434,6 +434,34 @@
|
|||||||
CFG_VALUE_OR_DEFAULT, \
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
"GPIO pin to toggle when capture tsf")
|
"GPIO pin to toggle when capture tsf")
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_TSF_PLUS_EXT_GPIO_IRQ
|
||||||
|
/* <ini>
|
||||||
|
* gtsf_irq_host_gpio_pin
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 254
|
||||||
|
* @Default: 255
|
||||||
|
*
|
||||||
|
* TSF irq GPIO pin of host platform
|
||||||
|
*
|
||||||
|
* Related: None
|
||||||
|
*
|
||||||
|
* Usage: Internal
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_SET_TSF_IRQ_HOST_GPIO_PIN CFG_INI_INT( \
|
||||||
|
"gtsf_irq_host_gpio_pin", \
|
||||||
|
0, \
|
||||||
|
254, \
|
||||||
|
255, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
|
"TSF irq GPIO pin of host platform")
|
||||||
|
|
||||||
|
#define __CFG_SET_TSF_IRQ_HOST_GPIO_PIN CFG(CFG_SET_TSF_IRQ_HOST_GPIO_PIN)
|
||||||
|
#else
|
||||||
|
#define __CFG_SET_TSF_IRQ_HOST_GPIO_PIN
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(WLAN_FEATURE_TSF) && defined(WLAN_FEATURE_TSF_PLUS)
|
#if defined(WLAN_FEATURE_TSF) && defined(WLAN_FEATURE_TSF_PLUS)
|
||||||
/* <ini>
|
/* <ini>
|
||||||
* gtsf_ptp_options: TSF Plus feature options
|
* gtsf_ptp_options: TSF Plus feature options
|
||||||
@@ -464,6 +492,7 @@
|
|||||||
0xf, \
|
0xf, \
|
||||||
CFG_VALUE_OR_DEFAULT, \
|
CFG_VALUE_OR_DEFAULT, \
|
||||||
"TSF Plus feature options")
|
"TSF Plus feature options")
|
||||||
|
|
||||||
#define __CFG_SET_TSF_PTP_OPT CFG(CFG_SET_TSF_PTP_OPT)
|
#define __CFG_SET_TSF_PTP_OPT CFG(CFG_SET_TSF_PTP_OPT)
|
||||||
#else
|
#else
|
||||||
#define __CFG_SET_TSF_PTP_OPT
|
#define __CFG_SET_TSF_PTP_OPT
|
||||||
@@ -655,6 +684,7 @@
|
|||||||
CFG(CFG_ENABLE_FW_MODULE_LOG_LEVEL) \
|
CFG(CFG_ENABLE_FW_MODULE_LOG_LEVEL) \
|
||||||
CFG(CFG_RA_FILTER_ENABLE) \
|
CFG(CFG_RA_FILTER_ENABLE) \
|
||||||
CFG(CFG_SET_TSF_GPIO_PIN) \
|
CFG(CFG_SET_TSF_GPIO_PIN) \
|
||||||
|
__CFG_SET_TSF_IRQ_HOST_GPIO_PIN \
|
||||||
__CFG_SET_TSF_PTP_OPT \
|
__CFG_SET_TSF_PTP_OPT \
|
||||||
CFG(CFG_LPRX) \
|
CFG(CFG_LPRX) \
|
||||||
__CFG_IS_SAE_ENABLED \
|
__CFG_IS_SAE_ENABLED \
|
||||||
|
@@ -304,6 +304,19 @@ QDF_STATUS ucfg_fwol_get_is_rate_limit_enabled(struct wlan_objmgr_psoc *psoc,
|
|||||||
QDF_STATUS ucfg_fwol_get_tsf_gpio_pin(struct wlan_objmgr_psoc *psoc,
|
QDF_STATUS ucfg_fwol_get_tsf_gpio_pin(struct wlan_objmgr_psoc *psoc,
|
||||||
uint32_t *tsf_gpio_pin);
|
uint32_t *tsf_gpio_pin);
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_TSF_PLUS_EXT_GPIO_IRQ
|
||||||
|
/**
|
||||||
|
* ucfg_fwol_get_tsf_irq_host_gpio_pin() - Assigns tsf_irq_host_gpio_pin value
|
||||||
|
* @psoc: pointer to the psoc object
|
||||||
|
*
|
||||||
|
* Return: QDF Status
|
||||||
|
*/
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
ucfg_fwol_get_tsf_irq_host_gpio_pin(struct wlan_objmgr_psoc *psoc,
|
||||||
|
uint32_t *tsf_irq_host_gpio_pin);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef DHCP_SERVER_OFFLOAD
|
#ifdef DHCP_SERVER_OFFLOAD
|
||||||
/**
|
/**
|
||||||
* ucfg_fwol_get_enable_dhcp_server_offload()-Assign enable_dhcp_server_offload
|
* ucfg_fwol_get_enable_dhcp_server_offload()-Assign enable_dhcp_server_offload
|
||||||
|
@@ -558,6 +558,27 @@ QDF_STATUS ucfg_fwol_get_tsf_ptp_options(struct wlan_objmgr_psoc *psoc,
|
|||||||
*tsf_ptp_options = fwol_obj->cfg.tsf_ptp_options;
|
*tsf_ptp_options = fwol_obj->cfg.tsf_ptp_options;
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WLAN_FEATURE_TSF_PLUS_EXT_GPIO_IRQ
|
||||||
|
QDF_STATUS
|
||||||
|
ucfg_fwol_get_tsf_irq_host_gpio_pin(struct wlan_objmgr_psoc *psoc,
|
||||||
|
uint32_t *tsf_irq_host_gpio_pin)
|
||||||
|
{
|
||||||
|
struct wlan_fwol_psoc_obj *fwol_obj;
|
||||||
|
|
||||||
|
fwol_obj = fwol_get_psoc_obj(psoc);
|
||||||
|
if (!fwol_obj) {
|
||||||
|
fwol_err("Failed to get FWOL obj");
|
||||||
|
*tsf_irq_host_gpio_pin =
|
||||||
|
cfg_default(CFG_SET_TSF_IRQ_HOST_GPIO_PIN);
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
*tsf_irq_host_gpio_pin = fwol_obj->cfg.tsf_irq_host_gpio_pin;
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
QDF_STATUS ucfg_fwol_get_tsf_gpio_pin(struct wlan_objmgr_psoc *psoc,
|
QDF_STATUS ucfg_fwol_get_tsf_gpio_pin(struct wlan_objmgr_psoc *psoc,
|
||||||
@@ -571,6 +592,7 @@ QDF_STATUS ucfg_fwol_get_tsf_ptp_options(struct wlan_objmgr_psoc *psoc,
|
|||||||
{
|
{
|
||||||
return QDF_STATUS_E_NOSUPPORT;
|
return QDF_STATUS_E_NOSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QDF_STATUS ucfg_fwol_get_lprx_enable(struct wlan_objmgr_psoc *psoc,
|
QDF_STATUS ucfg_fwol_get_lprx_enable(struct wlan_objmgr_psoc *psoc,
|
||||||
@@ -594,6 +616,7 @@ bool ucfg_fwol_get_sae_enable(struct wlan_objmgr_psoc *psoc)
|
|||||||
{
|
{
|
||||||
return cfg_get(psoc, CFG_IS_SAE_ENABLED);
|
return cfg_get(psoc, CFG_IS_SAE_ENABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
bool ucfg_fwol_get_sae_enable(struct wlan_objmgr_psoc *psoc)
|
bool ucfg_fwol_get_sae_enable(struct wlan_objmgr_psoc *psoc)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user