From f175b03beaf861e1b277ae2e1511af73e3ecb89c Mon Sep 17 00:00:00 2001 From: Pragaspathi Thilagaraj Date: Thu, 17 Sep 2020 20:16:34 +0530 Subject: [PATCH] qcacld-3.0: Fix invalid pcl weight for 2G channels in 6G sta connection When band mask for connected STA is 7(connected in 6GHz), the weight of 2.4Ghz channels is sent as 1(weight of non-pcl channels). This allows firmware to roam to 2.4Ghz AP with dual sta roaming enabled. For 6Ghz connection, set 2.4Ghz channels weight to 0 to disallow fw roaming. Change-Id: I9581c51a827e6fa6ac186b531639ce4835ba0faa CRs-Fixed: 2775276 --- .../cmn_services/policy_mgr/src/wlan_policy_mgr_core.c | 3 ++- .../connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) 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 5c5827677134..8530a819ad98 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 @@ -1513,7 +1513,8 @@ QDF_STATUS policy_mgr_set_pcl(struct wlan_objmgr_psoc *psoc, req_msg->band_mask = policy_mgr_get_connected_roaming_vdev_band_mask(psoc, vdev_id); - policy_mgr_debug("Connected STA band mask%d", req_msg->band_mask); + policy_mgr_debug("RSO_CFG: vdev:%d Connected STA band_mask:%d", + vdev_id, req_msg->band_mask); for (i = 0; i < msg->pcl_len; i++) { req_msg->chan_weights.pcl_list[i] = msg->pcl_list[i]; diff --git a/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c index afecb3746780..43a11990ebad 100644 --- a/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c +++ b/components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_tgt_if_tx_api.c @@ -114,7 +114,9 @@ wlan_cm_roam_send_set_vdev_pcl(struct wlan_objmgr_psoc *psoc, /* Dont allow roaming on 2G when 5G_ONLY configured */ if ((band_capability == BIT(REG_BAND_5G) || - pcl_req->band_mask == BIT(REG_BAND_5G)) && + band_capability == BIT(REG_BAND_6G) || + pcl_req->band_mask == BIT(REG_BAND_5G) || + pcl_req->band_mask == BIT(REG_BAND_6G)) && WLAN_REG_IS_24GHZ_CH_FREQ(weights->saved_chan_list[i])) weights->weighed_valid_list[i] = WEIGHT_OF_DISALLOWED_CHANNELS; @@ -131,7 +133,7 @@ wlan_cm_roam_send_set_vdev_pcl(struct wlan_objmgr_psoc *psoc, goto end; } - mlme_debug("LFR3: vdev[%d] Dump Vdev PCL weights", pcl_req->vdev_id); + mlme_debug("RSO_CFG: vdev[%d] Dump Vdev PCL weights", pcl_req->vdev_id); policy_mgr_dump_channel_list(weights->saved_num_chan, weights->saved_chan_list, weights->weighed_valid_list);