summaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-28 11:04:27 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-04-10 14:54:11 -0400
commitada151252655b63409860e0795993cb369e667cc (patch)
treef92860d8aeec0947ef28a33e9b474e234d65665f /net/mac80211
parentded81f6ba934e792e441f20178683608cbc0b5cb (diff)
mac80211: debounce queue stop/wake
When the queue status changes we need to do a fair bit of work, so ignore no-op changes early. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 2b62307825d4..ef725cabb099 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -276,6 +276,9 @@ static void __ieee80211_wake_queue(struct ieee80211_hw *hw, int queue,
if (WARN_ON(queue >= hw->queues))
return;
+ if (!test_bit(reason, &local->queue_stop_reasons[queue]))
+ return;
+
__clear_bit(reason, &local->queue_stop_reasons[queue]);
if (local->queue_stop_reasons[queue] != 0)
@@ -323,6 +326,9 @@ static void __ieee80211_stop_queue(struct ieee80211_hw *hw, int queue,
if (WARN_ON(queue >= hw->queues))
return;
+ if (test_bit(reason, &local->queue_stop_reasons[queue]))
+ return;
+
__set_bit(reason, &local->queue_stop_reasons[queue]);
rcu_read_lock();