qcacld-3.0: Add ini support for tx_retry_multiplier
Add ini support for tx_retry_multiplier and send tx_retry_multiplier to fw as PDEV_STATS_TX_XRETRY_EXT pdev param, so that fw can multiply the counter by the percentage provided by user. Change-Id: Ie2f06dc3aaa4a161a451b68abd085cc1537eb468 CRs-Fixed: 3066799
This commit is contained in:

committed by
Madan Koyyalamudi

parent
c454a6fd06
commit
65c2cb4682
@@ -414,6 +414,7 @@ static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
cfg_get(psoc, CFG_SAE_CONNECION_RETRIES);
|
||||
gen->monitor_mode_concurrency =
|
||||
cfg_get(psoc, CFG_MONITOR_MODE_CONCURRENCY);
|
||||
gen->tx_retry_multiplier = cfg_get(psoc, CFG_TX_RETRY_MULTIPLIER);
|
||||
mlme_init_wds_config_cfg(psoc, gen);
|
||||
}
|
||||
|
||||
|
@@ -876,6 +876,31 @@ enum wlan_wds_mode {
|
||||
#define CFG_WDS_MODE_ALL
|
||||
#endif
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* tx_retry_multiplier - TX retry multiplier
|
||||
* @Min: 0
|
||||
* @Max: 500
|
||||
* @Default: 0
|
||||
*
|
||||
* This ini is used to indicate percentage to max retry limit to fw
|
||||
* which can further be used by fw to multiply counter by
|
||||
* tx_retry_multiplier percent.
|
||||
*
|
||||
* Supported Feature: STA/SAP
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_TX_RETRY_MULTIPLIER CFG_INI_UINT( \
|
||||
"tx_retry_multiplier", \
|
||||
0, \
|
||||
500, \
|
||||
0, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"percentage of max retry limit")
|
||||
|
||||
#define CFG_GENERIC_ALL \
|
||||
CFG(CFG_ENABLE_DEBUG_PACKET_LOG) \
|
||||
CFG(CFG_PMF_SA_QUERY_MAX_RETRIES) \
|
||||
@@ -910,5 +935,6 @@ enum wlan_wds_mode {
|
||||
CFG(CFG_WLS_6GHZ_CAPABLE) \
|
||||
CFG(CFG_MONITOR_MODE_CONCURRENCY) \
|
||||
CFG(CFG_RF_TEST_MODE_SUPP_ENABLED) \
|
||||
CFG_WDS_MODE_ALL
|
||||
CFG_WDS_MODE_ALL \
|
||||
CFG(CFG_TX_RETRY_MULTIPLIER)
|
||||
#endif /* __CFG_MLME_GENERIC_H */
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. 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
|
||||
@@ -3395,4 +3396,17 @@ wlan_mlme_get_p2p_p2p_conc_support(struct wlan_objmgr_psoc *psoc)
|
||||
* Return: vht channel width
|
||||
*/
|
||||
enum phy_ch_width mlme_get_vht_ch_width(void);
|
||||
|
||||
/**
|
||||
* wlan_mlme_get_tx_retry_multiplier() - Get the tx retry multiplier percentage
|
||||
*
|
||||
* @psoc: pointer to psoc object
|
||||
* @tx_retry_multiplier: pointer to hold user config value of
|
||||
* tx_retry_multiplier
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS
|
||||
wlan_mlme_get_tx_retry_multiplier(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *tx_retry_multiplier);
|
||||
#endif /* _WLAN_MLME_API_H_ */
|
||||
|
@@ -1323,6 +1323,7 @@ struct dual_sta_policy {
|
||||
* @ocv_support: FW supports OCV or not
|
||||
* @wds_mode: wds mode supported
|
||||
* @dual_sta_policy_cfg: Dual STA policies configuration
|
||||
* @tx_retry_multiplier: TX xretry extension parameter
|
||||
*/
|
||||
struct wlan_mlme_generic {
|
||||
uint32_t band_capability;
|
||||
@@ -1368,6 +1369,7 @@ struct wlan_mlme_generic {
|
||||
bool ocv_support;
|
||||
enum wlan_wds_mode wds_mode;
|
||||
struct dual_sta_policy dual_sta_policy;
|
||||
uint32_t tx_retry_multiplier;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. 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
|
||||
@@ -5288,3 +5289,21 @@ enum phy_ch_width mlme_get_vht_ch_width(void)
|
||||
|
||||
return bandwidth;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wlan_mlme_get_tx_retry_multiplier(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *tx_retry_multiplier)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
|
||||
if (!mlme_obj) {
|
||||
*tx_retry_multiplier =
|
||||
cfg_default(CFG_TX_RETRY_MULTIPLIER);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
*tx_retry_multiplier = mlme_obj->cfg.gen.tx_retry_multiplier;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
@@ -13634,6 +13634,7 @@ static int hdd_pre_enable_configure(struct hdd_context *hdd_ctx)
|
||||
int ret;
|
||||
uint8_t val = 0;
|
||||
uint8_t max_retry = 0;
|
||||
uint32_t tx_retry_multiplier;
|
||||
QDF_STATUS status;
|
||||
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||
|
||||
@@ -13684,6 +13685,16 @@ static int hdd_pre_enable_configure(struct hdd_context *hdd_ctx)
|
||||
goto out;
|
||||
}
|
||||
|
||||
wlan_mlme_get_tx_retry_multiplier(hdd_ctx->psoc,
|
||||
&tx_retry_multiplier);
|
||||
ret = sme_cli_set_command(0, WMI_PDEV_PARAM_PDEV_STATS_TX_XRETRY_EXT,
|
||||
tx_retry_multiplier, PDEV_CMD);
|
||||
if (0 != ret) {
|
||||
hdd_err("WMI_PDEV_PARAM_PDEV_STATS_TX_XRETRY_EXT failed %d",
|
||||
ret);
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = hdd_set_smart_chainmask_enabled(hdd_ctx);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
Reference in New Issue
Block a user