aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/agg-tx.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/agg-tx.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/agg-tx.c')
-rw-r--r--net/mac80211/agg-tx.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index ce9633a3cfb0..d6986f3aa5c4 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -170,10 +170,13 @@ ieee80211_stop_queue_agg(struct ieee80211_sub_if_data *sdata, int tid)
170{ 170{
171 int queue = sdata->vif.hw_queue[ieee80211_ac_from_tid(tid)]; 171 int queue = sdata->vif.hw_queue[ieee80211_ac_from_tid(tid)];
172 172
173 /* we do refcounting here, so don't use the queue reason refcounting */
174
173 if (atomic_inc_return(&sdata->local->agg_queue_stop[queue]) == 1) 175 if (atomic_inc_return(&sdata->local->agg_queue_stop[queue]) == 1)
174 ieee80211_stop_queue_by_reason( 176 ieee80211_stop_queue_by_reason(
175 &sdata->local->hw, queue, 177 &sdata->local->hw, queue,
176 IEEE80211_QUEUE_STOP_REASON_AGGREGATION); 178 IEEE80211_QUEUE_STOP_REASON_AGGREGATION,
179 false);
177 __acquire(agg_queue); 180 __acquire(agg_queue);
178} 181}
179 182
@@ -185,7 +188,8 @@ ieee80211_wake_queue_agg(struct ieee80211_sub_if_data *sdata, int tid)
185 if (atomic_dec_return(&sdata->local->agg_queue_stop[queue]) == 0) 188 if (atomic_dec_return(&sdata->local->agg_queue_stop[queue]) == 0)
186 ieee80211_wake_queue_by_reason( 189 ieee80211_wake_queue_by_reason(
187 &sdata->local->hw, queue, 190 &sdata->local->hw, queue,
188 IEEE80211_QUEUE_STOP_REASON_AGGREGATION); 191 IEEE80211_QUEUE_STOP_REASON_AGGREGATION,
192 false);
189 __release(agg_queue); 193 __release(agg_queue);
190} 194}
191 195