From bd699c287bd461351103f0ad931c37f3aca6c47b Mon Sep 17 00:00:00 2001 From: Pragaspathi Thilagaraj Date: Sun, 6 Aug 2023 23:35:35 +0530 Subject: [PATCH] qcacld-3.0: Modify mlo supported bands based on roam_band_bitmap roam_band_bitmap is updated based on the vendor command from userspace, when NCHO band configuration is received. Update the MLO support_link_band sent to firmware as part of the RSO commands to intersect the user configured roam_band_bitmap value. This will restrict the firmware to advertise only those bands sent in the WMI_ROAM_MLO_CONFIG_CMDID command, and firmware will advertise only links corresponding to the configured bands in the reassociation request. WMI_ROAM_MLO_CONFIG_CMDID will be sent when QCA_ATTR_ROAM_CONTROL_BAND_MASK attribute is received in roaming subcmd: QCA_WLAN_VENDOR_ROAMING_SUBCMD_CONTROL_SET as part of NCHO set band, since RSO stop, followed by start is sent during set band to update PCL to firmware Change-Id: Iba34411956bdb09502623bac9a51fb4663c632a8 CRs-Fixed: 3580693 --- .../connection_mgr/core/src/wlan_cm_roam_offload.c | 13 +++++++++++++ .../dispatcher/inc/wlan_cm_roam_public_struct.h | 4 +--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c index d7c6493bb5..8159256493 100644 --- a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c +++ b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c @@ -3032,6 +3032,7 @@ cm_roam_mlo_config(struct wlan_objmgr_psoc *psoc, struct wlan_roam_start_config *start_req) { struct wlan_roam_mlo_config *roam_mlo_params; + struct rso_config *rso_cfg; roam_mlo_params = &start_req->roam_mlo_params; roam_mlo_params->vdev_id = wlan_vdev_get_id(vdev); @@ -3039,6 +3040,18 @@ cm_roam_mlo_config(struct wlan_objmgr_psoc *psoc, wlan_mlme_get_sta_mlo_conn_max_num(psoc); roam_mlo_params->support_link_band = wlan_mlme_get_sta_mlo_conn_band_bmp(psoc); + + /* + * Update the supported link band based on roam_band_bitmap + * Roam band bitmap is modified during NCHO mode enable, disable and + * regulatory supported band changes. + */ + rso_cfg = wlan_cm_get_rso_config(vdev); + if (!rso_cfg) + return; + + roam_mlo_params->support_link_band &= + rso_cfg->roam_band_bitmask; } #else static void diff --git a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h index 2af80f29f1..3fce204097 100644 --- a/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h +++ b/components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h @@ -1943,9 +1943,7 @@ enum roam_rt_stats_params { * @support_link_num: Configure max number of link mlo connection supports. * Invalid value or 0 will use max supported value by fw. * @support_link_band: Configure the band bitmap of mlo connection supports - * Bit 0: 2G band support if 1 - * Bit 1: 5G band support if 1 - * Bit 2: 6G band support if 1 + * The bits of the bitmap are defined by the enum reg_wifi_band */ struct wlan_roam_mlo_config { uint8_t vdev_id;