From 73050ff958817270ae6ced0567e72effd8f65ce6 Mon Sep 17 00:00:00 2001 From: Nitesh Shah Date: Wed, 12 Oct 2016 14:42:19 +0530 Subject: [PATCH] qcacld-3.0: Avoid setting hw_mode to SMM when already in SMM Whenever there is session disconnection, the device sets its hw_mode to SMM (Single MAC Mode) if the current connections are not using DBS mode. Thus, if the device is in SMM, it still sets its hw_mode to SMM after session disconnection. The enhancement is to check the if the device is already in SMM, then avoid setting again to SMM. Change-Id: I4ebb9b6d992e65667a06b3e68d322435c7ec2968 CRs-Fixed: 1076844 --- core/cds/src/cds_concurrency.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index a2c6abd50907..b6f8364b2143 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -3651,10 +3651,22 @@ enum cds_conc_next_action cds_need_opportunistic_upgrade(void) uint32_t conn_index; enum cds_conc_next_action upgrade = CDS_NOP; uint8_t mac = 0; + struct sir_hw_mode_params hw_mode; + QDF_STATUS status = QDF_STATUS_E_FAILURE; if (wma_is_hw_dbs_capable() == false) { cds_err("driver isn't dbs capable, no further action needed"); - return upgrade; + goto done; + } + + status = wma_get_current_hw_mode(&hw_mode); + if (!QDF_IS_STATUS_SUCCESS(status)) { + cds_err("wma_get_current_hw_mode failed"); + goto done; + } + if (!hw_mode.dbs_cap) { + cds_info("current HW mode is non-DBS capable"); + goto done; } /* Are both mac's still in use */