From 334ee752efa71a33c7ec11ce51a5f4c16fff69f1 Mon Sep 17 00:00:00 2001 From: Liangwei Dong Date: Fri, 21 Jul 2023 14:27:13 +0800 Subject: [PATCH] qcacld-3.0: Check nlink service bit enabled Check wmi_service_n_link_mlo_support bit enabled for API ml_is_nlink_service_supported. Change-Id: I0f2a3cb55f84549ac064c43d8b0a2f00738a0ddd CRs-Fixed: 3572844 --- .../umac/mlme/mlo_mgr/src/wlan_mlo_link_force.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/components/umac/mlme/mlo_mgr/src/wlan_mlo_link_force.c b/components/umac/mlme/mlo_mgr/src/wlan_mlo_link_force.c index 064fc3b299..520b16881b 100644 --- a/components/umac/mlme/mlo_mgr/src/wlan_mlo_link_force.c +++ b/components/umac/mlme/mlo_mgr/src/wlan_mlo_link_force.c @@ -26,6 +26,7 @@ #include "wlan_mlo_mgr_roam.h" #include "wlan_mlme_main.h" #include "wlan_mlo_mgr_link_switch.h" +#include "target_if.h" void ml_nlink_convert_linkid_bitmap_to_vdev_bitmap( @@ -424,8 +425,16 @@ ml_nlink_get_affect_ml_sta(struct wlan_objmgr_psoc *psoc) bool ml_is_nlink_service_supported(struct wlan_objmgr_psoc *psoc) { - /*todo: check WMI_SERVICE_N_LINK_MLO_SUPPORT service bit */ - return false; + struct wmi_unified *wmi_handle; + + wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); + if (!wmi_handle) { + mlo_err("Invalid WMI handle"); + return false; + } + return wmi_service_enabled( + wmi_handle, + wmi_service_n_link_mlo_support); } /* Exclude AP removed link */