From 2063466dc0e7d3cab525bf22abb8db5bec8a4ea8 Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Tue, 15 Aug 2023 13:40:05 +0530 Subject: [PATCH] qcacld-3.0: Add changes to get the PCL for STA + LL_LT_SAP concurrency Currently there is no support to get the PCL for STA + LL_LT_SAP. With this change add support to get the PCL for STA + LL_LT_SAP from policy manager. Change-Id: I830eb6e783a79b832ee6646c78d556b3e9526762 CRs-Fixed: 3592302 --- .../policy_mgr/inc/wlan_policy_mgr_api.h | 2 + .../policy_mgr/src/wlan_policy_mgr_core.c | 43 +++++++++++++++++++ .../src/wlan_policy_mgr_get_set_utils.c | 1 + .../policy_mgr/src/wlan_policy_mgr_pcl.c | 2 + 4 files changed, 48 insertions(+) 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 a196532b1a..8b977334ca 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 @@ -131,6 +131,8 @@ static inline const char *pcl_type_to_string(uint32_t idx) CASE_RETURN_STRING(PM_SCC_ON_5G_LOW_5G_LOW_PLUS_SHARED_2G); CASE_RETURN_STRING(PM_SCC_ON_5G_HIGH_5G_HIGH_PLUS_SHARED_2G); CASE_RETURN_STRING(PM_SCC_ON_5G_HIGH_5G_HIGH_SCC_ON_5G_LOW_PLUS_SHARED_2G); + CASE_RETURN_STRING(PM_SBS_CH_MCC_CH); + CASE_RETURN_STRING(PM_SBS_5G_MCC_24G); default: return "Unknown"; } 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 5b8ecc1b46..36eb1eb50e 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 @@ -3730,6 +3730,49 @@ QDF_STATUS policy_mgr_get_channel_list(struct wlan_objmgr_psoc *psoc, false); status = QDF_STATUS_SUCCESS; break; + case PM_SBS_CH_MCC_CH: + get_sub_channels(psoc, + sbs_freqs, &sbs_num, + scc_freqs, &scc_num, + rest_freqs, &rest_num, + channel_list_5, chan_index_5, + channel_list_6, chan_index_6); + add_chlist_to_pcl(pm_ctx->pdev, + pcl_channels, pcl_weights, pcl_sz, + len, WEIGHT_OF_GROUP1_PCL_CHANNELS, + sbs_freqs, sbs_num, + skip_6ghz_channel); + add_chlist_to_pcl(pm_ctx->pdev, + pcl_channels, pcl_weights, pcl_sz, + len, WEIGHT_OF_GROUP2_PCL_CHANNELS, + rest_freqs, rest_num, + false); + status = QDF_STATUS_SUCCESS; + break; + case PM_SBS_5G_MCC_24G: + get_sub_channels(psoc, + sbs_freqs, &sbs_num, + scc_freqs, &scc_num, + rest_freqs, &rest_num, + channel_list_5, chan_index_5, + channel_list_6, chan_index_6); + add_chlist_to_pcl(pm_ctx->pdev, + pcl_channels, pcl_weights, pcl_sz, + len, WEIGHT_OF_GROUP1_PCL_CHANNELS, + sbs_freqs, sbs_num, + skip_6ghz_channel); + add_chlist_to_pcl(pm_ctx->pdev, + pcl_channels, pcl_weights, pcl_sz, + len, WEIGHT_OF_GROUP2_PCL_CHANNELS, + rest_freqs, rest_num, + skip_6ghz_channel); + add_chlist_to_pcl(pm_ctx->pdev, + pcl_channels, pcl_weights, pcl_sz, + len, WEIGHT_OF_GROUP3_PCL_CHANNELS, + channel_list_24, chan_index_24, + false); + status = QDF_STATUS_SUCCESS; + break; default: policy_mgr_err("unknown pcl value %d", pcl); break; 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 36ca7b9040..3a0decfab6 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 @@ -9524,6 +9524,7 @@ enum QDF_OPMODE policy_mgr_get_qdf_mode_from_pm( mode = QDF_STA_MODE; break; case PM_SAP_MODE: + case PM_LL_LT_SAP_MODE: mode = QDF_SAP_MODE; break; case PM_P2P_CLIENT_MODE: diff --git a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c index 5a9e38ad31..5f7e7c412a 100644 --- a/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c +++ b/components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c @@ -1763,6 +1763,8 @@ enum policy_mgr_one_connection_mode index = PM_NAN_DISC_24_1x1; else index = PM_NAN_DISC_24_2x2; + } else if (PM_LL_LT_SAP_MODE == pm_conc_connection_list[0].mode) { + index = PM_LL_LT_SAP_5_2x2; } policy_mgr_debug("mode:%d freq:%d chain:%d index:%d",