aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index b7a856e3281b..f978ddd1bb43 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -511,6 +511,31 @@ void ieee80211_wake_queues(struct ieee80211_hw *hw)
511} 511}
512EXPORT_SYMBOL(ieee80211_wake_queues); 512EXPORT_SYMBOL(ieee80211_wake_queues);
513 513
514void ieee80211_flush_queues(struct ieee80211_local *local,
515 struct ieee80211_sub_if_data *sdata)
516{
517 u32 queues;
518
519 if (!local->ops->flush)
520 return;
521
522 if (sdata && local->hw.flags & IEEE80211_HW_QUEUE_CONTROL) {
523 int ac;
524
525 queues = 0;
526
527 for (ac = 0; ac < IEEE80211_NUM_ACS; ac++)
528 queues |= BIT(sdata->vif.hw_queue[ac]);
529 if (sdata->vif.cab_queue != IEEE80211_INVAL_HW_QUEUE)
530 queues |= BIT(sdata->vif.cab_queue);
531 } else {
532 /* all queues */
533 queues = BIT(local->hw.queues) - 1;
534 }
535
536 drv_flush(local, queues, false);
537}
538
514void ieee80211_iterate_active_interfaces( 539void ieee80211_iterate_active_interfaces(
515 struct ieee80211_hw *hw, u32 iter_flags, 540 struct ieee80211_hw *hw, u32 iter_flags,
516 void (*iterator)(void *data, u8 *mac, 541 void (*iterator)(void *data, u8 *mac,