diff options
author | Liad Kaufman <liad.kaufman@intel.com> | 2014-11-09 18:50:21 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-11-19 18:45:30 +0100 |
commit | 4f9610d528a6aa5642fa350fa93fbd905a753ae8 (patch) | |
tree | 71c01eb0cd7b1c639685c412e7319c458e7e1144 /net/mac80211/util.c | |
parent | 8a4d32f30d11d6d8cc29594c7a36b9be6b0edbb5 (diff) | |
download | linux-4f9610d528a6aa5642fa350fa93fbd905a753ae8.tar.gz linux-4f9610d528a6aa5642fa350fa93fbd905a753ae8.tar.bz2 linux-4f9610d528a6aa5642fa350fa93fbd905a753ae8.zip |
mac80211: add specific-queue flushing support
If the HW supports IEEE80211_HW_QUEUE_CONTROL, allow
flushing only specific queues rather than all of them.
Signed-off-by: Liad Kaufman <liad.kaufman@intel.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 9e5bfd614856..745a8a9cbbb5 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -576,15 +576,19 @@ ieee80211_get_vif_queues(struct ieee80211_local *local, return queues; } -void ieee80211_flush_queues(struct ieee80211_local *local, - struct ieee80211_sub_if_data *sdata) +void __ieee80211_flush_queues(struct ieee80211_local *local, + struct ieee80211_sub_if_data *sdata, + unsigned int queues) { - unsigned int queues; - if (!local->ops->flush) return; - queues = ieee80211_get_vif_queues(local, sdata); + /* + * If no queue was set, or if the HW doesn't support + * IEEE80211_HW_QUEUE_CONTROL - flush all queues + */ + if (!queues || !(local->hw.flags & IEEE80211_HW_QUEUE_CONTROL)) + queues = ieee80211_get_vif_queues(local, sdata); ieee80211_stop_queues_by_reason(&local->hw, queues, IEEE80211_QUEUE_STOP_REASON_FLUSH, @@ -597,6 +601,12 @@ void ieee80211_flush_queues(struct ieee80211_local *local, false); } +void ieee80211_flush_queues(struct ieee80211_local *local, + struct ieee80211_sub_if_data *sdata) +{ + __ieee80211_flush_queues(local, sdata, 0); +} + void ieee80211_stop_vif_queues(struct ieee80211_local *local, struct ieee80211_sub_if_data *sdata, enum queue_stop_reason reason) |