diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c index acd9086c0b48..986ac3029593 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c @@ -133,8 +133,9 @@ bool policy_mgr_is_dual_mac_disabled_in_ini( struct wlan_objmgr_psoc *psoc) { bool is_disabled = false; - enum dbs_support dbs_type = wlan_objmgr_psoc_get_dual_mac_disable(psoc); + uint8_t dbs_type = DISABLE_DBS_CXN_AND_SCAN; + policy_mgr_get_dual_mac_feature(psoc, &dbs_type); /* * If DBS support for connection is disabled through INI then assume * that DBS is not supported, so that policy manager takes diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c index ecc389173735..ab49036905a2 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c @@ -609,6 +609,7 @@ void policy_mgr_init_dbs_config(struct wlan_objmgr_psoc *psoc, uint32_t scan_config, uint32_t fw_config) { struct policy_mgr_psoc_priv_obj *pm_ctx; + uint8_t dual_mac_feature; pm_ctx = policy_mgr_get_context(psoc); if (!pm_ctx) { @@ -618,11 +619,11 @@ void policy_mgr_init_dbs_config(struct wlan_objmgr_psoc *psoc, pm_ctx->dual_mac_cfg.cur_scan_config = 0; pm_ctx->dual_mac_cfg.cur_fw_mode_config = 0; + dual_mac_feature = pm_ctx->cfg.dual_mac_feature; /* If dual mac features are disabled in the INI, we * need not proceed further */ - if (DISABLE_DBS_CXN_AND_SCAN == - wlan_objmgr_psoc_get_dual_mac_disable(psoc)) { + if (dual_mac_feature == DISABLE_DBS_CXN_AND_SCAN) { policy_mgr_err("Disabling dual mac capabilities"); /* All capabilities are initialized to 0. We can return */ goto done; @@ -3132,12 +3133,13 @@ uint32_t policy_mgr_get_hw_dbs_nss(struct wlan_objmgr_psoc *psoc, bool policy_mgr_is_scan_simultaneous_capable(struct wlan_objmgr_psoc *psoc) { - if ((DISABLE_DBS_CXN_AND_SCAN == - wlan_objmgr_psoc_get_dual_mac_disable(psoc)) || - (ENABLE_DBS_CXN_AND_DISABLE_DBS_SCAN == - wlan_objmgr_psoc_get_dual_mac_disable(psoc)) || - (ENABLE_DBS_CXN_AND_DISABLE_SIMULTANEOUS_SCAN == - wlan_objmgr_psoc_get_dual_mac_disable(psoc)) || + uint8_t dual_mac_feature = DISABLE_DBS_CXN_AND_SCAN; + + policy_mgr_get_dual_mac_feature(psoc, &dual_mac_feature); + if ((dual_mac_feature == DISABLE_DBS_CXN_AND_SCAN) || + (dual_mac_feature == ENABLE_DBS_CXN_AND_DISABLE_DBS_SCAN) || + (dual_mac_feature == + ENABLE_DBS_CXN_AND_DISABLE_SIMULTANEOUS_SCAN) || !policy_mgr_is_hw_dbs_capable(psoc)) return false; diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index dfb17bf16646..960b02afba7b 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9903,7 +9903,6 @@ static int hdd_update_user_config(struct hdd_context *hdd_ctx) struct wlan_objmgr_psoc_user_config *user_config; bool skip_dfs_in_p2p_search = false; uint8_t band_capability; - uint8_t dual_mac_feature = DISABLE_DBS_CXN_AND_SCAN; QDF_STATUS status; bool value = false; @@ -9911,11 +9910,6 @@ static int hdd_update_user_config(struct hdd_context *hdd_ctx) if (QDF_IS_STATUS_ERROR(status)) return -EIO; - status = ucfg_policy_mgr_get_dual_mac_feature(hdd_ctx->psoc, - &dual_mac_feature); - if (QDF_IS_STATUS_ERROR(status)) - return -EIO; - user_config = qdf_mem_malloc(sizeof(*user_config)); if (!user_config) return -ENOMEM;