qcacld-3.0: populate num_max_active_vdevs for WMI init

To make the active connections number configurable, based on
host configuration of INI gMaxConcurrentActiveSessions
host sets the num_max_active_vdevs in WMI init command to notify
the FW the number of active connections host expects to support.
FW will report the actual supported number in wmi ready event.
Policy mgr will record the FW supported number if FW number is
smaller than host requested.

Change-Id: I454c0cdde6be1e8a627f8fff08b6c7b2141b00f6
CRs-Fixed: 3183006
This commit is contained in:
Liangwei Dong
2022-04-26 14:40:49 +08:00
committed by Madan Koyyalamudi
parent 6977ac6da5
commit 1826cbf1c2
5 changed files with 110 additions and 4 deletions

View File

@@ -254,6 +254,34 @@ QDF_STATUS policy_mgr_set_dual_mac_feature(struct wlan_objmgr_psoc *psoc,
QDF_STATUS policy_mgr_get_force_1x1(struct wlan_objmgr_psoc *psoc,
uint8_t *force_1x1);
/**
* policy_mgr_get_max_conc_cxns() - to get configured max concurrent active
* connection count
*
* @psoc: pointer to psoc
*
* This API is used to query the configured max concurrent active connection
* count.
*
* Return: max active connection count
*/
uint32_t policy_mgr_get_max_conc_cxns(struct wlan_objmgr_psoc *psoc);
/**
* policy_mgr_set_max_conc_cxns() - to set supported max concurrent active
* connection count to policy mgr
*
* @psoc: pointer to psoc
* @max_conc_cxns: max active connection count
*
* This API is used to update the max concurrent active connection
* count to policy mgr
*
* Return: QDF_STATUS_SUCCESS if set successfully
*/
QDF_STATUS policy_mgr_set_max_conc_cxns(struct wlan_objmgr_psoc *psoc,
uint32_t max_conc_cxns);
/**
* policy_mgr_set_sta_sap_scc_on_dfs_chnl() - to set sta_sap_scc_on_dfs_chnl
* @psoc: pointer to psoc

View File

@@ -228,6 +228,35 @@ bool ucfg_policy_mgr_get_dual_sta_feature(struct wlan_objmgr_psoc *psoc);
*/
QDF_STATUS ucfg_policy_mgr_get_force_1x1(struct wlan_objmgr_psoc *psoc,
uint8_t *force_1x1);
/**
* ucfg_policy_mgr_get_max_conc_cxns() - to get configured max concurrent active
* connection count
*
* @psoc: pointer to psoc
*
* This API is used to query the configured max concurrent active connection
* count.
*
* Return: max active connection count
*/
uint32_t ucfg_policy_mgr_get_max_conc_cxns(struct wlan_objmgr_psoc *psoc);
/**
* ucfg_policy_mgr_set_max_conc_cxns() - to set supported max concurrent active
* connection count to policy mgr
*
* @psoc: pointer to psoc
* @max_conc_cxns: max active connection count
*
* This API is used to update the max concurrent active connection
* count to policy mgr
*
* Return: QDF_STATUS_SUCCESS if set successfully
*/
QDF_STATUS ucfg_policy_mgr_set_max_conc_cxns(struct wlan_objmgr_psoc *psoc,
uint32_t max_conc_cxns);
/**
* ucfg_policy_mgr_get_sta_sap_scc_on_dfs_chnl() - to find out if STA and SAP
* SCC is allowed on DFS channel

View File

@@ -143,6 +143,37 @@ QDF_STATUS policy_mgr_get_force_1x1(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
uint32_t policy_mgr_get_max_conc_cxns(struct wlan_objmgr_psoc *psoc)
{
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 0;
}
return pm_ctx->cfg.max_conc_cxns;
}
QDF_STATUS policy_mgr_set_max_conc_cxns(struct wlan_objmgr_psoc *psoc,
uint32_t max_conc_cxns)
{
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;
}
policy_mgr_debug("set max_conc_cxns %d old %d", max_conc_cxns,
pm_ctx->cfg.max_conc_cxns);
pm_ctx->cfg.max_conc_cxns = max_conc_cxns;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS
policy_mgr_set_sta_sap_scc_on_dfs_chnl(struct wlan_objmgr_psoc *psoc,
uint8_t sta_sap_scc_on_dfs_chnl)

View File

@@ -37,11 +37,15 @@ static QDF_STATUS policy_mgr_init_cfg(struct wlan_objmgr_psoc *psoc)
cfg->mcc_to_scc_switch = cfg_get(psoc, CFG_MCC_TO_SCC_SWITCH);
cfg->sys_pref = cfg_get(psoc, CFG_CONC_SYS_PREF);
if (wlan_is_mlo_sta_nan_ndi_allowed(psoc))
if (wlan_is_mlo_sta_nan_ndi_allowed(psoc)) {
cfg->max_conc_cxns = cfg_get(psoc, CFG_MAX_CONC_CXNS) + 1;
else
policy_mgr_err("max_conc_cxns %d nan", cfg->max_conc_cxns);
} else {
cfg->max_conc_cxns = cfg_get(psoc, CFG_MAX_CONC_CXNS);
policy_mgr_err("max_conc_cxns %d non-nan", cfg->max_conc_cxns);
}
cfg->max_conc_cxns = QDF_MIN(cfg->max_conc_cxns,
MAX_NUMBER_OF_CONC_CONNECTIONS);
cfg->conc_rule1 = cfg_get(psoc, CFG_ENABLE_CONC_RULE1);
cfg->conc_rule2 = cfg_get(psoc, CFG_ENABLE_CONC_RULE2);
cfg->pcl_band_priority = cfg_get(psoc, CFG_PCL_BAND_PRIORITY);
@@ -223,6 +227,17 @@ QDF_STATUS ucfg_policy_mgr_get_force_1x1(struct wlan_objmgr_psoc *psoc,
return policy_mgr_get_force_1x1(psoc, force_1x1);
}
uint32_t ucfg_policy_mgr_get_max_conc_cxns(struct wlan_objmgr_psoc *psoc)
{
return policy_mgr_get_max_conc_cxns(psoc);
}
QDF_STATUS ucfg_policy_mgr_set_max_conc_cxns(struct wlan_objmgr_psoc *psoc,
uint32_t max_conc_cxns)
{
return policy_mgr_set_max_conc_cxns(psoc, max_conc_cxns);
}
QDF_STATUS
ucfg_policy_mgr_get_sta_sap_scc_on_dfs_chnl(struct wlan_objmgr_psoc *psoc,
uint8_t *sta_sap_scc_on_dfs_chnl)