From bd71eb03d9e24755176a07dfbb5169a4dd538c00 Mon Sep 17 00:00:00 2001 From: Bala Venkatesh Date: Thu, 11 Oct 2018 10:36:23 +0530 Subject: [PATCH] qcacld-3.0: Return success for ps command in disconnected state Driver won't handle the ps in disconnected state. But kernel can give ps enable/disable command in non associated state hence return success without posting the request to FW. Change-Id: I6b559c30cff816c2ba056ef23633fb350e867db7 CRs-Fixed: 2321744 --- core/sme/src/common/sme_power_save.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/sme/src/common/sme_power_save.c b/core/sme/src/common/sme_power_save.c index 6a13844a8e79..ed418863ce55 100644 --- a/core/sme/src/common/sme_power_save.c +++ b/core/sme/src/common/sme_power_save.c @@ -383,11 +383,13 @@ QDF_STATUS sme_ps_enable_disable(tHalHandle hal_ctx, uint32_t session_id, status = sme_enable_sta_ps_check(mac_ctx, session_id); if (status != QDF_STATUS_SUCCESS) { /* - * In non associated state ps state will be disabled in FW. - * Hence, return success if ps disable is requested - * in disconnected state. + * In non associated state driver wont handle the power save + * But kernel expects return status success even + * in the disconnected state. + * TODO: If driver to remember the ps state to further use + * after connection. */ - if (command == SME_PS_DISABLE) + if (!csr_is_conn_state_connected_infra(mac_ctx, session_id)) status = QDF_STATUS_SUCCESS; return status; }