aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorLiad Kaufman <liad.kaufman@intel.com>2014-11-09 11:50:21 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-11-19 12:45:30 -0500
commit4f9610d528a6aa5642fa350fa93fbd905a753ae8 (patch)
tree71c01eb0cd7b1c639685c412e7319c458e7e1144 /net/mac80211
parent8a4d32f30d11d6d8cc29594c7a36b9be6b0edbb5 (diff)
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')
-rw-r--r--net/mac80211/ieee80211_i.h3
-rw-r--r--net/mac80211/util.c20
2 files changed, 18 insertions, 5 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 5de2e5f3a57e..a30d40839d49 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1881,6 +1881,9 @@ void ieee80211_add_pending_skbs(struct ieee80211_local *local,
1881 struct sk_buff_head *skbs); 1881 struct sk_buff_head *skbs);
1882void ieee80211_flush_queues(struct ieee80211_local *local, 1882void ieee80211_flush_queues(struct ieee80211_local *local,
1883 struct ieee80211_sub_if_data *sdata); 1883 struct ieee80211_sub_if_data *sdata);
1884void __ieee80211_flush_queues(struct ieee80211_local *local,
1885 struct ieee80211_sub_if_data *sdata,
1886 unsigned int queues);
1884 1887
1885void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata, 1888void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
1886 u16 transaction, u16 auth_alg, u16 status, 1889 u16 transaction, u16 auth_alg, u16 status,
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,
576 return queues; 576 return queues;
577} 577}
578 578
579void ieee80211_flush_queues(struct ieee80211_local *local, 579void __ieee80211_flush_queues(struct ieee80211_local *local,
580 struct ieee80211_sub_if_data *sdata) 580 struct ieee80211_sub_if_data *sdata,
581 unsigned int queues)
581{ 582{
582 unsigned int queues;
583
584 if (!local->ops->flush) 583 if (!local->ops->flush)
585 return; 584 return;
586 585
587 queues = ieee80211_get_vif_queues(local, sdata); 586 /*
587 * If no queue was set, or if the HW doesn't support
588 * IEEE80211_HW_QUEUE_CONTROL - flush all queues
589 */
590 if (!queues || !(local->hw.flags & IEEE80211_HW_QUEUE_CONTROL))
591 queues = ieee80211_get_vif_queues(local, sdata);
588 592
589 ieee80211_stop_queues_by_reason(&local->hw, queues, 593 ieee80211_stop_queues_by_reason(&local->hw, queues,
590 IEEE80211_QUEUE_STOP_REASON_FLUSH, 594 IEEE80211_QUEUE_STOP_REASON_FLUSH,
@@ -597,6 +601,12 @@ void ieee80211_flush_queues(struct ieee80211_local *local,
597 false); 601 false);
598} 602}
599 603
604void ieee80211_flush_queues(struct ieee80211_local *local,
605 struct ieee80211_sub_if_data *sdata)
606{
607 __ieee80211_flush_queues(local, sdata, 0);
608}
609
600void ieee80211_stop_vif_queues(struct ieee80211_local *local, 610void ieee80211_stop_vif_queues(struct ieee80211_local *local,
601 struct ieee80211_sub_if_data *sdata, 611 struct ieee80211_sub_if_data *sdata,
602 enum queue_stop_reason reason) 612 enum queue_stop_reason reason)