From patchwork Sat Sep 30 17:37:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: silexcommon@gmail.com X-Patchwork-Id: 9979575 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 804F96034B for ; Sat, 30 Sep 2017 17:39:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6917128F11 for ; Sat, 30 Sep 2017 17:39:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D72328F29; Sat, 30 Sep 2017 17:39:37 +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=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 116D428F11 for ; Sat, 30 Sep 2017 17:39: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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=okGpo30dJWGJZozxrxhK0DnmCt4o9w0pOwjgI+O0xZY=; b=jJqZvCw700EtrPBZYkgk5nomVF Uv/119VLZmgio+6EboG+D/xKboiKOEJRsx7e8T+Re+dgB9JKCsk09dpQHB1KY6kmbyCTcO9XllXDI iwPKJ7WUdSmdldWcwCjhCjE4+qSSwIwk6nbrUuDVBNaSRLTOyjzCdj3pH4hVcaBuWEDsXS7GfNkP+ KcNJdmXbX4xOHThvw5E0CqKKEA2tbfjs0HCpZ4w6mYzAC8RgwFHy5gsz8tdn2AL55FJasyj8Gqjz1 WXckKydQ6tLx/w9xh994hqIeH7ahexUKQjaqP0ah+pR9cSRqR+6HF68YOpc9fst2201+asT3X6sck jBpzVxtw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dyLjf-00022D-4f; Sat, 30 Sep 2017 17:39:31 +0000 Received: from mail-pf0-x244.google.com ([2607:f8b0:400e:c00::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dyLjF-0001RV-Er for ath10k@lists.infradead.org; Sat, 30 Sep 2017 17:39:10 +0000 Received: by mail-pf0-x244.google.com with SMTP id e69so1759776pfg.4 for ; Sat, 30 Sep 2017 10:38:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=13ju7Rrb+faMC+sx4MeWZhvl8lkbREC1QxcL2+u5d/M=; b=oi1JSvxBJADbGjxD+roLJjMI50fUIOdDVn490DuDZSHCxtf6E9yxKsTYwscx7sL0y0 YiacfClMWpgSmiBIYprvqIh0Ca7LsMBh7tSpBUpszd7CdyEjjA050C6rikOglJ2xbTE5 BXBRYPZPTHLpf0O+toE+EZeM8WFVDcGrtNr8eT/nTv9gKNMsHHHFZyWhof3ZdBedYCdm YI1Nja7VKkuwJQo79Lr1TmkdG3JaRsb+xVxIcj6AscjEoSWiOY1kXhN07g4vVHWz/qVq jaZSnXcQfTq/R1oiW9YhFokpbCrTGjgNJuBCl7YYo7CH/jDItjb4gJx354o88T92Gp1C anmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=13ju7Rrb+faMC+sx4MeWZhvl8lkbREC1QxcL2+u5d/M=; b=XcRQj4Ls+MIg32ZrzAjW82yvHPpV74FemPzuC25B9yA1yoCL/lFGzHde+2E/MjSxmO avg2LCT8XZXXIw/4il2YS+whxjvsfZGna9wfcgtMDUjnvCb6gg7VacWe0e4NuiTuJvLk bnVc4X8gmL8AR1qaqBAx9Qk7CKIsxdOYA78nxxa1vRi9cO6WzR47KI+tLXnvKVA+b5HE Iilbu8eVLaUZnzvkHgLkJFbySlk4MRHav6YuygMhnKgGhutb+pcRDR05CVuNgc0LF2QL R7fi/c/O/cE8hFX436Ql/djH02fRy9kmQerVVzXTbj62Bn/FLZCD9Silwp4V6R0W+dFS 6XHQ== X-Gm-Message-State: AHPjjUiPHEEIUmlqByxMCKHwaTqFTdehGOVVYfJz0dy4Ybac79iM711N d+I44pJTX5il/Zq6P5mL5UKghQHj8CY= X-Google-Smtp-Source: AOwi7QDusKcbSlIVx8eImBj7G+74ZroHY59+a8jMh3e9LJ+6m2n+Y0iTydZthPsQFIRZCtrrSEGudQ== X-Received: by 10.98.72.83 with SMTP id v80mr11078123pfa.54.1506793128755; Sat, 30 Sep 2017 10:38:48 -0700 (PDT) Received: from localhost.localdomain ([171.60.245.167]) by smtp.gmail.com with ESMTPSA id q15sm11197640pgc.64.2017.09.30.10.38.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 30 Sep 2017 10:38:48 -0700 (PDT) From: silexcommon@gmail.com X-Google-Original-From: alagusankar@silex-india.com To: ath10k@lists.infradead.org Subject: [PATCH 11/11] ath10k_sdio: hif start once addition Date: Sat, 30 Sep 2017 23:07:48 +0530 Message-Id: <1506793068-27445-12-git-send-email-alagusankar@silex-india.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1506793068-27445-1-git-send-email-alagusankar@silex-india.com> References: <1506793068-27445-1-git-send-email-alagusankar@silex-india.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170930_103905_827533_DD974AAE X-CRM114-Status: UNSURE ( 8.21 ) 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: Alagu Sankar , linux-wireless@vger.kernel.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Alagu Sankar sdio hif interface uses the start_once optimization to avoid unnecessary firmware downloading. simulate hif_stop in sdio as core_stop does not handle this due to start_once optimization. Signed-off-by: Alagu Sankar --- drivers/net/wireless/ath/ath10k/sdio.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c index 11fbf6e..c6f23a9 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c @@ -2255,6 +2255,12 @@ static void ath10k_sdio_remove(struct sdio_func *func) cancel_work_sync(&ar_sdio->wr_async_work); ath10k_core_unregister(ar); ath10k_core_destroy(ar); + + if (ar->is_started && ar->hw_params.start_once) { + ath10k_hif_stop(ar); + ath10k_hif_power_down(ar); + } + kfree(ar_sdio->dma_buffer); kfree(ar_sdio->vsg_buffer); }