Commit ada15125 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

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: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ded81f6b
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment