diff --git a/components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h b/components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h index c037d0ac95..83777fb2a1 100644 --- a/components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h +++ b/components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h @@ -674,6 +674,20 @@ static inline void policy_mgr_check_concurrent_intf_and_restart_sap( } #endif /* FEATURE_WLAN_MCC_TO_SCC_SWITCH */ +/** + * policy_mgr_get_conc_vdev_on_same_mac() - Function to get concurrent + * vdev on same mac + * @psoc: PSOC object information + * @vdev_id: vdev id + * @mac_id: mac id + * + * This function is used to get the conncurrent vdev on same mac + * + * Return: vdev id of the concurrent interface running on same mac + * + */ +uint32_t policy_mgr_get_conc_vdev_on_same_mac(struct wlan_objmgr_psoc *psoc, + uint32_t vdev_id, uint8_t mac_id); /** * policy_mgr_is_mcc_in_24G() - Function to check for MCC in 2.4GHz * @psoc: PSOC object information 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 52e51ce6c9..5eb26349cc 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 @@ -6034,6 +6034,35 @@ static bool policy_mgr_is_three_connection_mcc(void) WLAN_REG_MAX_24GHZ_CHAN_FREQ)) ? true : false; } +uint32_t policy_mgr_get_conc_vdev_on_same_mac(struct wlan_objmgr_psoc *psoc, + uint32_t vdev_id, uint8_t mac_id) +{ + uint32_t id = WLAN_INVALID_VDEV_ID; + uint32_t conn_index; + struct policy_mgr_psoc_priv_obj *pm_ctx; + + pm_ctx = policy_mgr_get_context(psoc); + if (!pm_ctx) { + policy_mgr_err("Invalid Context"); + return id; + } + + qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock); + for (conn_index = 0; conn_index < MAX_NUMBER_OF_CONC_CONNECTIONS; + conn_index++) { + if ((pm_conc_connection_list[conn_index].in_use) && + (pm_conc_connection_list[conn_index].vdev_id != vdev_id) && + (pm_conc_connection_list[conn_index].mac == mac_id)) { + id = pm_conc_connection_list[conn_index].vdev_id; + break; + } + } + + qdf_mutex_release(&pm_ctx->qdf_conc_list_lock); + + return id; +} + bool policy_mgr_is_mcc_in_24G(struct wlan_objmgr_psoc *psoc) { uint32_t num_connections = 0;