From e3f5eccb319e10b02a2fe2fa0d33f557f664cc8b Mon Sep 17 00:00:00 2001 From: Abhishek Ambure Date: Wed, 29 Apr 2020 21:52:35 +0530 Subject: [PATCH] qcacld-3.0: Do not enable STA roaming if any NDI connection is active Host disables STA roaming if any active NDI connection is present using "sta_disable_roam" ini. If NDI connection comes first and then STA connects to AP, then host enables STA roaming in the association completion of STA. If STA disconnects, roam scan is triggered which adds glitch in NDI connection. Hence enable STA roaming if there are no active NDI connections. Change-Id: I9594d9acc2d5d2255bd8914f6d58f726e3695601 CRs-Fixed: 2670756 --- core/sme/src/csr/csr_api_roam.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 9ff3265ee0a9..23ff282cd5a2 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -66,6 +66,7 @@ #include "wlan_policy_mgr_i.h" #include "wlan_scan_utils_api.h" #include "wlan_p2p_cfg_api.h" +#include "cfg_nan_api.h" #include #include "wlan_pkt_capture_ucfg_api.h" @@ -19624,6 +19625,7 @@ csr_roam_offload_scan(struct mac_context *mac_ctx, uint8_t session_id, bool prev_roaming_state; enum csr_akm_type roam_profile_akm = eCSR_AUTH_TYPE_UNKNOWN; uint32_t fw_akm_bitmap; + bool p2p_disable_sta_roaming = 0, nan_disable_sta_roaming = 0; sme_debug("RSO Command %d, vdev %d, Reason %d", command, session_id, reason); @@ -19708,14 +19710,22 @@ csr_roam_offload_scan(struct mac_context *mac_ctx, uint8_t session_id, } } - if (cfg_p2p_is_roam_config_disabled(mac_ctx->psoc) && - (command == ROAM_SCAN_OFFLOAD_START || - command == ROAM_SCAN_OFFLOAD_UPDATE_CFG) && - (policy_mgr_mode_specific_connection_count(mac_ctx->psoc, + p2p_disable_sta_roaming = + (cfg_p2p_is_roam_config_disabled(mac_ctx->psoc) && + (policy_mgr_mode_specific_connection_count(mac_ctx->psoc, PM_P2P_CLIENT_MODE, NULL) || + policy_mgr_mode_specific_connection_count(mac_ctx->psoc, + PM_P2P_GO_MODE, NULL))); + nan_disable_sta_roaming = + (cfg_nan_is_roam_config_disabled(mac_ctx->psoc) && policy_mgr_mode_specific_connection_count(mac_ctx->psoc, - PM_P2P_GO_MODE, NULL))) { - sme_info("roaming not supported for active p2p connection"); + PM_NDI_MODE, NULL)); + + if ((command == ROAM_SCAN_OFFLOAD_START || + command == ROAM_SCAN_OFFLOAD_UPDATE_CFG) && + (p2p_disable_sta_roaming || nan_disable_sta_roaming)) { + sme_info("roaming not supported for active %s connection", + p2p_disable_sta_roaming ? "p2p" : "ndi"); return QDF_STATUS_E_FAILURE; } /*