Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1650057

[PATCH 11/14] mwifiex: utilize netif_tx_{wake,stop}_all_queues()

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Brian Norris <briannorris@chromium.org>
Newsgroups linux.kernel
Subject [PATCH 11/14] mwifiex: utilize netif_tx_{wake,stop}_all_queues()
Date Thu, 25 May 2017 02:20:03 +0200
Message-ID <tKOFt-Qx-33@gated-at.bofh.it> (permalink)
References <tKOFr-Qx-3@gated-at.bofh.it>
X-Original-To Ganapathi Bhat <gbhat@marvell.com>, Nishant Sarmukadam <nishants@marvell.com>
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=Kq2WtQ2K6LFAtlGiCBQtuuBcOOWfNhN701Df3pdMtWE=; b=GCPNIVU9RFI8WdJbcUkEqHK7867ErWoaM9uXna9E06iY4b4zW5BB4ktaoaTwqktVn0 ScyQ9dAfbMDCZF+IQXegopUsUUq/t0EC0zxLKRoMhBTW19BT+DlPtOFq86zi+dxpd3RH mPLPh23ea6Etw+e7PqJo2RoiEyg8+up8KJrKc=
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=Kq2WtQ2K6LFAtlGiCBQtuuBcOOWfNhN701Df3pdMtWE=; b=PzCmeFIZg801AAiu8SOz248R2w4C6Rwo8Onn9Belb/IBtZeTMZbEn1H0mY9KajxZ80 ojL+atW9eVoymwY0ws9o9DNZMgTF3ljbA0kMjgrW03LtD/5xKzvYzbkYIImplxh95+1j 7vA1s9qrm4znVBASLgSUs9XvIpwReoc31gjk7ZHFxE1D0QkmRqDGCfblxUbMzeZrDNXe XOOExCnDV/szpEPwpkBZqgM20QvfFKneVaj6vOCfAouXmmf5B67ymEUg6nyvZeDfG7Wg eYo7ywa9Ll1GsRJ5tHR1853asQwGJoYP83cRbgun3Pw+3C7FBWqduTsmoWf6hOBgZYv4 8/iQ==
X-Gm-Message-State AODbwcD+jlmoXi7IAvIIyS7gsORHse+GoBesEVyD7nwcvtmVmdYGQ0NV DBH0DzX/olLUR7xj
X-Received by 10.98.63.14 with SMTP id m14mr42261567pfa.143.1495671102888; Wed, 24 May 2017 17:11:42 -0700 (PDT)
X-Mailer git-send-email 2.13.0.219.gdb65acc882-goog
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 51
Organization linux.* mail to news gateway
X-Original-Cc <linux-kernel@vger.kernel.org>, Dmitry Torokhov <dmitry.torokhov@gmail.com>, Amitkumar Karwar <amitkarwar@gmail.com>, Kalle Valo <kvalo@codeaurora.org>, linux-wireless@vger.kernel.org, Brian Norris <briannorris@chromium.org>
X-Original-Date Wed, 24 May 2017 17:11:16 -0700
X-Original-Message-ID <20170525001119.64791-11-briannorris@chromium.org>
X-Original-References <20170525001119.64791-1-briannorris@chromium.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1650057

Show key headers only | View raw


We're open-coding these. Just use the helpers.

Signed-off-by: Brian Norris <briannorris@chromium.org>
---
 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 80bdf1c5f77f..d3b8ca402d08 100644
--- a/drivers/net/wireless/marvell/mwifiex/init.c
+++ b/drivers/net/wireless/marvell/mwifiex/init.c
@@ -332,17 +332,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);
 }
 
@@ -353,17 +345,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);
 }
 
-- 
2.13.0.219.gdb65acc882-goog

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 01/14] mwifiex: pcie: properly synchronize, disable interrupts in driver callbacks Brian Norris <briannorris@chromium.org> - 2017-05-25 02:20 +0200
  [PATCH 13/14] mwifiex: drop 'add_tail' param from mwifiex_insert_cmd_to_pending_q() Brian Norris <briannorris@chromium.org> - 2017-05-25 02:20 +0200
  [PATCH 06/14] mwifiex: don't short-circuit netdev notifiers on interface deletion Brian Norris <briannorris@chromium.org> - 2017-05-25 02:20 +0200
  [PATCH 10/14] mwifiex: pcie: stop masking interrupts in FW downloader Brian Norris <briannorris@chromium.org> - 2017-05-25 02:20 +0200
  [PATCH 09/14] mwifiex: pcie: remove redundant synchronize_irq() Brian Norris <briannorris@chromium.org> - 2017-05-25 02:20 +0200
  [PATCH 14/14] mwifiex: pcie: fix whitespace Brian Norris <briannorris@chromium.org> - 2017-05-25 02:20 +0200
  [PATCH 11/14] mwifiex: utilize netif_tx_{wake,stop}_all_queues() Brian Norris <briannorris@chromium.org> - 2017-05-25 02:20 +0200
  Re: [PATCH 01/14] mwifiex: pcie: properly synchronize, disable  interrupts in driver callbacks Brian Norris <briannorris@chromium.org> - 2017-05-31 19:20 +0200
    Re: [PATCH 01/14] mwifiex: pcie: properly synchronize, disable  interrupts in driver callbacks Xinming Hu <huxm@marvell.com> - 2017-06-05 14:00 +0200

csiph-web