From patchwork Wed Oct 30 11:42:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 3114231 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 55478BF924 for ; Wed, 30 Oct 2013 11:45:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AE81F20255 for ; Wed, 30 Oct 2013 11:45:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9ECC0201FB for ; Wed, 30 Oct 2013 11:45:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753086Ab3J3LpO (ORCPT ); Wed, 30 Oct 2013 07:45:14 -0400 Received: from mail-ee0-f45.google.com ([74.125.83.45]:60743 "EHLO mail-ee0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752374Ab3J3LpM (ORCPT ); Wed, 30 Oct 2013 07:45:12 -0400 Received: by mail-ee0-f45.google.com with SMTP id e50so573721eek.18 for ; Wed, 30 Oct 2013 04:45:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Hi5Exo26/gOw98QaHSHdsvklFUBeBqqRSEzNUIm84dk=; b=gwqGE8VYpdpJ5egPspzh/UpdLLNevJAnRMEFzE+m8nbvXzh0Eact2iFpDgwgZylcln l5KIh55jc9Vtn05E2tAeU6RyKBoTvu86r2PtY5IOJrW2YqchpGMW59G7cOD9KEDfctwx L8WAGBZs11QrGzyKH81XluZVgu+qn5MQC54yg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Hi5Exo26/gOw98QaHSHdsvklFUBeBqqRSEzNUIm84dk=; b=Y7mTSVuDn7xHBY1CHNrVIsKoR7Sv1L0yMBuO02L7+ZJPk4ZPV9P7EneiIvIZsHZkz/ TF+TyEYReyOqYUoLADaSjGT7mBkU9UX12ilgRpilDGh4d0U2QLhJ4lQzEpfO782sAs5n m16Ox70dnf3SW64rS37ZkDYVBkBtgHSjtO0ftuYv8xQSAdkDWOKxud5jqAR96BdJvBvr r6O+CpiqrVkAI0M27y+u4SAq2LWWdS6y92GjD097y6xTHuzweIqP/wBZyb/LI0uO2Tvt 2WgqkBRMQK7KC0ZqUFWoaJTQCltHH3m52biAJgjAeBv0m/gT4CC7OykKDtttMHF+Ww5D +PAA== X-Gm-Message-State: ALoCoQkfndiBsA9i1vAA0dxFx/TSC8QGsYdAshrsMPri9Xt/lNO0uot0328OTbMTl5JcvY9PD+K5lEwzmeQzqOZMihdNddDzOCZedB+2/af0ZzjETLyKjQY= X-Received: by 10.15.48.67 with SMTP id g43mr4597551eew.17.1383133511754; Wed, 30 Oct 2013 04:45:11 -0700 (PDT) Received: from localhost.localdomain ([91.198.246.8]) by mx.google.com with ESMTPSA id a6sm82510594eei.10.2013.10.30.04.45.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Oct 2013 04:45:11 -0700 (PDT) From: Michal Kazior To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, greearb@candelatech.com, Michal Kazior Subject: [PATCH/RFT 03/12] ath10k: split tasklet killing function Date: Wed, 30 Oct 2013 12:42:17 +0100 Message-Id: <1383133346-8135-4-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1383133346-8135-1-git-send-email-michal.kazior@tieto.com> References: <1383133346-8135-1-git-send-email-michal.kazior@tieto.com> X-DomainID: tieto.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The function will soon be called from more than 1 place. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/pci.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index aa43466..d9467e5 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -877,21 +877,26 @@ static int ath10k_pci_start_ce(struct ath10k *ar) return 0; } -static void ath10k_pci_stop_ce(struct ath10k *ar) +static void ath10k_pci_kill_tasklet(struct ath10k *ar) { struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); - struct ath10k_pci_compl *compl; - struct sk_buff *skb; int i; - ath10k_ce_disable_interrupts(ar); - - /* Cancel the pending tasklet */ tasklet_kill(&ar_pci->intr_tq); tasklet_kill(&ar_pci->msi_fw_err); for (i = 0; i < CE_COUNT; i++) tasklet_kill(&ar_pci->pipe_info[i].intr); +} + +static void ath10k_pci_stop_ce(struct ath10k *ar) +{ + struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); + struct ath10k_pci_compl *compl; + struct sk_buff *skb; + + ath10k_ce_disable_interrupts(ar); + ath10k_pci_kill_tasklet(ar); /* Mark pending completions as aborted, so that upper layers free up * their associated resources */