From patchwork Thu May 25 00:11:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 9747251 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 B02DA60246 for ; Thu, 25 May 2017 00:14:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1360205F8 for ; Thu, 25 May 2017 00:14:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92B9F26E54; Thu, 25 May 2017 00:14:12 +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=unavailable 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 303CA205F8 for ; Thu, 25 May 2017 00:14:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033982AbdEYANm (ORCPT ); Wed, 24 May 2017 20:13:42 -0400 Received: from mail-pf0-f172.google.com ([209.85.192.172]:33432 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1164693AbdEYALn (ORCPT ); Wed, 24 May 2017 20:11:43 -0400 Received: by mail-pf0-f172.google.com with SMTP id e193so150313259pfh.0 for ; Wed, 24 May 2017 17:11:43 -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=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=rCVxGJTiZeuJvqfWRimQgpGJHyFwMl16oYOklB3yAyKJbHbvy9+3r4bAZRTp2dBKgP TTOXLJB9cCiqTczB4pOBpF3y1OZzLNKkIH0NGhTaebCBut65d3enQF99tAbwcERI1ko1 WH1KKdAfMmj/897JI4Ypew0aoq1yM97NoEODG6zv7cW5HLo+thjUCU7qRMkdYWDBfO3n uPvvAnV3G7iorSiMemvWP1nVTd6CTHqkkYXSEyEL1DPwic8h/gv0WZGOfDC9pvlZkkri zXAi+ya1ovzBf912cSuDnwNcHXBAZkF8bvdTcHhSLKiTFNwBnJrlN5gf/CX/RAKWwlaN A8mQ== X-Gm-Message-State: AODbwcA0v7JyeBtFM18CbiUDE4aGre8D5ix058soTZ6J1VpSZfY1hGJT URZdFtYriaHXa6mX X-Received: by 10.98.63.14 with SMTP id m14mr42261567pfa.143.1495671102888; Wed, 24 May 2017 17:11:42 -0700 (PDT) Received: from ban.mtv.corp.google.com ([172.22.64.120]) by smtp.gmail.com with ESMTPSA id s23sm9823692pfg.81.2017.05.24.17.11.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 May 2017 17:11:42 -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 11/14] mwifiex: utilize netif_tx_{wake,stop}_all_queues() Date: Wed, 24 May 2017 17:11:16 -0700 Message-Id: <20170525001119.64791-11-briannorris@chromium.org> X-Mailer: git-send-email 2.13.0.219.gdb65acc882-goog In-Reply-To: <20170525001119.64791-1-briannorris@chromium.org> References: <20170525001119.64791-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 --- 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); }