linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 6/7] mac80211: lazily stop queues in add_pending
Date: Wed, 28 Mar 2012 11:04:28 +0200	[thread overview]
Message-ID: <20120328090432.965911820@sipsolutions.net> (raw)
In-Reply-To: 20120328090422.367469100@sipsolutions.net

From: Johannes Berg <johannes.berg@intel.com>

When adding pending SKBs there's no need to
stop all queues, we only need to stop those
that we're adding frames to. Implement that
by lazily stopping a queue as we add an SKB.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/util.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/net/mac80211/util.c	2012-03-28 09:34:49.000000000 +0200
+++ b/net/mac80211/util.c	2012-03-28 09:36:48.000000000 +0200
@@ -385,10 +385,6 @@ void ieee80211_add_pending_skbs_fn(struc
 	int queue, i;
 
 	spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
-	for (i = 0; i < hw->queues; i++)
-		__ieee80211_stop_queue(hw, i,
-			IEEE80211_QUEUE_STOP_REASON_SKB_ADD);
-
 	while ((skb = skb_dequeue(skbs))) {
 		struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 
@@ -398,6 +394,10 @@ void ieee80211_add_pending_skbs_fn(struc
 		}
 
 		queue = skb_get_queue_mapping(skb);
+
+		__ieee80211_stop_queue(hw, queue,
+				IEEE80211_QUEUE_STOP_REASON_SKB_ADD);
+
 		__skb_queue_tail(&local->pending[queue], skb);
 	}
 



  parent reply	other threads:[~2012-03-28  9:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-28  9:04 [PATCH 0/7] mac80211 queue rework preparations Johannes Berg
2012-03-28  9:04 ` [PATCH 1/7] mac80211: remove antenna_sel_tx TX info field Johannes Berg
2012-03-28  9:04 ` [PATCH 2/7] cfg80211/nl80211: clarify TX queue API Johannes Berg
2012-03-28  9:04 ` [PATCH 3/7] mac80211: refuse TX queue configuration on non-QoS HW Johannes Berg
2012-03-28  9:04 ` [PATCH 4/7] mac80211: decouple # of netdev queues from HW queues Johannes Berg
2012-03-28  9:04 ` [PATCH 5/7] mac80211: debounce queue stop/wake Johannes Berg
2012-03-28  9:04 ` Johannes Berg [this message]
2012-03-28  9:04 ` [PATCH 7/7] mac80211: use IEEE80211_NUM_ACS Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120328090432.965911820@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).