qcacld-3.0: Add an INI param to configure HW assist feature in FW

HW assist is a FW feature and it is enabled by default. But there is
no provision to disable/enable this feature based on requirement.

To address this, add INI param to enable/disable HW assist feature
in FW.

Change-Id: Icdc4a842be4d5c6991a785ee270f61ba87fcfe79
CRs-Fixed: 2841346
Esse commit está contido em:
Bapiraju Alla
2020-12-15 19:59:51 +05:30
commit de snandini
commit 3e83a3e527
4 arquivos alterados com 77 adições e 2 exclusões

Ver arquivo

@@ -216,6 +216,7 @@ struct wlan_fwol_neighbor_report_cfg {
* @dwelltime_params: adaptive dwell time parameters
* @enable_ilp: ILP HW block configuration
* @sap_sho: SAP SHO HW offload configuration
* @disable_hw_assist: Flag to configure HW assist feature in FW
*/
struct wlan_fwol_cfg {
/* Add CFG and INI items here */
@@ -270,6 +271,7 @@ struct wlan_fwol_cfg {
struct adaptive_dwelltime_params dwelltime_params;
bool enable_ilp;
uint32_t sap_sho;
bool disable_hw_assist;
};
/**
@@ -418,4 +420,15 @@ QDF_STATUS fwol_set_ilp_config(struct wlan_objmgr_pdev *pdev,
*/
QDF_STATUS fwol_set_sap_sho(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
uint32_t sap_sho);
/**
* fwol_configure_hw_assist() - API to configure HW assist feature in FW
* @pdev: pointer to the pdev object
* @disable_he_assist: Flag to enable/disable HW assist feature
*
* Return: QDF_STATUS
*/
QDF_STATUS fwol_configure_hw_assist(struct wlan_objmgr_pdev *pdev,
bool disable_hw_assist);
#endif

Ver arquivo

@@ -556,6 +556,7 @@ QDF_STATUS fwol_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
fwol_cfg->sap_xlna_bypass = cfg_get(psoc, CFG_SET_SAP_XLNA_BYPASS);
fwol_cfg->enable_ilp = cfg_get(psoc, CFG_SET_ENABLE_ILP);
fwol_cfg->sap_sho = cfg_get(psoc, CFG_SAP_SHO_CONFIG);
fwol_cfg->disable_hw_assist = cfg_get(psoc, CFG_DISABLE_HW_ASSIST);
return status;
}
@@ -691,3 +692,19 @@ QDF_STATUS fwol_set_sap_sho(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
return status;
}
QDF_STATUS fwol_configure_hw_assist(struct wlan_objmgr_pdev *pdev,
bool disable_hw_assist)
{
QDF_STATUS status;
struct pdev_params pdev_param;
pdev_param.param_id = WMI_PDEV_PARAM_DISABLE_HW_ASSIST;
pdev_param.param_value = disable_hw_assist;
status = tgt_fwol_pdev_param_send(pdev, pdev_param);
if (QDF_IS_STATUS_ERROR(status))
fwol_err("WMI_PDEV_PARAM_DISABLE_HW_ASSIST failed %d", status);
return status;
}

Ver arquivo

@@ -816,6 +816,27 @@
CFG_VALUE_OR_DEFAULT, \
"enable SHO config")
/*
* <ini>
* g_disable_hw_assist - Flag to disable HW assist feature
* @Default: 0
*
* This ini is used to enable/disable the HW assist feature in FW
*
* Related: none
*
* Supported Feature: STA/SAP
*
* Usage: External
*
* <ini>
*/
#define CFG_DISABLE_HW_ASSIST CFG_INI_BOOL( \
"g_disable_hw_assist", \
0, \
"Disable HW assist feature in FW")
#define CFG_FWOL_GENERIC_ALL \
CFG_FWOL_DHCP \
CFG(CFG_ENABLE_ANI) \
@@ -845,6 +866,7 @@
CFG(CFG_SET_SAP_XLNA_BYPASS) \
CFG(CFG_SET_ENABLE_ILP) \
CFG(CFG_ENABLE_FW_WOW_MODULE_LOG_LEVEL) \
CFG(CFG_SAP_SHO_CONFIG)
CFG(CFG_SAP_SHO_CONFIG) \
CFG(CFG_DISABLE_HW_ASSIST)
#endif

Ver arquivo

@@ -374,6 +374,21 @@ static QDF_STATUS ucfg_fwol_get_sap_sho(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
static QDF_STATUS ucfg_fwol_get_hw_assist_config(struct wlan_objmgr_psoc *psoc,
bool *disable_hw_assist)
{
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;
}
*disable_hw_assist = fwol_obj->cfg.disable_hw_assist;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS ucfg_get_enable_rts_sifsbursting(struct wlan_objmgr_psoc *psoc,
bool *enable_rts_sifsbursting)
{
@@ -1057,14 +1072,22 @@ QDF_STATUS ucfg_fwol_configure_global_params(struct wlan_objmgr_psoc *psoc,
QDF_STATUS status;
bool value;
/* Configure ILP feature in FW */
status = ucfg_fwol_get_ilp_config(psoc, &value);
if (QDF_IS_STATUS_ERROR(status))
return status;
status = fwol_set_ilp_config(pdev, value);
if (QDF_IS_STATUS_ERROR(status))
return status;
/* Configure HW assist feature in FW */
status = ucfg_fwol_get_hw_assist_config(psoc, &value);
if (QDF_IS_STATUS_ERROR(status))
return status;
status = fwol_configure_hw_assist(pdev, value);
if (QDF_IS_STATUS_ERROR(status))
return status;
return status;
}