Skip to content

Commit

Permalink
mac80211: debounce queue stop/wake
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Apr 10, 2012
1 parent ded81f6 commit ada1512
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions net/mac80211/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit ada1512

Please sign in to comment.