aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2014-06-13 09:30:05 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-06-23 08:22:25 -0400
commitcca07b00a56d6ddd339e457dfd1a229222b9acf5 (patch)
tree15cc5be2e90930f76e6f2188bd825c216f9810fa /net/mac80211/ieee80211_i.h
parent59f48fe22fe817df1ced42dee28b31de88b478b6 (diff)
mac80211: introduce refcount for queue_stop_reasons
Sometimes different vifs may be stopping the queues for the same reason (e.g. when several interfaces are performing a channel switch). Instead of using a bitmask for the reasons, use an integer that holds a refcount instead. In order to keep it backwards compatible, introduce a boolean in some functions that tell us whether the queue stopping should be refcounted or not. For now, use not refcounted for all calls to keep it functionally the same as before. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index d9af7ef3c11a..a0c7da809744 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -922,6 +922,8 @@ enum queue_stop_reason {
922 IEEE80211_QUEUE_STOP_REASON_SKB_ADD, 922 IEEE80211_QUEUE_STOP_REASON_SKB_ADD,
923 IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL, 923 IEEE80211_QUEUE_STOP_REASON_OFFCHANNEL,
924 IEEE80211_QUEUE_STOP_REASON_FLUSH, 924 IEEE80211_QUEUE_STOP_REASON_FLUSH,
925
926 IEEE80211_QUEUE_STOP_REASONS,
925}; 927};
926 928
927#ifdef CONFIG_MAC80211_LEDS 929#ifdef CONFIG_MAC80211_LEDS
@@ -1018,6 +1020,7 @@ struct ieee80211_local {
1018 struct workqueue_struct *workqueue; 1020 struct workqueue_struct *workqueue;
1019 1021
1020 unsigned long queue_stop_reasons[IEEE80211_MAX_QUEUES]; 1022 unsigned long queue_stop_reasons[IEEE80211_MAX_QUEUES];
1023 int q_stop_reasons[IEEE80211_MAX_QUEUES][IEEE80211_QUEUE_STOP_REASONS];
1021 /* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */ 1024 /* also used to protect ampdu_ac_queue and amdpu_ac_stop_refcnt */
1022 spinlock_t queue_stop_reason_lock; 1025 spinlock_t queue_stop_reason_lock;
1023 1026
@@ -1715,14 +1718,18 @@ void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata,
1715 1718
1716void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw, 1719void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw,
1717 unsigned long queues, 1720 unsigned long queues,
1718 enum queue_stop_reason reason); 1721 enum queue_stop_reason reason,
1722 bool refcounted);
1719void ieee80211_stop_queues_by_reason(struct ieee80211_hw *hw, 1723void ieee80211_stop_queues_by_reason(struct ieee80211_hw *hw,
1720 unsigned long queues, 1724 unsigned long queues,
1721 enum queue_stop_reason reason); 1725 enum queue_stop_reason reason,
1726 bool refcounted);
1722void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue, 1727void ieee80211_wake_queue_by_reason(struct ieee80211_hw *hw, int queue,
1723 enum queue_stop_reason reason); 1728 enum queue_stop_reason reason,
1729 bool refcounted);
1724void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue, 1730void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue,
1725 enum queue_stop_reason reason); 1731 enum queue_stop_reason reason,
1732 bool refcounted);
1726void ieee80211_propagate_queue_wake(struct ieee80211_local *local, int queue); 1733void ieee80211_propagate_queue_wake(struct ieee80211_local *local, int queue);
1727void ieee80211_add_pending_skb(struct ieee80211_local *local, 1734void ieee80211_add_pending_skb(struct ieee80211_local *local,
1728 struct sk_buff *skb); 1735 struct sk_buff *skb);