qcacmn: Refactor operation related to DBS/vdev/channel selection INIs
Ownership of dbs_selection_policy, vdev_priority_list, channel_select_logic_conc INIs' are changed from HDD to Policy manager. So policy manager doesn't have to rely on HDD to obtain the INI setting. CRs-Fixed: 2324395 Change-Id: I8b38916d92931ef9cd1727481740bc61cad8f808
This commit is contained in:
@@ -136,14 +136,14 @@ QDF_STATUS policy_mgr_get_conc_rule2(struct wlan_objmgr_psoc *psoc,
|
||||
/**
|
||||
* policy_mgr_get_dbs_selection_plcy() - DBS HW mode selection setting
|
||||
* @psoc: pointer to psoc
|
||||
* @dbs_selection_policy: value to be filled
|
||||
* @dbs_selection_plcy: value to be filled
|
||||
*
|
||||
* This API is used to find out DBS HW mode preference.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS up on success and any other status for failure.
|
||||
*/
|
||||
QDF_STATUS policy_mgr_get_dbs_selection_plcy(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *dbs_selection_policy);
|
||||
uint32_t *dbs_selection_plcy);
|
||||
/**
|
||||
* policy_mgr_get_vdev_priority_list() - to get vdev priority list
|
||||
* @psoc: pointer to psoc
|
||||
|
@@ -1055,27 +1055,13 @@ enum policy_mgr_pri_id {
|
||||
* @enable_mcc_adaptive_scheduler: Enable MCC adaptive scheduler
|
||||
* @enable2x2: 2x2 chain mask user config
|
||||
* @sub_20_mhz_enabled: Is 5 or 10 Mhz enabled
|
||||
* @dbs_selection_policy: band preference or Vdev preference
|
||||
* bit[0] = 0: 5G 2x2 preferred to select 2x2 5G + 1x1 2G DBS mode.
|
||||
* bit[0] = 1: 2G 2x2 preferred to select 2x2 2G + 1x1 5G DBS mode.
|
||||
* bit[1] = 1: vdev priority enabled.
|
||||
* bit[1] = 0: vdev priority disabled.
|
||||
* @vdev_priority_list: vdev priority list
|
||||
* bit[0-3]: pri_id (policy_mgr_pri_id) of highest priority
|
||||
* bit[4-7]: pri_id (policy_mgr_pri_id) of second priority
|
||||
* bit[8-11]: pri_id (policy_mgr_pri_id) of third priority
|
||||
* bit[12-15]: pri_id (policy_mgr_pri_id) of fourth priority
|
||||
* example: 0x4321 - CLI < GO < SAP < STA
|
||||
*/
|
||||
struct policy_mgr_user_cfg {
|
||||
uint8_t enable_mcc_adaptive_scheduler;
|
||||
bool enable2x2;
|
||||
bool sub_20_mhz_enabled;
|
||||
bool is_sta_sap_scc_allowed_on_dfs_chan;
|
||||
uint32_t channel_select_logic_conc;
|
||||
uint32_t sta_sap_scc_on_lte_coex_chan;
|
||||
uint32_t dbs_selection_policy;
|
||||
uint32_t vdev_priority_list;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -121,14 +121,14 @@ QDF_STATUS ucfg_policy_mgr_get_conc_rule2(struct wlan_objmgr_psoc *psoc,
|
||||
/**
|
||||
* ucfg_policy_mgr_get_dbs_selection_plcy() - DBS HW mode selection setting
|
||||
* @psoc: pointer to psoc
|
||||
* @dbs_selection_policy: value to be filled
|
||||
* @dbs_selection_plcy: value to be filled
|
||||
*
|
||||
* This API is used to find out DBS HW mode preference.
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS up on success and any other status for failure.
|
||||
*/
|
||||
QDF_STATUS ucfg_policy_mgr_get_dbs_selection_plcy(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t *dbs_selection_policy);
|
||||
uint32_t *dbs_selection_plcy);
|
||||
/**
|
||||
* ucfg_policy_mgr_get_vdev_priority_list() - to get vdev priority list
|
||||
* @psoc: pointer to psoc
|
||||
|
@@ -392,6 +392,7 @@ bool policy_mgr_is_dbs_allowed_for_concurrency(
|
||||
struct policy_mgr_psoc_priv_obj *pm_ctx;
|
||||
uint32_t count, dbs_for_sta_sta, dbs_for_sta_p2p;
|
||||
bool ret = true;
|
||||
uint32_t ch_sel_plcy;
|
||||
|
||||
pm_ctx = policy_mgr_get_context(psoc);
|
||||
if (!pm_ctx) {
|
||||
@@ -404,10 +405,9 @@ bool policy_mgr_is_dbs_allowed_for_concurrency(
|
||||
if (count != 1 || new_conn_mode == QDF_MAX_NO_OF_MODE)
|
||||
return ret;
|
||||
|
||||
dbs_for_sta_sta = PM_CHANNEL_SELECT_LOGIC_STA_STA_GET(pm_ctx->user_cfg.
|
||||
channel_select_logic_conc);
|
||||
dbs_for_sta_p2p = PM_CHANNEL_SELECT_LOGIC_STA_P2P_GET(pm_ctx->user_cfg.
|
||||
channel_select_logic_conc);
|
||||
ch_sel_plcy = pm_ctx->cfg.chnl_select_plcy;
|
||||
dbs_for_sta_sta = PM_CHANNEL_SELECT_LOGIC_STA_STA_GET(ch_sel_plcy);
|
||||
dbs_for_sta_p2p = PM_CHANNEL_SELECT_LOGIC_STA_P2P_GET(ch_sel_plcy);
|
||||
|
||||
switch (pm_conc_connection_list[0].mode) {
|
||||
case PM_STA_MODE:
|
||||
@@ -592,12 +592,12 @@ policy_mgr_get_preferred_dbs_action_table(
|
||||
policy_mgr_debug("target only supports DBS1!");
|
||||
goto DONE;
|
||||
}
|
||||
if (PM_GET_BAND_PREFERRED(pm_ctx->user_cfg.dbs_selection_policy) == 1)
|
||||
if (PM_GET_BAND_PREFERRED(pm_ctx->cfg.dbs_selection_plcy) == 1)
|
||||
band_pref_5g = false;
|
||||
|
||||
if (PM_GET_VDEV_PRIORITY_ENABLED(
|
||||
pm_ctx->user_cfg.dbs_selection_policy) == 1 &&
|
||||
pm_ctx->user_cfg.vdev_priority_list)
|
||||
pm_ctx->cfg.dbs_selection_plcy) == 1 &&
|
||||
pm_ctx->cfg.vdev_priority_list)
|
||||
vdev_priority_enabled = true;
|
||||
|
||||
if (!vdev_priority_enabled)
|
||||
@@ -619,7 +619,7 @@ policy_mgr_get_preferred_dbs_action_table(
|
||||
vdev_id, new_conn_op_mode, channel,
|
||||
reason);
|
||||
}
|
||||
vdev_pri_list = pm_ctx->user_cfg.vdev_priority_list;
|
||||
vdev_pri_list = pm_ctx->cfg.vdev_priority_list;
|
||||
while (vdev_pri_list) {
|
||||
vdev_pri_id = vdev_pri_list & 0xF;
|
||||
pri_conn_mode = policy_mgr_pri_id_to_con_mode(vdev_pri_id);
|
||||
|
@@ -2112,10 +2112,10 @@ QDF_STATUS policy_mgr_set_user_cfg(struct wlan_objmgr_psoc *psoc,
|
||||
}
|
||||
|
||||
pm_ctx->user_cfg = *user_cfg;
|
||||
policy_mgr_debug("dbs_selection_policy 0x%x",
|
||||
user_cfg->dbs_selection_policy);
|
||||
policy_mgr_debug("dbs_selection_plcy 0x%x",
|
||||
pm_ctx->cfg.dbs_selection_plcy);
|
||||
policy_mgr_debug("vdev_priority_list 0x%x",
|
||||
user_cfg->vdev_priority_list);
|
||||
pm_ctx->cfg.vdev_priority_list);
|
||||
pm_ctx->cur_conc_system_pref = pm_ctx->cfg.sys_pref;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
Reference in New Issue
Block a user