aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/cfg.c
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/cfg.c
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/cfg.c')
-rw-r--r--net/mac80211/cfg.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index af3eac482acd..e920d48f0209 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -837,7 +837,8 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
837 if (!ieee80211_csa_needs_block_tx(local)) 837 if (!ieee80211_csa_needs_block_tx(local))
838 ieee80211_wake_queues_by_reason(&local->hw, 838 ieee80211_wake_queues_by_reason(&local->hw,
839 IEEE80211_MAX_QUEUE_MAP, 839 IEEE80211_MAX_QUEUE_MAP,
840 IEEE80211_QUEUE_STOP_REASON_CSA); 840 IEEE80211_QUEUE_STOP_REASON_CSA,
841 false);
841 mutex_unlock(&local->mtx); 842 mutex_unlock(&local->mtx);
842 843
843 kfree(sdata->u.ap.next_beacon); 844 kfree(sdata->u.ap.next_beacon);
@@ -2828,7 +2829,8 @@ static int __ieee80211_csa_finalize(struct ieee80211_sub_if_data *sdata)
2828 if (!ieee80211_csa_needs_block_tx(local)) 2829 if (!ieee80211_csa_needs_block_tx(local))
2829 ieee80211_wake_queues_by_reason(&local->hw, 2830 ieee80211_wake_queues_by_reason(&local->hw,
2830 IEEE80211_MAX_QUEUE_MAP, 2831 IEEE80211_MAX_QUEUE_MAP,
2831 IEEE80211_QUEUE_STOP_REASON_CSA); 2832 IEEE80211_QUEUE_STOP_REASON_CSA,
2833 false);
2832 2834
2833 return 0; 2835 return 0;
2834} 2836}
@@ -3060,7 +3062,8 @@ __ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
3060 if (sdata->csa_block_tx) 3062 if (sdata->csa_block_tx)
3061 ieee80211_stop_queues_by_reason(&local->hw, 3063 ieee80211_stop_queues_by_reason(&local->hw,
3062 IEEE80211_MAX_QUEUE_MAP, 3064 IEEE80211_MAX_QUEUE_MAP,
3063 IEEE80211_QUEUE_STOP_REASON_CSA); 3065 IEEE80211_QUEUE_STOP_REASON_CSA,
3066 false);
3064 3067
3065 if (changed) { 3068 if (changed) {
3066 ieee80211_bss_info_change_notify(sdata, changed); 3069 ieee80211_bss_info_change_notify(sdata, changed);