aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-02-13 06:11:00 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-03-18 15:15:03 -0400
commit39ecc01d1bbe3de2cf5f01a81e176ea5160d3b95 (patch)
tree1a75bf065c61f0870ff4d63eac6130998834748c /net/mac80211/util.c
parenta0ca796c460259bc079631d2d148ffff1d1fc736 (diff)
mac80211: pass queue bitmap to flush operation
There are a number of situations in which mac80211 only really needs to flush queues for one virtual interface, and in fact during this frames might be transmitted on other virtual interfaces. Calculate and pass a queue bitmap to the driver so it knows which queues to flush. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
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,