aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/wme.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c
index b21cfec4b6ce..6e8099e77043 100644
--- a/net/mac80211/wme.c
+++ b/net/mac80211/wme.c
@@ -237,12 +237,14 @@ void ieee80211_ht_agg_queue_remove(struct ieee80211_local *local,
237 ieee80211_requeue(local, agg_queue); 237 ieee80211_requeue(local, agg_queue);
238 } else { 238 } else {
239 struct netdev_queue *txq; 239 struct netdev_queue *txq;
240 spinlock_t *root_lock;
240 241
241 txq = netdev_get_tx_queue(local->mdev, agg_queue); 242 txq = netdev_get_tx_queue(local->mdev, agg_queue);
243 root_lock = qdisc_root_lock(txq->qdisc);
242 244
243 spin_lock_bh(&txq->lock); 245 spin_lock_bh(root_lock);
244 qdisc_reset(txq->qdisc); 246 qdisc_reset(txq->qdisc);
245 spin_unlock_bh(&txq->lock); 247 spin_unlock_bh(root_lock);
246 } 248 }
247} 249}
248 250
@@ -250,6 +252,7 @@ void ieee80211_requeue(struct ieee80211_local *local, int queue)
250{ 252{
251 struct netdev_queue *txq = netdev_get_tx_queue(local->mdev, queue); 253 struct netdev_queue *txq = netdev_get_tx_queue(local->mdev, queue);
252 struct sk_buff_head list; 254 struct sk_buff_head list;
255 spinlock_t *root_lock;
253 struct Qdisc *qdisc; 256 struct Qdisc *qdisc;
254 u32 len; 257 u32 len;
255 258
@@ -261,14 +264,15 @@ void ieee80211_requeue(struct ieee80211_local *local, int queue)
261 264
262 skb_queue_head_init(&list); 265 skb_queue_head_init(&list);
263 266
264 spin_lock(&txq->lock); 267 root_lock = qdisc_root_lock(qdisc);
268 spin_lock(root_lock);
265 for (len = qdisc->q.qlen; len > 0; len--) { 269 for (len = qdisc->q.qlen; len > 0; len--) {
266 struct sk_buff *skb = qdisc->dequeue(qdisc); 270 struct sk_buff *skb = qdisc->dequeue(qdisc);
267 271
268 if (skb) 272 if (skb)
269 __skb_queue_tail(&list, skb); 273 __skb_queue_tail(&list, skb);
270 } 274 }
271 spin_unlock(&txq->lock); 275 spin_unlock(root_lock);
272 276
273 for (len = list.qlen; len > 0; len--) { 277 for (len = list.qlen; len > 0; len--) {
274 struct sk_buff *skb = __skb_dequeue(&list); 278 struct sk_buff *skb = __skb_dequeue(&list);
@@ -280,12 +284,13 @@ void ieee80211_requeue(struct ieee80211_local *local, int queue)
280 284
281 txq = netdev_get_tx_queue(local->mdev, new_queue); 285 txq = netdev_get_tx_queue(local->mdev, new_queue);
282 286
283 spin_lock(&txq->lock);
284 287
285 qdisc = rcu_dereference(txq->qdisc); 288 qdisc = rcu_dereference(txq->qdisc);
286 qdisc->enqueue(skb, qdisc); 289 root_lock = qdisc_root_lock(qdisc);
287 290
288 spin_unlock(&txq->lock); 291 spin_lock(root_lock);
292 qdisc->enqueue(skb, qdisc);
293 spin_unlock(root_lock);
289 } 294 }
290 295
291out_unlock: 296out_unlock: