From b1243a11ac7f9fc6005a7bb7b422b30f0eb974ad Mon Sep 17 00:00:00 2001 From: Liangwei Dong Date: Fri, 10 Nov 2023 14:51:01 +0800 Subject: [PATCH] qcacld-3.0: Enhance eMLSR connection check In the roaming to eMLSR AP, fw may move the link to inactive because concurrency not support eMLSR mode, the eMLSR cap in vdev may not be properly set in one vdev in the middle of roaming. Check inactive vdev as well for the eMLSR flag, if anyone vdev have eMLSR return true for API policy_mgr_is_mlo_in_mode_emlsr. Change-Id: Ia05200e16aae701c24e9d9c3a70c8139825db833 CRs-Fixed: 3647141 --- .../src/wlan_policy_mgr_get_set_utils.c | 28 +++++++++++++++++++ .../src/sys/legacy/src/utils/src/parser_api.c | 5 ++-- 2 files changed, 31 insertions(+), 2 deletions(-) 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 3826ec234d..b146277d00 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 @@ -6941,6 +6941,13 @@ bool policy_mgr_is_mlo_in_mode_emlsr(struct wlan_objmgr_psoc *psoc, uint8_t i, mlo_idx = 0; struct wlan_objmgr_vdev *temp_vdev; uint8_t vdev_id_list[MAX_NUMBER_OF_CONC_CONNECTIONS] = {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 false; + } mode_num = policy_mgr_get_mode_specific_conn_info(psoc, NULL, vdev_id_list, @@ -6967,6 +6974,27 @@ bool policy_mgr_is_mlo_in_mode_emlsr(struct wlan_objmgr_psoc *psoc, wlan_objmgr_vdev_release_ref(temp_vdev, WLAN_POLICY_MGR_ID); } + qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock); + for (i = 0; i < MAX_NUMBER_OF_DISABLE_LINK; i++) { + if (!pm_disabled_ml_links[i].in_use) + continue; + if (pm_disabled_ml_links[i].mode != PM_STA_MODE) + continue; + temp_vdev = + wlan_objmgr_get_vdev_by_id_from_psoc( + psoc, pm_disabled_ml_links[i].vdev_id, + WLAN_POLICY_MGR_ID); + if (!temp_vdev) { + policy_mgr_err("invalid inactive vdev for id %d", + pm_disabled_ml_links[i].vdev_id); + continue; + } + /* Check if existing vdev is eMLSR STA */ + if (wlan_vdev_mlme_cap_get(temp_vdev, WLAN_VDEV_C_EMLSR_CAP)) + emlsr_connection = true; + wlan_objmgr_vdev_release_ref(temp_vdev, WLAN_POLICY_MGR_ID); + } + qdf_mutex_release(&pm_ctx->qdf_conc_list_lock); end: if (num_mlo) *num_mlo = mlo_idx; diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c index 840d8fc115..de89a0b9b1 100644 --- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c +++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c @@ -4264,7 +4264,7 @@ sir_convert_assoc_resp_frame2_struct(struct mac_context *mac, session_entry, ar, pAssocRsp); sir_convert_assoc_resp_frame2_t2lm_struct(mac, frame, frame_len, session_entry, ar, pAssocRsp); - pe_debug("ht %d vht %d vendor vht: cap %d op %d, he %d he 6ghband %d eht %d eht320 %d, max idle: present %d val %d, he mu edca %d wmm %d qos %d", + pe_debug("ht %d vht %d vendor vht: cap %d op %d, he %d he 6ghband %d eht %d eht320 %d, max idle: present %d val %d, he mu edca %d wmm %d qos %d mlo %d", ar->HTCaps.present, ar->VHTCaps.present, ar->vendor_vht_ie.VHTCaps.present, ar->vendor_vht_ie.VHTOperation.present, ar->he_cap.present, @@ -4273,7 +4273,8 @@ sir_convert_assoc_resp_frame2_struct(struct mac_context *mac, ar->bss_max_idle_period.present, pAssocRsp->bss_max_idle_period.max_idle_period, ar->mu_edca_param_set.present, ar->WMMParams.present, - ar->QosMapSet.present); + ar->QosMapSet.present, + ar->mlo_ie.present); if (ar->WMMParams.present) __print_wmm_params(mac, &ar->WMMParams);