qcacld-3.0: Enable the DBS ini if DBS is mandatory

The driver does not check the device DBS capability
and the DBS ini compatibility( ch select policy)
If the DBS ini channel_select_logic_conc is disabled
and HW mandates DBS capability then overide the ini
to always keep it enable.

Change-Id: I629fd8661f70b64808a55c4c9bdafa9608787b09
CRs-Fixed: 2551648
This commit is contained in:
gaurank kathpalia 2019-11-13 11:08:26 +05:30 • committed by nshrivas
commit 34fe0b641b
4 changed files with 41 additions and 9 deletions

View file

@ -330,6 +330,18 @@ QDF_STATUS policy_mgr_get_conc_rule2(struct wlan_objmgr_psoc *psoc,
QDF_STATUS policy_mgr_get_chnl_select_plcy(struct wlan_objmgr_psoc *psoc,
uint32_t *chnl_select_plcy);
/**
* policy_mgr_set_ch_select_plcy() - to set channel selection policy
* @psoc: pointer to psoc
* @ch_select_policy: value to be set
*
* This API is used to set the ch selection policy.
*
* Return: QDF_STATUS_SUCCESS up on success and any other status for failure.
*/
QDF_STATUS policy_mgr_set_ch_select_plcy(struct wlan_objmgr_psoc *psoc,
uint32_t ch_select_policy);
/**
* policy_mgr_get_mcc_adaptive_sch() - to get mcc adaptive scheduler
* @psoc: pointer to psoc

View file

@ -98,6 +98,9 @@
1, 4, 3, \
CFG_VALUE_OR_DEFAULT, \
"Config max num allowed connections")
#define POLICY_MGR_CH_SELECT_POLICY_DEF 0x00000003
/*
* <ini>
* channel_select_logic_conc - Set channel selection logic
@ -121,12 +124,12 @@
* </ini>
*/
#define CFG_CHNL_SELECT_LOGIC_CONC CFG_INI_UINT(\
"channel_select_logic_conc",\
0x00000000, \
0xFFFFFFFF, \
0x00000003, \
CFG_VALUE_OR_DEFAULT, \
"Set channel selection policy for various concurrency")
"channel_select_logic_conc",\
0x00000000, \
0xFFFFFFFF, \
POLICY_MGR_CH_SELECT_POLICY_DEF, \
CFG_VALUE_OR_DEFAULT, \
"Set channel selection policy for various concurrency")
/*
* <ini>
* dbs_selection_policy - Configure dbs selection policy.

View file

@ -311,7 +311,7 @@ QDF_STATUS policy_mgr_get_conc_rule2(struct wlan_objmgr_psoc *psoc,
}
QDF_STATUS policy_mgr_get_chnl_select_plcy(struct wlan_objmgr_psoc *psoc,
uint32_t *chnl_select_plcy)
uint32_t *chnl_select_plcy)
{
struct policy_mgr_psoc_priv_obj *pm_ctx;
@ -325,6 +325,21 @@ QDF_STATUS policy_mgr_get_chnl_select_plcy(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
QDF_STATUS policy_mgr_set_ch_select_plcy(struct wlan_objmgr_psoc *psoc,
uint32_t ch_select_policy)
{
struct policy_mgr_psoc_priv_obj *pm_ctx;
pm_ctx = policy_mgr_get_context(psoc);
if (!pm_ctx) {
policy_mgr_err("pm_ctx is NULL");
return QDF_STATUS_E_FAILURE;
}
pm_ctx->cfg.chnl_select_plcy = ch_select_policy;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS policy_mgr_get_mcc_adaptive_sch(struct wlan_objmgr_psoc *psoc,
uint8_t *enable_mcc_adaptive_sch)
{

View file

@ -6732,10 +6732,12 @@ int wma_rx_service_ready_ext_event(void *handle, uint8_t *event,
WMA_LOGD("WMA --> WMI_INIT_CMDID");
if (wma_is_dbs_mandatory(wma_handle->psoc, tgt_hdl) &&
(policy_mgr_is_dual_mac_disabled_in_ini(wma_handle->psoc)))
(policy_mgr_is_dual_mac_disabled_in_ini(wma_handle->psoc))) {
policy_mgr_set_dual_mac_feature(wma_handle->psoc,
ENABLE_DBS_CXN_AND_DISABLE_SIMULTANEOUS_SCAN);
policy_mgr_set_ch_select_plcy(wma_handle->psoc,
POLICY_MGR_CH_SELECT_POLICY_DEF);
}
wma_init_scan_fw_mode_config(wma_handle->psoc, conc_scan_config_bits,
fw_config_bits);