mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
qcacld-3.0: Add host support to configure ITO repeat count
Add Host support to configure inactivity timeout repeated count from ini. Change-Id: I6b079ab55470838a9bf5488ec18dbd2977c3ee17 CRs-Fixed: 2066004
This commit is contained in:
parent
205f9d15e5
commit
9335d81f23
7 changed files with 81 additions and 0 deletions
|
|
@ -118,6 +118,7 @@ enum active_bpf_mode {
|
|||
* @active_mc_bc_bpf_mode: Setting that determines how BPF is applied in
|
||||
* active mode for MC/BC packets
|
||||
* @auto_power_save_fail_mode: auto detect power save failure mode
|
||||
* @ito_repeat_count: Indicates ito repeated count
|
||||
* Structure for holding cds ini parameters.
|
||||
*/
|
||||
|
||||
|
|
@ -174,5 +175,6 @@ struct cds_config_info {
|
|||
enum active_bpf_mode active_uc_bpf_mode;
|
||||
enum active_bpf_mode active_mc_bc_bpf_mode;
|
||||
bool auto_power_save_fail_mode;
|
||||
uint8_t ito_repeat_count;
|
||||
};
|
||||
#endif /* !defined( __CDS_CONFIG_H ) */
|
||||
|
|
|
|||
|
|
@ -10419,10 +10419,28 @@ enum hdd_external_acs_freq_band {
|
|||
#define CFG_TX_ORPHAN_ENABLE_DEFAULT (0)
|
||||
#define CFG_TX_ORPHAN_ENABLE_MIN (0)
|
||||
#define CFG_TX_ORPHAN_ENABLE_MAX (1)
|
||||
/*
|
||||
* <ini>
|
||||
* gItoRepeatCount - sets ito repeated count
|
||||
* @Min: 0
|
||||
* @Max: 5
|
||||
* @Default: 0
|
||||
*
|
||||
* This ini sets the ito count in FW
|
||||
*
|
||||
* Usage: External
|
||||
*
|
||||
* </ini>
|
||||
*/
|
||||
|
||||
#define CFG_ITO_REPEAT_COUNT_NAME "gItoRepeatCount"
|
||||
#define CFG_ITO_REPEAT_COUNT_MIN (0)
|
||||
#define CFG_ITO_REPEAT_COUNT_MAX (5)
|
||||
#define CFG_ITO_REPEAT_COUNT_DEFAULT (0)
|
||||
/*
|
||||
* Type declarations
|
||||
*/
|
||||
|
||||
struct hdd_config {
|
||||
/* Bitmap to track what is explicitly configured */
|
||||
DECLARE_BITMAP(bExplicitCfg, MAX_CFG_INI_ITEMS);
|
||||
|
|
@ -11162,6 +11180,7 @@ struct hdd_config {
|
|||
uint8_t auto_pwr_save_fail_mode;
|
||||
uint16_t num_11b_tx_chains;
|
||||
uint16_t num_11ag_tx_chains;
|
||||
uint8_t ito_repeat_count;
|
||||
};
|
||||
|
||||
#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))
|
||||
|
|
|
|||
|
|
@ -4455,6 +4455,14 @@ struct reg_table_entry g_registry_table[] = {
|
|||
CFG_11AG_NUM_TX_CHAIN_DEFAULT,
|
||||
CFG_11AG_NUM_TX_CHAIN_MIN,
|
||||
CFG_11AG_NUM_TX_CHAIN_MAX),
|
||||
|
||||
REG_VARIABLE(CFG_ITO_REPEAT_COUNT_NAME, WLAN_PARAM_Integer,
|
||||
struct hdd_config, ito_repeat_count,
|
||||
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
|
||||
CFG_ITO_REPEAT_COUNT_DEFAULT,
|
||||
CFG_ITO_REPEAT_COUNT_MIN,
|
||||
CFG_ITO_REPEAT_COUNT_MAX),
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -5993,6 +6001,9 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
|
|||
hdd_debug("Name = [%s] value = [%u]",
|
||||
CFG_11AG_NUM_TX_CHAIN_NAME,
|
||||
pHddCtx->config->num_11ag_tx_chains);
|
||||
hdd_debug("Name = [%s] value = [%u]",
|
||||
CFG_ITO_REPEAT_COUNT_NAME,
|
||||
pHddCtx->config->ito_repeat_count);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8044,6 +8044,8 @@ static int hdd_update_cds_config(hdd_context_t *hdd_ctx)
|
|||
cds_cfg->auto_power_save_fail_mode =
|
||||
hdd_ctx->config->auto_pwr_save_fail_mode;
|
||||
|
||||
cds_cfg->ito_repeat_count = hdd_ctx->config->ito_repeat_count;
|
||||
|
||||
hdd_ra_populate_cds_config(cds_cfg, hdd_ctx);
|
||||
hdd_txrx_populate_cds_config(cds_cfg, hdd_ctx);
|
||||
hdd_nan_populate_cds_config(cds_cfg, hdd_ctx);
|
||||
|
|
|
|||
|
|
@ -1351,6 +1351,7 @@ struct hw_mode_idx_to_mac_cap_idx {
|
|||
* @wmi_cmd_rsp_runtime_lock: wmi command response bus lock
|
||||
* @saved_chan: saved channel list sent as part of WMI_SCAN_CHAN_LIST_CMDID
|
||||
* @dfs_cac_offload: dfs and cac timer offload
|
||||
* @ito_repeat_count: Indicates ito repeated count
|
||||
*/
|
||||
typedef struct {
|
||||
void *wmi_handle;
|
||||
|
|
@ -1541,6 +1542,7 @@ typedef struct {
|
|||
#endif
|
||||
bool tx_bfee_8ss_enabled;
|
||||
bool in_imps;
|
||||
uint8_t ito_repeat_count;
|
||||
} t_wma_handle, *tp_wma_handle;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2571,6 +2571,8 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc, void *cds_context,
|
|||
wma_rx_aggr_failure_event_handler,
|
||||
WMA_RX_SERIALIZER_CTX);
|
||||
|
||||
wma_handle->ito_repeat_count = cds_cfg->ito_repeat_count;
|
||||
|
||||
/* Register PWR_SAVE_FAIL event only in case of recovery(1) */
|
||||
if (cds_cfg->auto_power_save_fail_mode) {
|
||||
wmi_unified_register_event_handler(wma_handle->wmi_handle,
|
||||
|
|
|
|||
|
|
@ -821,6 +821,22 @@ void wma_enable_sta_ps_mode(tp_wma_handle wma, tpEnablePsParams ps_req)
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (wma->ito_repeat_count) {
|
||||
WMA_LOGI("Set ITO count to %d for vdevId %d",
|
||||
wma->ito_repeat_count, vdev_id);
|
||||
|
||||
ret = wma_unified_set_sta_ps_param(wma->wmi_handle,
|
||||
vdev_id,
|
||||
WMI_STA_PS_PARAM_MAX_RESET_ITO_COUNT_ON_TIM_NO_TXRX,
|
||||
wma->ito_repeat_count);
|
||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
||||
WMA_LOGE("Set ITO count failed vdevId %d Error %d",
|
||||
vdev_id, ret);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* power save request succeeded */
|
||||
iface->in_bmps = true;
|
||||
}
|
||||
|
|
@ -1755,6 +1771,8 @@ static void wma_configure_vdev_suspend_params(tp_wma_handle wma,
|
|||
struct wma_txrx_node *iface = &wma->interfaces[vdev_id];
|
||||
struct sAniSirGlobal *mac;
|
||||
QDF_STATUS ret;
|
||||
uint8_t ito_repeat_count_value = 0;
|
||||
uint32_t inactivity_time;
|
||||
|
||||
if (iface->type != WMI_VDEV_TYPE_STA)
|
||||
return;
|
||||
|
|
@ -1781,6 +1799,31 @@ static void wma_configure_vdev_suspend_params(tp_wma_handle wma,
|
|||
WMA_LOGE("%s: Setting InActivity time Failed.",
|
||||
__func__);
|
||||
|
||||
if (wlan_cfg_get_int(mac, WNI_CFG_PS_DATA_INACTIVITY_TIMEOUT,
|
||||
&inactivity_time) != eSIR_SUCCESS) {
|
||||
QDF_TRACE(QDF_MODULE_ID_WMA, QDF_TRACE_LEVEL_ERROR,
|
||||
"Failed to get WNI_CFG_PS_DATA_INACTIVITY_TIMEOUT");
|
||||
inactivity_time = POWERSAVE_DEFAULT_INACTIVITY_TIME;
|
||||
}
|
||||
|
||||
/*
|
||||
* To keep ito repeat count same in wow mode as in non wow mode,
|
||||
* modulating ito repeat count value.
|
||||
*/
|
||||
ito_repeat_count_value = (inactivity_time / cfg_data_val) *
|
||||
wma->ito_repeat_count;
|
||||
|
||||
if (ito_repeat_count_value) {
|
||||
ret = wma_unified_set_sta_ps_param(wma->wmi_handle, vdev_id,
|
||||
WMI_STA_PS_PARAM_MAX_RESET_ITO_COUNT_ON_TIM_NO_TXRX ,
|
||||
ito_repeat_count_value);
|
||||
WMA_LOGD("%s: Setting ito_repeat_count_value %d.", __func__,
|
||||
ito_repeat_count_value);
|
||||
|
||||
if (ret)
|
||||
WMA_LOGE("%s: Setting ITO count failed.", __func__);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue