From patchwork Fri Oct 12 09:30:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Govind Singh X-Patchwork-Id: 10638167 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 656091508 for ; Fri, 12 Oct 2018 09:30:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 53D322BC47 for ; Fri, 12 Oct 2018 09:30:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 473782BC4B; Fri, 12 Oct 2018 09:30:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E144F2BC47 for ; Fri, 12 Oct 2018 09:30:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=r/KYzgHs4HSjlXp8sKwBLJ/hkIzXgfjqI67iB4c6P6Y=; b=cPqUBEMoI9Wy2G C2xjgyVvUEfvvQoRyH0xr4V0dd9PEa4vUsjG7W56gOyBPEF42O2gJoXX0ytZdX+cNtj9y/F3Y+k3o mcQrX7/AqzLpOAmRtVEXB5eCFqHjpRtl1EjY1ie5FmM2SUcSP0PFmJIPYjl0VIRtmThdd7ge7dd0p 629vUgFNtlTqphLVPK9z1U5eOHUBrR1/oD1CHdf5uyZSYl6e5yB2+EjfmM2bDLnvKJL47OitR1soK rzUV6YxEI91wNWdaVCchfON9V+XxAhWP77eeIuie35+5yJi++W70vCbxbWphxCpK++ZOllv7FzIwm lf4ZLKrkZS5owQ6P8Ujw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gAtmP-000065-Tv; Fri, 12 Oct 2018 09:30:45 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gAtm8-0008PU-IX for ath10k@lists.infradead.org; Fri, 12 Oct 2018 09:30:32 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 7D67A60BF7; Fri, 12 Oct 2018 09:30:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539336618; bh=t4o8aIhjNKhMTUxAQDDUdPaiPLiYBeoDM3xZLARpmVU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kamGsxsDbOtIg8CDIMwLhT54bn2Q+nIIBj125q2+HBbzUoJo3PjAecJzMkt35vs37 6X7tfYx6Xe4gPg1KA84FA0jNdJczJoI/hm9IdXDEJv2ZvH+0aKDpoRs3y8D55Z6fL1 HXu9bS6HLLz3UlAhK4b1A4iqgNYNMgfPWH/ScJRc= Received: from govinds-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: govinds@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 843F16063F; Fri, 12 Oct 2018 09:30:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539336617; bh=t4o8aIhjNKhMTUxAQDDUdPaiPLiYBeoDM3xZLARpmVU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UMj5BcBAkx3JAupsQyJfmIGQswiWHcKAXUcwausJBc/AXQjn2kB71xiT2Q3D8VDfJ O2ZyWaD6k0pBrnU/pVkU2A/2IXgwF3DTg4TtPC5qD1tSF9iJtycUgqN/R7R2WeFJ7Q kJpcewWQ3X5g1mNc3NxXgRj33zUtLejoi9u1BmGw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 843F16063F Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=govinds@codeaurora.org From: Govind Singh To: ath10k@lists.infradead.org Subject: [PATCH 1/3] ath10k: Enable bus layer suspend/resume for WCN3990 Date: Fri, 12 Oct 2018 15:00:01 +0530 Message-Id: <20181012093003.11932-2-govinds@codeaurora.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181012093003.11932-1-govinds@codeaurora.org> References: <20181012093003.11932-1-govinds@codeaurora.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181012_023028_670222_163FE465 X-CRM114-Status: GOOD ( 10.74 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Govind Singh , linux-wireless@vger.kernel.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Register snoc bus layer suspend/resume PM ops and configure the wakeup source(CE2) for the device. Testing: Tested on WCN3990 HW. Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1. Signed-off-by: Govind Singh --- drivers/net/wireless/ath/ath10k/snoc.c | 45 ++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/snoc.c b/drivers/net/wireless/ath/ath10k/snoc.c index bdef3d00f3f4..6da951eea345 100644 --- a/drivers/net/wireless/ath/ath10k/snoc.c +++ b/drivers/net/wireless/ath/ath10k/snoc.c @@ -30,6 +30,7 @@ #define ATH10K_SNOC_RX_POST_RETRY_MS 50 #define CE_POLL_PIPE 4 +#define ATH10K_SNOC_WAKE_IRQ 2 static char *const ce_name[] = { "WLAN_CE_0", @@ -1025,6 +1026,46 @@ static int ath10k_snoc_hif_power_up(struct ath10k *ar) return ret; } +#ifdef CONFIG_PM +static int ath10k_snoc_hif_suspend(struct ath10k *ar) +{ + struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); + int ret; + + if (!device_may_wakeup(ar->dev)) + return -EPERM; + + ret = enable_irq_wake(ar_snoc->ce_irqs[ATH10K_SNOC_WAKE_IRQ].irq_line); + if (ret) { + ath10k_err(ar, "failed to enable wakeup irq\n"); + return ret; + } + + ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc device suspended\n"); + + return ret; +} + +static int ath10k_snoc_hif_resume(struct ath10k *ar) +{ + struct ath10k_snoc *ar_snoc = ath10k_snoc_priv(ar); + int ret; + + if (!device_may_wakeup(ar->dev)) + return -EPERM; + + ret = disable_irq_wake(ar_snoc->ce_irqs[ATH10K_SNOC_WAKE_IRQ].irq_line); + if (ret) { + ath10k_err(ar, "failed to disable wakeup irq\n"); + return ret; + } + + ath10k_dbg(ar, ATH10K_DBG_SNOC, "snoc device resumed\n"); + + return ret; +} +#endif + static const struct ath10k_hif_ops ath10k_snoc_hif_ops = { .read32 = ath10k_snoc_read32, .write32 = ath10k_snoc_write32, @@ -1038,6 +1079,10 @@ static const struct ath10k_hif_ops ath10k_snoc_hif_ops = { .send_complete_check = ath10k_snoc_hif_send_complete_check, .get_free_queue_number = ath10k_snoc_hif_get_free_queue_number, .get_target_info = ath10k_snoc_hif_get_target_info, +#ifdef CONFIG_PM + .suspend = ath10k_snoc_hif_suspend, + .resume = ath10k_snoc_hif_resume, +#endif }; static const struct ath10k_bus_ops ath10k_snoc_bus_ops = { From patchwork Fri Oct 12 09:30:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Govind Singh X-Patchwork-Id: 10638163 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 612CD112B for ; Fri, 12 Oct 2018 09:30:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D33F2BC46 for ; Fri, 12 Oct 2018 09:30:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 417AD2BC48; Fri, 12 Oct 2018 09:30:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E3C9B2BC46 for ; Fri, 12 Oct 2018 09:30:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=zIEYi6iUD23EtAtzj+a7dTKrKAyHnb9sv886FYOWl88=; b=Fa0ZYy7S7XD592 8H0tsZyEnIHhX8Qg5r8A4wjDGNz39OAz6WaVE04+SuVyWuttBSQSaL4m/FDrD7Ed5CSKRHXVS46eS or+V8egSmdfI7YrEjoUmQvzK5eyQuK/YAZ9wg1foAGYl//zRqXJqrOK4oxwhMdcUi1bUU2YbAruBQ s4blvHbIETu3YTWz0x0Q0s/hfKgfm4s8j4hfPbqKY9AfAcWjktcfdxOwkkpwBWQtDDWDtT/ePQgXP DUpGdQlNfqOtc9+pGcth9UYw4+mt9Azwcsav5JOp9AHP6L98Lb1nMPuf3YxnniFpJAIWp6DYQ+dVg cWMLqdOI9YEaf/LNeLXg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gAtmB-0008RI-HQ; Fri, 12 Oct 2018 09:30:31 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gAtm8-0008Pb-Ai for ath10k@lists.infradead.org; Fri, 12 Oct 2018 09:30:29 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 3FDF160C60; Fri, 12 Oct 2018 09:30:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539336620; bh=JbRXAVIBWwD16QNZWzV+fa1aFbd2FdekTlbm6N+BsdU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NpQvNXmaIrI8Csq6We7OfLtCE2F9IIgAnvf3MgT3EJUPArfbwF7VtKXVp6+TWA4Q7 lF4xpZbvGstUicXZufUASt5u3QxLbmTJNZxKE0o8aSFPveCymxdwzjO7kOF64bri/P cZpcFlA++lGMvuZFtlzeYkWJ4LtkK9mgr2QyXn7o= Received: from govinds-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: govinds@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8ACC260B73; Fri, 12 Oct 2018 09:30:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539336619; bh=JbRXAVIBWwD16QNZWzV+fa1aFbd2FdekTlbm6N+BsdU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GKZ0d+0skSWNGzCLMHFPBvj4YaLuxbL8+hCtuxnuyYxw8nW6KjbKqAygM8QG6hUjk MUMiW2TOLLXOfYCVfZeZtksqVb3m3eUQw0jxlxA+nbDUoXVw7lO4CqBH1s/NSoBSkc wTV0oORMHwGXM1MgmtNvOF5qoMH7OGXRr4/YK/Aw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8ACC260B73 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=govinds@codeaurora.org From: Govind Singh To: ath10k@lists.infradead.org Subject: [PATCH 2/3] ath10k: Disable interface pause wow config for integrated chipset Date: Fri, 12 Oct 2018 15:00:02 +0530 Message-Id: <20181012093003.11932-3-govinds@codeaurora.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181012093003.11932-1-govinds@codeaurora.org> References: <20181012093003.11932-1-govinds@codeaurora.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181012_023028_405980_9362AC89 X-CRM114-Status: UNSURE ( 9.45 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Govind Singh , linux-wireless@vger.kernel.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP wow pause iface config controls the PCI D0/D3-WOW cases for pcie bus state. Firmware does not expects WOW_IFACE_PAUSE_ENABLED config for bus/link that cannot be suspended ex:snoc and does not trigger common subsystem shutdown. Disable interface pause wow config for integrated chipset(WCN3990) for correct WOW configuration in the firmware. Testing: Tested on WCN3990 HW. Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1. Signed-off-by: Govind Singh --- drivers/net/wireless/ath/ath10k/wmi-tlv.c | 2 ++ drivers/net/wireless/ath/ath10k/wmi-tlv.h | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c index 8c49a26fc571..1e608ef6499c 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c @@ -3185,6 +3185,8 @@ ath10k_wmi_tlv_op_gen_wow_enable(struct ath10k *ar) cmd = (void *)tlv->value; cmd->enable = __cpu_to_le32(1); + if (ar->hif.bus == ATH10K_BUS_SNOC) + cmd->pause_iface_config = WOW_IFACE_PAUSE_DISABLED; ath10k_dbg(ar, ATH10K_DBG_WMI, "wmi tlv wow enable\n"); return skb; diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.h b/drivers/net/wireless/ath/ath10k/wmi-tlv.h index 3e1e340cd834..a8bdb5614b9b 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.h +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.h @@ -1968,8 +1968,15 @@ struct wmi_tlv_set_quiet_cmd { __le32 enabled; } __packed; +enum wmi_tlv_wow_interface_cfg { + WOW_IFACE_PAUSE_ENABLED, + WOW_IFACE_PAUSE_DISABLED +}; + struct wmi_tlv_wow_enable_cmd { __le32 enable; + __le32 pause_iface_config; + __le32 flags; } __packed; struct wmi_tlv_wow_host_wakeup_ind { From patchwork Fri Oct 12 09:30:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Govind Singh X-Patchwork-Id: 10638165 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5FD2B1508 for ; Fri, 12 Oct 2018 09:30:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4DF5D2BC46 for ; Fri, 12 Oct 2018 09:30:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 41C812BC48; Fri, 12 Oct 2018 09:30:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E6C092BC46 for ; Fri, 12 Oct 2018 09:30:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=us67cXRCumPwZ/QUL5MzIzXtkQmVL0iOI8dvt0Ivb+g=; b=deWqmRnzzykKvs AXduuYIRD/AAuukhd8nLPRGKD3dZdyAlfYTW9TLz6TJ5F/Ba/PhAwpkDqkNxP9XegGbAUk+xdyyaT tSCAd8mQSXgKcakZYTZgysVcpajkwmNfvqv9sXfuvhGHC8UbMMM/x0bAOQ8ry66IS+/OQVbmOinc3 4BNV9mmV4EjQ2ZVIbijQ03YgT/d2s5y8IvF9hTk3rBISFbE32puoMjmoSlggcAh/otnjAO3o+OB7i DEJfslQi+YYjST/Xzf6Ey/BgXPaeUKfj2hv8D8vSE3iMzaTmGwxSWFPyUgnr0slqLgJsTOk5X2oX5 dAni/YMzgibjdfQb3obA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gAtmG-0008Sp-74; Fri, 12 Oct 2018 09:30:36 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gAtm8-0008Ps-HH for ath10k@lists.infradead.org; Fri, 12 Oct 2018 09:30:30 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8CD6C60B73; Fri, 12 Oct 2018 09:30:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539336622; bh=zFFCV8dF/s0kQeAIi9JmB7de/s77Qvgt1PYPogvaYNI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R09pTZT3VQ9i0H0h1Zn9tkF9PurIvzRZp+A7LNMtmn5pxmghnKSLGi0yew/BSbpaP ZY4pnfD/znuBYMGcuKiEVfkEdHGqz7Cd5h19+n+lRmq+9Ds7rbtNlSGhnVCAe7q62R 3xY70mDzISRjfheovV/eTdfY5AhCvn0IXYX032l0= Received: from govinds-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: govinds@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 8F84D60209; Fri, 12 Oct 2018 09:30:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1539336622; bh=zFFCV8dF/s0kQeAIi9JmB7de/s77Qvgt1PYPogvaYNI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R09pTZT3VQ9i0H0h1Zn9tkF9PurIvzRZp+A7LNMtmn5pxmghnKSLGi0yew/BSbpaP ZY4pnfD/znuBYMGcuKiEVfkEdHGqz7Cd5h19+n+lRmq+9Ds7rbtNlSGhnVCAe7q62R 3xY70mDzISRjfheovV/eTdfY5AhCvn0IXYX032l0= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 8F84D60209 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=govinds@codeaurora.org From: Govind Singh To: ath10k@lists.infradead.org Subject: [PATCH 3/3] ath10k: Request credit report if flow control enabled on ep Date: Fri, 12 Oct 2018 15:00:03 +0530 Message-Id: <20181012093003.11932-4-govinds@codeaurora.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181012093003.11932-1-govinds@codeaurora.org> References: <20181012093003.11932-1-govinds@codeaurora.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181012_023028_632756_903E6D8D X-CRM114-Status: GOOD ( 11.94 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Govind Singh , linux-wireless@vger.kernel.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP FW credit flow control is enabled for only WMI ctrl service(CE3) but credit update is requested unconditionally on all HTC services as part of HTC tx in CE3/CE0/CE4. This is causing WOW failure as FW is not expecting credit report request on other end-points(CE0/CE4). Request credit report only on those endpoints where credit flow control is enabled. Testing: Tested on WCN3990 HW. Tested FW: WLAN.HL.2.0-01192-QCAHLSWMTPLZ-1. Signed-off-by: Govind Singh --- drivers/net/wireless/ath/ath10k/htc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c index 8902720b4e49..31f1a316be7c 100644 --- a/drivers/net/wireless/ath/ath10k/htc.c +++ b/drivers/net/wireless/ath/ath10k/htc.c @@ -87,7 +87,8 @@ static void ath10k_htc_prepare_tx_skb(struct ath10k_htc_ep *ep, hdr->eid = ep->eid; hdr->len = __cpu_to_le16(skb->len - sizeof(*hdr)); hdr->flags = 0; - hdr->flags |= ATH10K_HTC_FLAG_NEED_CREDIT_UPDATE; + if (ep->tx_credit_flow_enabled) + hdr->flags |= ATH10K_HTC_FLAG_NEED_CREDIT_UPDATE; spin_lock_bh(&ep->htc->tx_lock); hdr->seq_no = ep->seq_no++;