qcacld-3.0: Add param for OCL mode configuration

Currently there is no provision to configure OCL mode in FW during
driver bootup.

To enable this configuration add a new INI configuration parameter
gOclCfg.

Change-Id: I87c9131f5395c394f745e0170f0d9b3d1571d030
CRs-Fixed: 2644312
This commit is contained in:
Bapiraju Alla
2020-03-18 10:44:32 +05:30
committato da nshrivas
parent c589449c9a
commit 5e23b7cfd7
10 ha cambiato i file con 170 aggiunte e 1 eliminazioni

Vedi File

@@ -204,6 +204,7 @@ struct wlan_fwol_neighbor_report_cfg {
* @enable_dhcp_server_offload: DHCP Offload is enabled or not
* @dhcp_max_num_clients: Max number of DHCP client supported
* @dwelltime_params: adaptive dwell time parameters
* @ocl_cfg: OCL mode configuration
*/
struct wlan_fwol_cfg {
/* Add CFG and INI items here */
@@ -254,6 +255,7 @@ struct wlan_fwol_cfg {
uint32_t dhcp_max_num_clients;
#endif
struct adaptive_dwelltime_params dwelltime_params;
uint32_t ocl_cfg;
};
/**

Vedi File

@@ -540,6 +540,7 @@ QDF_STATUS fwol_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
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);
fwol_cfg->ocl_cfg = cfg_get(psoc, CFG_SET_OCL_CFG);
return status;
}

Vedi File

@@ -728,6 +728,36 @@
0, \
"SAP xLNA bypass control")
/*
* <ini>
* gOclCfg - Enable/Disable OCL mode
* @Min: 0
* @Max: 2
* @Default: 2
*
* This ini is used to set one chain listen (OCL) mode to static or dynamic
* enable/disable during bootup. value 0 disables both static/dynamic OCL.
* value 1 enables static OCL. Once its enabled it stays enabled. value 2
* enables dynamic OCL. In dynamic OCL mode one chain listen will be
* enabled/disabled by firmware during runtime based on RSSI.
*
* Related: None
*
* Supported Feature: OCL
*
* Usage: Internal
*
* </ini>
*/
#define CFG_SET_OCL_CFG CFG_INI_UINT( \
"gOclCfg", \
0, \
2, \
2, \
CFG_VALUE_OR_DEFAULT, \
"OCL configuration")
#define CFG_FWOL_GENERIC_ALL \
CFG_FWOL_DHCP \
CFG(CFG_ENABLE_ANI) \
@@ -754,6 +784,7 @@
CFG(CFG_ENABLE_GCMP) \
CFG(CFG_TX_SCH_DELAY) \
CFG(CFG_ENABLE_SECONDARY_RATE) \
CFG(CFG_SET_SAP_XLNA_BYPASS)
CFG(CFG_SET_SAP_XLNA_BYPASS) \
CFG(CFG_SET_OCL_CFG)
#endif

Vedi File

@@ -286,6 +286,16 @@ QDF_STATUS ucfg_fwol_get_enable_fw_module_log_level(
QDF_STATUS ucfg_fwol_get_sap_xlna_bypass(struct wlan_objmgr_psoc *psoc,
bool *sap_xlna_bypass);
/**
* ucfg_fwol_get_ocl_cfg() - Assigns ocl_cfg value
* @psoc: pointer to the psoc object
* @ocl_cfg: pointer to return ocl_cfg
*
* Return: QDF Status
*/
QDF_STATUS ucfg_fwol_get_ocl_cfg(struct wlan_objmgr_psoc *psoc,
uint32_t *ocl_cfg);
#ifdef FEATURE_WLAN_RA_FILTERING
/**
* ucfg_fwol_set_is_rate_limit_enabled() - Sets the is_rate_limit_enabled value
@@ -741,6 +751,12 @@ ucfg_fwol_get_sap_xlna_bypass(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_E_FAILURE;
}
static inline QDF_STATUS
ucfg_fwol_get_ocl_cfg(struct wlan_objmgr_psoc *psoc, uint32_t *ocl_cfg)
{
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)

Vedi File

@@ -520,6 +520,21 @@ QDF_STATUS ucfg_fwol_get_sap_xlna_bypass(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
QDF_STATUS ucfg_fwol_get_ocl_cfg(struct wlan_objmgr_psoc *psoc,
uint32_t *ocl_cfg)
{
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;
}
*ocl_cfg = fwol_obj->cfg.ocl_cfg;
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)