From patchwork Fri Nov 8 07:01:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 3156501 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 65C68BEEB2 for ; Fri, 8 Nov 2013 07:04:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7DE9620481 for ; Fri, 8 Nov 2013 07:04:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9CE212049C for ; Fri, 8 Nov 2013 07:04:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753652Ab3KHHEu (ORCPT ); Fri, 8 Nov 2013 02:04:50 -0500 Received: from mail-ea0-f173.google.com ([209.85.215.173]:54096 "EHLO mail-ea0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753134Ab3KHHEs (ORCPT ); Fri, 8 Nov 2013 02:04:48 -0500 Received: by mail-ea0-f173.google.com with SMTP id g10so847973eak.32 for ; Thu, 07 Nov 2013 23:04:47 -0800 (PST) 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=V/7HOx+MAFL4P4vTNKN3G/2hoBKlniDIUQQAulfKmXY=; b=YMUUIsXP9hzl3IhP4bf3VrETAr2v8MUJpVD2647uoCZaqG6ROIyKPjKByWn8UY1rRC 9PXNxmRNqCZM7jp3fEiHLPWMeF9zj5mm+nqIkH/9buaI8h43N69Gv2cI9Rs2XnhDOBha ru34xMCYjyRoY47071DSH4KIWiLbDKJQUBWX4= 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=V/7HOx+MAFL4P4vTNKN3G/2hoBKlniDIUQQAulfKmXY=; b=UmmktNQo799jc34r6zIN5X+4kwnShW3MAgbGO5kW5Sm2CUADyf7Jnm0tjR9qd6bom3 90dSrS3Hjr2BbOMBLDOXNapN03dsG4C4SjqQcsS77gPii3m1H4xnPBOVNtN8ZVcNS6n7 0WpkXUKFII2DJN5gLlzsI0rWCi87oUExQ/0IT0P8w7owUQPxeqsn2jhiBb1OgycXVQZW FghyJjZXSbnsHl+ZMkLghKpJA8V9JgiTgVRiUVHN07bQWNbclQ0FRP+km5Ts3YCdeey6 eCP7Om/SpHQsxB6YheptJM/BE5CWj+lw5OkExr/iy5nV0uY3iNa8XciFNxxmIpL6X153 wbLA== X-Gm-Message-State: ALoCoQlsYNu7xdxvcZpg8FamdUbl9tKeKLaUhyHzGg06bh4Foi73Tdz64A4U2sddf43US7AzFK1R31h2rLzVdyUE3A1AunUJwo1GDBw02k12/o2TWz/Dc3c= X-Received: by 10.15.110.75 with SMTP id cg51mr14500142eeb.42.1383894287226; Thu, 07 Nov 2013 23:04:47 -0800 (PST) Received: from localhost.localdomain ([91.198.246.8]) by mx.google.com with ESMTPSA id u46sm18915155eep.17.2013.11.07.23.04.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Nov 2013 23:04:46 -0800 (PST) From: Michal Kazior To: ath10k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Michal Kazior Subject: [PATCHv2 03/13] ath10k: split tasklet killing function Date: Fri, 8 Nov 2013 08:01:25 +0100 Message-Id: <1383894095-27998-4-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1383894095-27998-1-git-send-email-michal.kazior@tieto.com> References: <1383133346-8135-1-git-send-email-michal.kazior@tieto.com> <1383894095-27998-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=-6.8 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 31cdde0..a001ff2 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 */