Skip to contentSkip to conversation

mac80211: fix ieee80211_queue_stopped()

PATCH New Thomas Pedersen 1 participant 1 message Apr 10, 2013 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: fix ieee80211_queue_stopped()

Johannes Berg notes mac80211 drivers which use ieee80211_queue_stopped() really only want to know if they previously requested a queue stop.

---
 net/mac80211/util.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/mac80211/util.c +2 -1
index 447e665..53e9d8a 100644
@@ -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 = !!(local->queue_stop_reasons[queue] &
+		 IEEE80211_QUEUE_STOP_REASON_DRIVER);
 	spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
 	return ret;
 }
Signature · 1 line
1.7.10.4