mac80211: fix ieee80211_queue_stopped()
authorThomas Pedersen <thomas@cozybit.com>
Wed, 10 Apr 2013 22:41:40 +0000 (15:41 -0700)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 11 Apr 2013 10:08:06 +0000 (12:08 +0200)
Johannes Berg notes mac80211 drivers which use
ieee80211_queue_stopped() really only want to know if they
previously requested a queue stop.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/util.c

index 447e6651e7fa7d0faa293b1ac1b431b6d14005eb..1d6217ac3ba34cff19618e16a1b289b2937f3a3a 100644 (file)
@@ -485,7 +485,8 @@ int ieee80211_queue_stopped(struct ieee80211_hw *hw, int queue)
                return true;
 
        spin_lock_irqsave(&local->queue_stop_reason_lock, flags);
-       ret = !!local->queue_stop_reasons[queue];
+       ret = test_bit(IEEE80211_QUEUE_STOP_REASON_DRIVER,
+                      &local->queue_stop_reasons[queue]);
        spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
        return ret;
 }