From 8818ab5102ee346e047f611c4bd68370b1ef017c Mon Sep 17 00:00:00 2001 From: Bapiraju Alla Date: Tue, 5 Jan 2021 14:40:39 +0530 Subject: [PATCH] qcacld-3.0: Don't Check for concurrency if pre_cac adapter exists Currently, host driver is checking for concurrency while handling the pre_cac request. pre_cac adapter won't be deleted until SAP is stopped. As a result the second pre cac request for the same SAP will be dropped due to this concurrency check. To avoid this, Don't check for pre cac concurrency if the pre cac adapter is already exists. Change-Id: I780c6310cf819da1a2f5c7c93590ccb1b544e7a4 CRs-Fixed: 2848736 --- core/hdd/src/wlan_hdd_sap_cond_chan_switch.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/hdd/src/wlan_hdd_sap_cond_chan_switch.c b/core/hdd/src/wlan_hdd_sap_cond_chan_switch.c index 0fed08d3cd8b..79f784a5ca9f 100644 --- a/core/hdd/src/wlan_hdd_sap_cond_chan_switch.c +++ b/core/hdd/src/wlan_hdd_sap_cond_chan_switch.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 @@ -187,11 +187,11 @@ static int __wlan_hdd_request_pre_cac(struct hdd_context *hdd_ctx, /* Flush existing pre_cac work */ if (hdd_ctx->sap_pre_cac_work.fn) cds_flush_work(&hdd_ctx->sap_pre_cac_work); - } - - if (policy_mgr_get_connection_count(hdd_ctx->psoc) > 1) { - hdd_err("pre cac not allowed in concurrency"); - return -EINVAL; + } else { + if (policy_mgr_get_connection_count(hdd_ctx->psoc) > 1) { + hdd_err("pre cac not allowed in concurrency"); + return -EINVAL; + } } ap_adapter = hdd_get_adapter(hdd_ctx, QDF_SAP_MODE);