diff --git a/inc/wlan_policy_mgr_api.h b/inc/wlan_policy_mgr_api.h index 28024645b332..59b645a28428 100644 --- a/inc/wlan_policy_mgr_api.h +++ b/inc/wlan_policy_mgr_api.h @@ -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 diff --git a/inc/wlan_policy_mgr_public_struct.h b/inc/wlan_policy_mgr_public_struct.h index a52029f0f7a7..89cb5c6ce7bd 100644 --- a/inc/wlan_policy_mgr_public_struct.h +++ b/inc/wlan_policy_mgr_public_struct.h @@ -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; }; /** diff --git a/inc/wlan_policy_mgr_ucfg.h b/inc/wlan_policy_mgr_ucfg.h index ab6e51c192d3..33e246cfa3fa 100644 --- a/inc/wlan_policy_mgr_ucfg.h +++ b/inc/wlan_policy_mgr_ucfg.h @@ -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 diff --git a/src/wlan_policy_mgr_action.c b/src/wlan_policy_mgr_action.c index ac2ddf75df79..a7514fbd9a8b 100644 --- a/src/wlan_policy_mgr_action.c +++ b/src/wlan_policy_mgr_action.c @@ -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); diff --git a/src/wlan_policy_mgr_get_set_utils.c b/src/wlan_policy_mgr_get_set_utils.c index 582db6828544..3aeddd794bac 100644 --- a/src/wlan_policy_mgr_get_set_utils.c +++ b/src/wlan_policy_mgr_get_set_utils.c @@ -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;