mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
qcacld-3.0: Add ini to pass xLNA bypass config to FW
Add new ini CFG_SET_SAP_XLNA_BYPASS under fw_offload to allow host to pass config to FW. WMI_PDEV_PARAM_SET_SAP_XLNA_BYPASS makes the SAP xLNA bypass configureable. Change-Id: Ie501005f3035f14b3f23cdd260f401a6af81b798 CRs-fixed: 2632088
This commit is contained in:
parent
9ca81c3f90
commit
4cb4b007a1
6 changed files with 74 additions and 2 deletions
|
|
@ -190,6 +190,7 @@ struct wlan_fwol_neighbor_report_cfg {
|
|||
* @enable_fw_log_type: Set the FW log type
|
||||
* @enable_fw_module_log_level: enable fw module log level
|
||||
* @enable_fw_module_log_level_num: enablefw module log level num
|
||||
* @sap_xlna_bypass: bypass SAP xLNA
|
||||
* @is_rate_limit_enabled: Enable/disable RA rate limited
|
||||
* @tsf_gpio_pin: TSF GPIO Pin config
|
||||
* @tsf_irq_host_gpio_pin: TSF GPIO Pin config
|
||||
|
|
@ -225,6 +226,7 @@ struct wlan_fwol_cfg {
|
|||
uint16_t enable_fw_log_type;
|
||||
uint8_t enable_fw_module_log_level[FW_MODULE_LOG_LEVEL_STRING_LENGTH];
|
||||
uint8_t enable_fw_module_log_level_num;
|
||||
bool sap_xlna_bypass;
|
||||
#ifdef FEATURE_WLAN_RA_FILTERING
|
||||
bool is_rate_limit_enabled;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -539,6 +539,7 @@ QDF_STATUS fwol_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
|||
ucfg_fwol_fetch_tsf_irq_host_gpio_pin(psoc, fwol_cfg);
|
||||
ucfg_fwol_fetch_tsf_sync_host_gpio_pin(psoc, fwol_cfg);
|
||||
ucfg_fwol_fetch_dhcp_server_settings(psoc, fwol_cfg);
|
||||
fwol_cfg->sap_xlna_bypass = cfg_get(psoc, CFG_SET_SAP_XLNA_BYPASS);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-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
|
||||
|
|
@ -705,6 +705,29 @@
|
|||
CFG_VALUE_OR_DEFAULT, \
|
||||
"Secondary Retry Rate feature subset control")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* sap_xlna_bypass - Enable/Disable xLNA bypass
|
||||
* @Min: 0
|
||||
* @Max: 1
|
||||
* @Default: 0
|
||||
*
|
||||
* This ini is used to enable/disable SAP xLNA bypass in the FW
|
||||
*
|
||||
* Related: None
|
||||
*
|
||||
* Supported Feature: SAP
|
||||
*
|
||||
* Usage: Internal
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
|
||||
#define CFG_SET_SAP_XLNA_BYPASS CFG_INI_BOOL( \
|
||||
"xlna_bypass", \
|
||||
0, \
|
||||
"SAP xLNA bypass control")
|
||||
|
||||
#define CFG_FWOL_GENERIC_ALL \
|
||||
CFG_FWOL_DHCP \
|
||||
CFG(CFG_ENABLE_ANI) \
|
||||
|
|
@ -730,6 +753,7 @@
|
|||
__CFG_IS_SAE_ENABLED \
|
||||
CFG(CFG_ENABLE_GCMP) \
|
||||
CFG(CFG_TX_SCH_DELAY) \
|
||||
CFG(CFG_ENABLE_SECONDARY_RATE)
|
||||
CFG(CFG_ENABLE_SECONDARY_RATE) \
|
||||
CFG(CFG_SET_SAP_XLNA_BYPASS)
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -276,6 +276,16 @@ QDF_STATUS ucfg_fwol_get_enable_fw_module_log_level(
|
|||
uint8_t **enable_fw_module_log_level,
|
||||
uint8_t *enable_fw_module_log_level_num);
|
||||
|
||||
/**
|
||||
* ucfg_fwol_get_sap_xlna_bypass() - Assigns sap_xlna_bypass value
|
||||
* @psoc: pointer to the psoc object
|
||||
* @sap_xlna_bypass: pointer to return sap_xlna_bypass bool
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS ucfg_fwol_get_sap_xlna_bypass(struct wlan_objmgr_psoc *psoc,
|
||||
bool *sap_xlna_bypass);
|
||||
|
||||
#ifdef FEATURE_WLAN_RA_FILTERING
|
||||
/**
|
||||
* ucfg_fwol_set_is_rate_limit_enabled() - Sets the is_rate_limit_enabled value
|
||||
|
|
@ -724,6 +734,13 @@ ucfg_fwol_get_enable_fw_module_log_level(
|
|||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
ucfg_fwol_get_sap_xlna_bypass(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *sap_xlna_bypass)
|
||||
{
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
static inline QDF_STATUS
|
||||
ucfg_fwol_get_tsf_gpio_pin(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *tsf_gpio_pin)
|
||||
|
|
|
|||
|
|
@ -504,6 +504,21 @@ QDF_STATUS ucfg_fwol_get_enable_fw_module_log_level(
|
|||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_fwol_get_sap_xlna_bypass(struct wlan_objmgr_psoc *psoc,
|
||||
bool *sap_xlna_bypass)
|
||||
{
|
||||
struct wlan_fwol_psoc_obj *fwol_obj;
|
||||
|
||||
fwol_obj = fwol_get_psoc_obj(psoc);
|
||||
if (!fwol_obj) {
|
||||
fwol_err("Failed to get FWOL obj");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
*sap_xlna_bypass = fwol_obj->cfg.sap_xlna_bypass;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef FEATURE_WLAN_RA_FILTERING
|
||||
QDF_STATUS ucfg_fwol_set_is_rate_limit_enabled(struct wlan_objmgr_psoc *psoc,
|
||||
bool is_rate_limit_enabled)
|
||||
|
|
|
|||
|
|
@ -5508,6 +5508,7 @@ int hdd_set_fw_params(struct hdd_adapter *adapter)
|
|||
bool bval = false;
|
||||
uint8_t enable_tx_sch_delay, dfs_chan_ageout_time;
|
||||
uint32_t dtim_sel_diversity, enable_secondary_rate;
|
||||
bool sap_xlna_bypass;
|
||||
|
||||
hdd_enter_dev(adapter->dev);
|
||||
|
||||
|
|
@ -5568,6 +5569,18 @@ int hdd_set_fw_params(struct hdd_adapter *adapter)
|
|||
goto error;
|
||||
}
|
||||
|
||||
ret = -1;
|
||||
if (QDF_IS_STATUS_SUCCESS(ucfg_fwol_get_sap_xlna_bypass(
|
||||
hdd_ctx->psoc, &sap_xlna_bypass))) {
|
||||
ret = sme_cli_set_command(adapter->vdev_id,
|
||||
WMI_PDEV_PARAM_SET_SAP_XLNA_BYPASS,
|
||||
sap_xlna_bypass, PDEV_CMD);
|
||||
}
|
||||
if (ret) {
|
||||
hdd_err("Failed to set WMI_PDEV_PARAM_SET_SAP_XLNA_BYPASS");
|
||||
goto error;
|
||||
}
|
||||
|
||||
wlan_mlme_get_dfs_chan_ageout_time(hdd_ctx->psoc,
|
||||
&dfs_chan_ageout_time);
|
||||
ret = sme_cli_set_command(adapter->vdev_id,
|
||||
|
|
|
|||
Loading…
Reference in a new issue