diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-07-24 21:02:04 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-22 16:29:50 -0400 |
commit | 92ab85354993ac3a364c65cab45745af470ffc67 (patch) | |
tree | b36501661ee9093cb8e66919bbebbca4374c36d6 | |
parent | 5442060c08a49bd0b416f033e0ae43ccedef5278 (diff) | |
download | kernel_samsung_espresso10-92ab85354993ac3a364c65cab45745af470ffc67.zip kernel_samsung_espresso10-92ab85354993ac3a364c65cab45745af470ffc67.tar.gz kernel_samsung_espresso10-92ab85354993ac3a364c65cab45745af470ffc67.tar.bz2 |
mac80211: add ieee80211_queue_stopped)
This patch adds ieee80211_queue_stopped that let drivers to query
queue status
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | include/net/mac80211.h | 10 | ||||
-rw-r--r-- | net/mac80211/util.c | 7 |
2 files changed, 17 insertions, 0 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index ff137fd..25cc192 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -1608,6 +1608,16 @@ void ieee80211_wake_queue(struct ieee80211_hw *hw, int queue); void ieee80211_stop_queue(struct ieee80211_hw *hw, int queue); /** + * ieee80211_queue_stopped - test status of the queue + * @hw: pointer as obtained from ieee80211_alloc_hw(). + * @queue: queue number (counted from zero). + * + * Drivers should use this function instead of netif_stop_queue. + */ + +int ieee80211_queue_stopped(struct ieee80211_hw *hw, int queue); + +/** * ieee80211_stop_queues - stop all queues * @hw: pointer as obtained from ieee80211_alloc_hw(). * diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 0d463c8..2440061 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -386,6 +386,13 @@ void ieee80211_stop_queues(struct ieee80211_hw *hw) } EXPORT_SYMBOL(ieee80211_stop_queues); +int ieee80211_queue_stopped(struct ieee80211_hw *hw, int queue) +{ + struct ieee80211_local *local = hw_to_local(hw); + return __netif_subqueue_stopped(local->mdev, queue); +} +EXPORT_SYMBOL(ieee80211_queue_stopped); + void ieee80211_wake_queues(struct ieee80211_hw *hw) { int i; |