qcacld-3.0: Add INI config option to control WMI credits

Add INI option to control consecutive WMI writes. Setting this 1
will essentially serializes the HTC WMI command writes.

Change-Id: I8e28990127f3e4dac2fa91ac9b9df87eed321a2a
CRs-Fixed: 2424795
This commit is contained in:
Manjunathappa Prakash 2019-03-27 15:17:41 -07:00 • committed by nshrivas
commit f5b6f5f4b7
4 changed files with 30 additions and 0 deletions

View file

@ -556,6 +556,7 @@ QDF_STATUS cds_open(struct wlan_objmgr_psoc *psoc)
ucfg_pmo_psoc_target_suspend_acknowledge;
htcInfo.target_initial_wakeup_cb = ucfg_pmo_psoc_handle_initial_wake_up;
htcInfo.target_psoc = (void *)psoc;
htcInfo.cfg_wmi_credit_cnt = hdd_ctx->config->cfg_wmi_credit_cnt;
qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
/* Create HTC */

View file

@ -915,6 +915,32 @@
#define CFG_DP_ENABLE_NUD_TRACKING_ALL
#endif
/*
* <ini>
* gWmiCreditCount - Credit count for WMI exchange
* @0: Not allowed
* @1: Serialize WMI commands, 1 command at a time
* @Default: 2: As advertized by FW
*
* This ini is used to serialize the WMI commandsif required.
*
* Related: None
*
* Usage: External
*
* <ini>
*/
#define WLAN_CFG_WMI_CREDIT_DEFAULT 0
#define WLAN_CFG_WMI_CREDIT_MIN 1
#define WLAN_CFG_WMI_CREDIT_MAX 2
#define CFG_DP_HTC_WMI_CREDIT_CNT \
CFG_INI_UINT("gWmiCreditCount", \
WLAN_CFG_WMI_CREDIT_MIN, \
WLAN_CFG_WMI_CREDIT_MAX, \
WLAN_CFG_WMI_CREDIT_DEFAULT, \
CFG_VALUE_OR_DEFAULT, "WMI HTC CREDIT COUNT")
#ifdef QCA_LL_LEGACY_TX_FLOW_CONTROL
#define CFG_HDD_DP_LEGACY_TX_FLOW \
CFG(CFG_DP_LL_TX_FLOW_LWM) \
@ -959,6 +985,7 @@
CFG(CFG_DP_FILTER_MULTICAST_REPLAY) \
CFG(CFG_DP_RX_WAKELOCK_TIMEOUT) \
CFG(CFG_DP_NUM_DP_RX_THREADS) \
CFG(CFG_DP_HTC_WMI_CREDIT_CNT) \
CFG_DP_ENABLE_FASTPATH_ALL \
CFG_HDD_DP_MSM_PLATFORM \
CFG_HDD_DP_LEGACY_TX_FLOW \

View file

@ -205,6 +205,7 @@ struct hdd_config {
uint32_t provisioned_intf_pool;
uint32_t derived_intf_pool;
uint8_t enable_rtt_support;
uint32_t cfg_wmi_credit_cnt;
};
#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))

View file

@ -2986,6 +2986,7 @@ void hdd_dp_cfg_update(struct wlan_objmgr_psoc *psoc,
config->rx_wakelock_timeout =
cfg_get(psoc, CFG_DP_RX_WAKELOCK_TIMEOUT);
config->num_dp_rx_threads = cfg_get(psoc, CFG_DP_NUM_DP_RX_THREADS);
config->cfg_wmi_credit_cnt = cfg_get(psoc, CFG_DP_HTC_WMI_CREDIT_CNT);
hdd_dp_dp_trace_cfg_update(config, psoc);
hdd_dp_nud_tracking_cfg_update(config, psoc);
}