From patchwork Tue Jul 25 01:13:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 9860993 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 980E66038C for ; Tue, 25 Jul 2017 01:18:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8A45D285A2 for ; Tue, 25 Jul 2017 01:18:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F39C285D5; Tue, 25 Jul 2017 01:18:05 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI 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 16902285A2 for ; Tue, 25 Jul 2017 01:18:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932256AbdGYBSC (ORCPT ); Mon, 24 Jul 2017 21:18:02 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:33998 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756768AbdGYBOW (ORCPT ); Mon, 24 Jul 2017 21:14:22 -0400 Received: by mail-pf0-f179.google.com with SMTP id q85so53114452pfq.1 for ; Mon, 24 Jul 2017 18:14:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bmXpkuCQwPc4k3edQcUptmnh86wYivLHO9DkswHnIvY=; b=fqURnNTtVsPKneNes9NjGU+LNn1E3OJ52z6rg87T0d+lL+hwHjTeB426GNRRLm0arS etUQyfPOcRbfNxmpXgBeQdhGdSeKuQVZDE9OmionjuUjo2DOHaBYCEAomrejtCPh0Q/D ztG7kTZ/nKKLCXJ6ZFpzZuyjKod31h5+UfVH8= 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=bmXpkuCQwPc4k3edQcUptmnh86wYivLHO9DkswHnIvY=; b=mPPu1dWEyKejL159EkQoTFkPtpL4nyANrIXZNgue4veauSDvJjZ7WeFmkgZRHshbrL Z/tSSxupHwYeNRMk9IhT59jdSuDUzXPvSvecipbFOZ0aQiHSXm5HVu3+fUlKHCOxtq9J /znToudzejYkSqBoIGXVQ8V12FyG85+k3rTHy7d1d6SeVBnmBeNGShEx9cBDUHa9TszZ cyoqCAu0EL8kRW2zcZv31GaUwgBy3UX6EtMXH+E8ROJVo73/5zIm9p7s3opWuL18Ijlo wEbZ+RdDtQWmfA0jrVaJrwfJ4S5FPDd51TTLHueXiPkEVlGPq9d/xWCBxBCnd7qq6Oi+ 5cpQ== X-Gm-Message-State: AIVw113cPWs7F2Jng0KEEzQYuc2VBidtmx5FjIIyT8hfoDNRZUblAgF4 jKay5kyn3jxLXc5G X-Received: by 10.99.104.129 with SMTP id d123mr17469569pgc.236.1500945261132; Mon, 24 Jul 2017 18:14:21 -0700 (PDT) Received: from ban.mtv.corp.google.com ([172.22.113.17]) by smtp.gmail.com with ESMTPSA id h123sm21497036pgc.36.2017.07.24.18.14.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Jul 2017 18:14:20 -0700 (PDT) From: Brian Norris To: Ganapathi Bhat , Nishant Sarmukadam Cc: , Dmitry Torokhov , Amitkumar Karwar , Kalle Valo , linux-wireless@vger.kernel.org, Brian Norris Subject: [PATCH v2 11/20] mwifiex: utilize netif_tx_{wake, stop}_all_queues() Date: Mon, 24 Jul 2017 18:13:27 -0700 Message-Id: <20170725011336.99993-12-briannorris@chromium.org> X-Mailer: git-send-email 2.14.0.rc0.284.gd933b75aa4-goog In-Reply-To: <20170725011336.99993-1-briannorris@chromium.org> References: <20170725011336.99993-1-briannorris@chromium.org> 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 We're open-coding these. Just use the helpers. Signed-off-by: Brian Norris --- v2: no change --- drivers/net/wireless/marvell/mwifiex/init.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/drivers/net/wireless/marvell/mwifiex/init.c b/drivers/net/wireless/marvell/mwifiex/init.c index de974e8bb9c6..e11919db7818 100644 --- a/drivers/net/wireless/marvell/mwifiex/init.c +++ b/drivers/net/wireless/marvell/mwifiex/init.c @@ -337,17 +337,9 @@ void mwifiex_wake_up_net_dev_queue(struct net_device *netdev, struct mwifiex_adapter *adapter) { unsigned long dev_queue_flags; - unsigned int i; spin_lock_irqsave(&adapter->queue_lock, dev_queue_flags); - - for (i = 0; i < netdev->num_tx_queues; i++) { - struct netdev_queue *txq = netdev_get_tx_queue(netdev, i); - - if (netif_tx_queue_stopped(txq)) - netif_tx_wake_queue(txq); - } - + netif_tx_wake_all_queues(netdev); spin_unlock_irqrestore(&adapter->queue_lock, dev_queue_flags); } @@ -358,17 +350,9 @@ void mwifiex_stop_net_dev_queue(struct net_device *netdev, struct mwifiex_adapter *adapter) { unsigned long dev_queue_flags; - unsigned int i; spin_lock_irqsave(&adapter->queue_lock, dev_queue_flags); - - for (i = 0; i < netdev->num_tx_queues; i++) { - struct netdev_queue *txq = netdev_get_tx_queue(netdev, i); - - if (!netif_tx_queue_stopped(txq)) - netif_tx_stop_queue(txq); - } - + netif_tx_stop_all_queues(netdev); spin_unlock_irqrestore(&adapter->queue_lock, dev_queue_flags); }