From b1cfca90d3d67a375da925f58a222059d99a73f5 Mon Sep 17 00:00:00 2001 From: Jianmin Zhu Date: Wed, 2 Jun 2021 20:21:44 +0800 Subject: [PATCH] qcacld-3.0: Failed to roam to all band after dual sta enabled For dual sta case, if vdev0 disconnected before vdev2 disconnected, vdev0 PCL cmd retained vdev level, after vdev0 reconnected first, just allowed intra band in PCL, only can roam in intra band. Fix: When vdev disconnect, reset it's PCL cmd to pdev level. Change-Id: I3ed3ec398cfe1a17d07ce716c27026b9660305bd CRs-Fixed: 2960194 --- .../umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c | 3 ++- core/sme/src/csr/csr_api_scan.c | 4 +++- 2 files changed, 5 insertions(+), 2 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 a692d4c26f63..dfe687cc5ba5 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -881,6 +881,7 @@ cm_roam_switch_to_deinit(struct wlan_objmgr_pdev *pdev, mlme_set_roam_state(psoc, vdev_id, WLAN_ROAM_DEINIT); mlme_clear_operations_bitmap(psoc, vdev_id); + wlan_cm_roam_activate_pcl_per_vdev(psoc, vdev_id, false); if (reason != REASON_SUPPLICANT_INIT_ROAMING) wlan_cm_enable_roaming_on_connected_sta(pdev, vdev_id); diff --git a/core/sme/src/csr/csr_api_scan.c b/core/sme/src/csr/csr_api_scan.c index f79dc3b79aeb..38d35257c04d 100644 --- a/core/sme/src/csr/csr_api_scan.c +++ b/core/sme/src/csr/csr_api_scan.c @@ -2689,12 +2689,14 @@ void csr_init_occupied_channels_list(struct mac_context *mac_ctx, dual_sta_roam_active = wlan_mlme_get_dual_sta_roaming_enabled(mac_ctx->psoc); + dual_sta_roam_active = dual_sta_roam_active && + policy_mgr_mode_specific_connection_count + (mac_ctx->psoc, PM_STA_MODE, NULL) >= 2; qdf_list_peek_front(list, &cur_lst); while (cur_lst) { cur_node = qdf_container_of(cur_lst, struct scan_cache_node, node); - if (csr_should_add_to_occupied_channels (chan->ch_freq, cur_node->entry->channel.chan_freq,