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: 9979559 X-Patchwork-Delegate: kvalo@adurom.com 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 11B856034B for ; Sat, 30 Sep 2017 17:38:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F01B928500 for ; Sat, 30 Sep 2017 17:38:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E4F4328E1F; Sat, 30 Sep 2017 17:38:52 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 875EF28500 for ; Sat, 30 Sep 2017 17:38:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751644AbdI3Riv (ORCPT ); Sat, 30 Sep 2017 13:38:51 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:34559 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752178AbdI3Rit (ORCPT ); Sat, 30 Sep 2017 13:38:49 -0400 Received: by mail-pf0-f193.google.com with SMTP id g65so1769766pfe.1 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=OW3lm4en6Zt/+Z6dyyMR2ykmpjSLQg4jVljGGNhmruMol/kxTpsWTJxEZaOJ5nyU2s lVVUWmhmzONCAGP3eNaYNoBIqRNTnH6nNmtjY6Et8QA6+AcxADYsC/f8o6t8Tx+6BXy5 sAXZECDUzSF2fCISlU0O6kDf7/8msP4B03eOGuMTi0MLLCILHyc4kS0KT69PZtCKNZZ5 tuER5Xi9M9X2bM2W+w+tNndufVQSnSn5qjw9Ngf3oNeO2jrOfnPR4r/NVo8cDryfGHSk 8I3H7X/LyQ/uMzXfScsJUrR/Tc80CHyvNxEeW+pTYKXnUyeq9gkqSzWLF+0mkDDamLBe pbKg== X-Gm-Message-State: AHPjjUjjnXkaMuzkKB/nYYt2ASI5tNwOfs85bEUGR1Uk05mozwfCAdUQ BUUmM+9swB1mbj5FYUzPyKw= 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 Cc: linux-wireless@vger.kernel.org, Alagu Sankar 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> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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); }