diff --git a/target_if/init_deinit/inc/service_ready_param.h b/target_if/init_deinit/inc/service_ready_param.h index bffc1af151bc..09cc667950e7 100644 --- a/target_if/init_deinit/inc/service_ready_param.h +++ b/target_if/init_deinit/inc/service_ready_param.h @@ -116,6 +116,7 @@ struct wlan_psoc_host_ppe_threshold { * by hw_mode_id. * @pdev_id: pdev_id starts with 1. pdev_id 1 => phy_id 0, pdev_id 2 => phy_id 1 * @phy_id: Starts with 0 + * @hw_mode_config_type: holds the enum wmi_hw_mode_config_type * @bitmap of supported modulations * @supported_bands: supported bands, enum WLAN_BAND_CAPABILITY * @ampdu_density: ampdu density 0 for no restriction, 1 for 1/4 us, @@ -159,6 +160,7 @@ struct wlan_psoc_host_mac_phy_caps { uint32_t hw_mode_id; uint32_t pdev_id; uint32_t phy_id; + int hw_mode_config_type; uint32_t supports_11b:1, supports_11g:1, supports_11a:1, diff --git a/target_if/init_deinit/src/service_ready_util.c b/target_if/init_deinit/src/service_ready_util.c index 64fb26fcdfdc..e572b97faf4c 100644 --- a/target_if/init_deinit/src/service_ready_util.c +++ b/target_if/init_deinit/src/service_ready_util.c @@ -171,7 +171,8 @@ int init_deinit_populate_mac_phy_capability(void *handle, uint8_t *evt, target_if_err("failed to parse mac phy capability"); return qdf_status_to_os_return(status); } - + info->mac_phy_cap[info->total_mac_phy_cnt].hw_mode_config_type + = hw_cap->hw_mode_config_type; info->total_mac_phy_cnt++; phy_bit_map &= (phy_bit_map - 1); mac_phy_id++; diff --git a/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h b/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h index fe0dbe89591b..06d3925616c7 100644 --- a/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h +++ b/umac/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h @@ -40,6 +40,8 @@ #include "wlan_objmgr_psoc_obj.h" #include "wlan_policy_mgr_public_struct.h" +struct target_psoc_info; + typedef const enum policy_mgr_pcl_type pm_dbs_pcl_second_connection_table_type [PM_MAX_ONE_CONNECTION_MODE][PM_MAX_NUM_OF_MODE] @@ -1922,8 +1924,7 @@ void policy_mgr_init_dbs_hw_mode(struct wlan_objmgr_psoc *psoc, * policy_mgr_update_hw_mode_list() - Function to initialize DBS * HW modes in policy manager component * @psoc: PSOC object information - * @num_dbs_hw_modes: Number of HW modes - * @ev_wlan_dbs_hw_mode_list: HW list + * @tgt_hdl: Target psoc information * * This function to initialize the DBS HW modes in policy * manager @@ -1932,7 +1933,7 @@ void policy_mgr_init_dbs_hw_mode(struct wlan_objmgr_psoc *psoc, * */ QDF_STATUS policy_mgr_update_hw_mode_list(struct wlan_objmgr_psoc *psoc, - struct extended_caps *phy_caps); + struct target_psoc_info *tgt_hdl); /** * policy_mgr_update_hw_mode_index() - Function to update diff --git a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c index 0d1a40453298..3565eb110a7e 100644 --- a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c +++ b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c @@ -145,7 +145,8 @@ static enum hw_mode_bandwidth policy_mgr_map_wmi_channel_width_to_hw_mode_bw( return HW_MODE_BW_NONE; } -static void policy_mgr_get_hw_mode_params(WMI_MAC_PHY_CAPABILITIES *caps, +static void policy_mgr_get_hw_mode_params( + struct wlan_psoc_host_mac_phy_caps *caps, struct policy_mgr_mac_ss_bw_info *info) { if (!caps) { @@ -223,14 +224,15 @@ static void policy_mgr_set_hw_mode_params(struct wlan_objmgr_psoc *psoc, } QDF_STATUS policy_mgr_update_hw_mode_list(struct wlan_objmgr_psoc *psoc, - struct extended_caps *phy_caps) + struct target_psoc_info *tgt_hdl) { - WMI_MAC_PHY_CAPABILITIES *tmp; + struct wlan_psoc_host_mac_phy_caps *tmp; uint32_t i, hw_config_type, j = 0; uint32_t dbs_mode, sbs_mode; struct policy_mgr_mac_ss_bw_info mac0_ss_bw_info = {0}; struct policy_mgr_mac_ss_bw_info mac1_ss_bw_info = {0}; struct policy_mgr_psoc_priv_obj *pm_ctx; + struct tgt_info *info; pm_ctx = policy_mgr_get_context(psoc); if (!pm_ctx) { @@ -238,14 +240,10 @@ QDF_STATUS policy_mgr_update_hw_mode_list(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_E_FAILURE; } - if (!phy_caps) { - policy_mgr_err("Invalid phy capabilities"); - return QDF_STATUS_E_FAILURE; - } - - if (!phy_caps->num_hw_modes.num_hw_modes) { + info = &tgt_hdl->info; + if (!info->service_ext_param.num_hw_modes) { policy_mgr_err("Number of HW modes: %d", - phy_caps->num_hw_modes.num_hw_modes); + info->service_ext_param.num_hw_modes); return QDF_STATUS_E_FAILURE; } @@ -259,7 +257,7 @@ QDF_STATUS policy_mgr_update_hw_mode_list(struct wlan_objmgr_psoc *psoc, policy_mgr_debug("DBS list is freed"); } - pm_ctx->num_dbs_hw_modes = phy_caps->num_hw_modes.num_hw_modes; + pm_ctx->num_dbs_hw_modes = info->service_ext_param.num_hw_modes; pm_ctx->hw_mode.hw_mode_list = qdf_mem_malloc(sizeof(*pm_ctx->hw_mode.hw_mode_list) * pm_ctx->num_dbs_hw_modes); @@ -273,10 +271,9 @@ QDF_STATUS policy_mgr_update_hw_mode_list(struct wlan_objmgr_psoc *psoc, for (i = 0; i < pm_ctx->num_dbs_hw_modes; i++) { /* Update for MAC0 */ - tmp = &phy_caps->each_phy_cap_per_hwmode[j++]; + tmp = &info->mac_phy_cap[j++]; policy_mgr_get_hw_mode_params(tmp, &mac0_ss_bw_info); - hw_config_type = - phy_caps->each_hw_mode_cap[i].hw_mode_config_type; + hw_config_type = tmp->hw_mode_config_type; dbs_mode = HW_MODE_DBS_NONE; sbs_mode = HW_MODE_SBS_NONE; mac1_ss_bw_info.mac_tx_stream = 0; @@ -288,7 +285,7 @@ QDF_STATUS policy_mgr_update_hw_mode_list(struct wlan_objmgr_psoc *psoc, (hw_config_type == WMI_HW_MODE_SBS_PASSIVE) || (hw_config_type == WMI_HW_MODE_SBS)) { /* Update for MAC1 */ - tmp = &phy_caps->each_phy_cap_per_hwmode[j++]; + tmp = &info->mac_phy_cap[j++]; policy_mgr_get_hw_mode_params(tmp, &mac1_ss_bw_info); if (hw_config_type == WMI_HW_MODE_DBS) dbs_mode = HW_MODE_DBS;