qcacld-3.0: Add ini support to configure MGMT retry limit
Currently, default MGMT retry limit is 4 which means 4 transmissions are supported for any management frame. In noisy environment, Chances to get connection failure are higher with 4 retransmissions. Fix is to add INI support mgmt_retry_max to make CFG_MGMT_RETRY_MAX configurable. Default value for CFG_MGMT_RETRY_MAX is 15 to reduce the chances of connection failure in noisy environment. Change-Id: Id50cb68813fba517a8a1580a3d6662c73b0a381e CRs-Fixed: 2575385
This commit is contained in:
@@ -354,6 +354,7 @@ static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
cfg_get(psoc, CFG_REMOVE_TIME_STAMP_SYNC_CMD);
|
||||
gen->disable_4way_hs_offload =
|
||||
cfg_get(psoc, CFG_DISABLE_4WAY_HS_OFFLOAD);
|
||||
gen->mgmt_retry_max = cfg_get(psoc, CFG_MGMT_RETRY_MAX);
|
||||
}
|
||||
|
||||
static void mlme_init_edca_ani_cfg(struct wlan_mlme_edca_params *edca_params)
|
||||
|
@@ -617,6 +617,29 @@
|
||||
0, \
|
||||
"Enable/disable 4 way handshake offload to firmware")
|
||||
|
||||
/*
|
||||
* <ini>
|
||||
* mgmt_retry_max - Maximum Retries for mgmt frames
|
||||
* @Min: 0
|
||||
* @Max: 31
|
||||
* @Default: 15
|
||||
*
|
||||
* This ini is used to set maximum retries for mgmt frames
|
||||
*
|
||||
* Supported Feature: STA/SAP
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
#define CFG_MGMT_RETRY_MAX CFG_INI_UINT( \
|
||||
"mgmt_retry_max", \
|
||||
0, \
|
||||
31, \
|
||||
15, \
|
||||
CFG_VALUE_OR_DEFAULT, \
|
||||
"Max retries for mgmt frames")
|
||||
|
||||
#define CFG_GENERIC_ALL \
|
||||
CFG(CFG_ENABLE_DEBUG_PACKET_LOG) \
|
||||
CFG(CFG_PMF_SA_QUERY_MAX_RETRIES) \
|
||||
@@ -644,5 +667,6 @@
|
||||
CFG(CFG_ITO_REPEAT_COUNT) \
|
||||
CFG(CFG_ENABLE_BEACON_RECEPTION_STATS) \
|
||||
CFG(CFG_REMOVE_TIME_STAMP_SYNC_CMD) \
|
||||
CFG(CFG_MGMT_RETRY_MAX) \
|
||||
|
||||
#endif /* __CFG_MLME_GENERIC_H */
|
||||
|
@@ -2295,4 +2295,16 @@ char *mlme_get_roam_fail_reason_str(uint32_t result);
|
||||
* Return: Meaningful string from enum WMI_ROAM_TRIGGER_SUB_REASON_ID
|
||||
*/
|
||||
char *mlme_get_sub_reason_str(uint32_t sub_reason);
|
||||
|
||||
/**
|
||||
* wlan_mlme_get_mgmt_max_retry() - Get the
|
||||
* max mgmt retry
|
||||
* @psoc: pointer to psoc object
|
||||
* @max_retry: output pointer to hold user config
|
||||
*
|
||||
* Return: QDF Status
|
||||
*/
|
||||
QDF_STATUS
|
||||
wlan_mlme_get_mgmt_max_retry(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *max_retry);
|
||||
#endif /* _WLAN_MLME_API_H_ */
|
||||
|
@@ -1120,6 +1120,7 @@ struct wlan_mlme_chainmask {
|
||||
* mode
|
||||
* @disable_4way_hs_offload: enable/disable 4 way handshake offload to firmware
|
||||
* @as_enabled: antenna sharing enabled or not (FW capability)
|
||||
* @mgmt_retry_max: maximum retries for management frame
|
||||
*/
|
||||
struct wlan_mlme_generic {
|
||||
enum band_info band_capability;
|
||||
@@ -1151,6 +1152,7 @@ struct wlan_mlme_generic {
|
||||
bool data_stall_recovery_fw_support;
|
||||
bool disable_4way_hs_offload;
|
||||
bool as_enabled;
|
||||
uint8_t mgmt_retry_max;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@@ -3645,3 +3645,20 @@ char *mlme_get_sub_reason_str(uint32_t sub_reason)
|
||||
return "NONE";
|
||||
}
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wlan_mlme_get_mgmt_max_retry(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *max_retry)
|
||||
{
|
||||
struct wlan_mlme_psoc_ext_obj *mlme_obj;
|
||||
|
||||
mlme_obj = mlme_get_psoc_ext_obj(psoc);
|
||||
|
||||
if (!mlme_obj) {
|
||||
*max_retry = cfg_default(CFG_MGMT_RETRY_MAX);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
*max_retry = mlme_obj->cfg.gen.mgmt_retry_max;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
@@ -7087,10 +7087,12 @@ static int hdd_config_mgmt_retry(struct hdd_adapter *adapter,
|
||||
{
|
||||
uint8_t retry;
|
||||
int param_id;
|
||||
uint8_t max_mgmt_retry;
|
||||
|
||||
retry = nla_get_u8(attr);
|
||||
retry = retry > CFG_MGMT_RETRY_MAX ?
|
||||
CFG_MGMT_RETRY_MAX : retry;
|
||||
max_mgmt_retry = (cfg_max(CFG_MGMT_RETRY_MAX));
|
||||
retry = retry > max_mgmt_retry ?
|
||||
max_mgmt_retry : retry;
|
||||
param_id = WMI_PDEV_PARAM_MGMT_RETRY_LIMIT;
|
||||
|
||||
return wma_cli_set_command(adapter->vdev_id, param_id,
|
||||
|
@@ -213,7 +213,6 @@ typedef enum {
|
||||
|
||||
#define CFG_NON_AGG_RETRY_MAX (31)
|
||||
#define CFG_AGG_RETRY_MAX (31)
|
||||
#define CFG_MGMT_RETRY_MAX (31)
|
||||
#define CFG_CTRL_RETRY_MAX (31)
|
||||
#define CFG_PROPAGATION_DELAY_MAX (63)
|
||||
#define CFG_PROPAGATION_DELAY_BASE (64)
|
||||
|
@@ -11353,6 +11353,7 @@ static int hdd_pre_enable_configure(struct hdd_context *hdd_ctx)
|
||||
{
|
||||
int ret;
|
||||
uint8_t val = 0;
|
||||
uint8_t max_retry = 0;
|
||||
QDF_STATUS status;
|
||||
void *soc = cds_get_context(QDF_MODULE_ID_SOC);
|
||||
|
||||
@@ -11395,6 +11396,14 @@ static int hdd_pre_enable_configure(struct hdd_context *hdd_ctx)
|
||||
goto out;
|
||||
}
|
||||
|
||||
wlan_mlme_get_mgmt_max_retry(hdd_ctx->psoc, &max_retry);
|
||||
ret = sme_cli_set_command(0, WMI_PDEV_PARAM_MGMT_RETRY_LIMIT, max_retry,
|
||||
PDEV_CMD);
|
||||
if (0 != ret) {
|
||||
hdd_err("WMI_PDEV_PARAM_MGMT_RETRY_LIMIT failed %d", ret);
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = hdd_set_smart_chainmask_enabled(hdd_ctx);
|
||||
if (ret)
|
||||
goto out;
|
||||
|
Reference in New Issue
Block a user