summaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-28 11:04:28 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-04-10 14:54:11 -0400
commit4644ae89033872a62b4fea6ca96b958e115efdc0 (patch)
tree579d4471e25d2ff6368242655d08f863f57fcefe /net/mac80211/util.c
parentada151252655b63409860e0795993cb369e667cc (diff)
downloadop-kernel-dev-4644ae89033872a62b4fea6ca96b958e115efdc0.zip
op-kernel-dev-4644ae89033872a62b4fea6ca96b958e115efdc0.tar.gz
mac80211: lazily stop queues in add_pending
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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index ef725ca..471a831 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -385,10 +385,6 @@ void ieee80211_add_pending_skbs_fn(struct ieee80211_local *local,
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(struct ieee80211_local *local,
}
queue = skb_get_queue_mapping(skb);
+
+ __ieee80211_stop_queue(hw, queue,
+ IEEE80211_QUEUE_STOP_REASON_SKB_ADD);
+
__skb_queue_tail(&local->pending[queue], skb);
}
OpenPOWER on IntegriCloud