diff --git a/inc/wlan_policy_mgr_public_struct.h b/inc/wlan_policy_mgr_public_struct.h index 4a3bf4b961df..dde1b65ddd0b 100644 --- a/inc/wlan_policy_mgr_public_struct.h +++ b/inc/wlan_policy_mgr_public_struct.h @@ -981,11 +981,15 @@ struct dual_mac_config { * connections * @conc_system_pref: System preference for PCL table * @enable2x2: 2x2 chain mask user config + * @mcc_to_scc_switch_mode: Control SAP channel in concurrency + * @sub_20_mhz_enabled: Is 5 or 10 Mhz enabled */ struct policy_mgr_user_cfg { uint8_t enable_mcc_adaptive_scheduler; uint8_t max_concurrent_active_sessions; uint8_t conc_system_pref; bool enable2x2; + uint32_t mcc_to_scc_switch_mode; + bool sub_20_mhz_enabled; }; #endif /* __WLAN_POLICY_MGR_PUBLIC_STRUCT_H */ diff --git a/src/wlan_policy_mgr_core.c b/src/wlan_policy_mgr_core.c index 546bfdd4a16f..03fc3396196d 100644 --- a/src/wlan_policy_mgr_core.c +++ b/src/wlan_policy_mgr_core.c @@ -147,7 +147,15 @@ bool policy_mgr_is_dual_mac_disabled_in_ini( uint32_t policy_mgr_mcc_to_scc_switch_mode_in_user_cfg( struct wlan_objmgr_psoc *psoc) { - return 0; + struct policy_mgr_psoc_priv_obj *pm_ctx; + + pm_ctx = policy_mgr_get_context(psoc); + if (!pm_ctx) { + policy_mgr_err("Invalid Context"); + return 0; + } + + return pm_ctx->user_cfg.mcc_to_scc_switch_mode; } /** diff --git a/src/wlan_policy_mgr_get_set_utils.c b/src/wlan_policy_mgr_get_set_utils.c index 46cb04661818..380dae5a07d7 100644 --- a/src/wlan_policy_mgr_get_set_utils.c +++ b/src/wlan_policy_mgr_get_set_utils.c @@ -1419,9 +1419,17 @@ bool policy_mgr_max_concurrent_connections_reached( return false; } -static bool policy_mgr_is_sub_20_mhz_enabled(void) +static bool policy_mgr_is_sub_20_mhz_enabled(struct wlan_objmgr_psoc *psoc) { - return false; + struct policy_mgr_psoc_priv_obj *pm_ctx; + + pm_ctx = policy_mgr_get_context(psoc); + if (!pm_ctx) { + policy_mgr_err("Invalid Context"); + return false; + } + + return pm_ctx->user_cfg.sub_20_mhz_enabled; } bool policy_mgr_allow_concurrency(struct wlan_objmgr_psoc *psoc, @@ -1453,7 +1461,7 @@ bool policy_mgr_allow_concurrency(struct wlan_objmgr_psoc *psoc, /* find the current connection state from pm_conc_connection_list*/ num_connections = policy_mgr_get_connection_count(psoc); - if (num_connections && policy_mgr_is_sub_20_mhz_enabled()) { + if (num_connections && policy_mgr_is_sub_20_mhz_enabled(psoc)) { policy_mgr_err("dont allow concurrency if Sub 20 MHz is enabled"); status = false; goto done;