diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-05-16 18:57:14 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-05-21 21:48:14 -0400 |
commit | e2530083609148a7835b54c431f6b8956407c1f6 (patch) | |
tree | 8ed43347541444c7a72d2c79f550f69a93cad591 /net/mac80211/util.c | |
parent | eefce91a384a64c7bbf913eb08c4adfb911c3639 (diff) |
mac80211: use multi-queue master netdevice
This patch updates mac80211 and drivers to be multi-queue aware and
use that instead of the internal queue mapping. Also does a number
of cleanups in various pieces of the code that fall out and reduces
internal mac80211 state size.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index d9109dee461f..4f7180b287da 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -331,17 +331,15 @@ void ieee80211_wake_queue(struct ieee80211_hw *hw, int queue) | |||
331 | { | 331 | { |
332 | struct ieee80211_local *local = hw_to_local(hw); | 332 | struct ieee80211_local *local = hw_to_local(hw); |
333 | 333 | ||
334 | if (test_and_clear_bit(IEEE80211_LINK_STATE_XOFF, | 334 | if (test_bit(queue, local->queues_pending)) { |
335 | &local->state[queue])) { | 335 | tasklet_schedule(&local->tx_pending_tasklet); |
336 | if (test_bit(IEEE80211_LINK_STATE_PENDING, | 336 | } else { |
337 | &local->state[queue])) | 337 | if (ieee80211_is_multiqueue(local)) { |
338 | tasklet_schedule(&local->tx_pending_tasklet); | 338 | netif_wake_subqueue(local->mdev, queue); |
339 | else | 339 | } else { |
340 | if (!ieee80211_qdisc_installed(local->mdev)) { | 340 | WARN_ON(queue != 0); |
341 | if (queue == 0) | 341 | netif_wake_queue(local->mdev); |
342 | netif_wake_queue(local->mdev); | 342 | } |
343 | } else | ||
344 | __netif_schedule(local->mdev); | ||
345 | } | 343 | } |
346 | } | 344 | } |
347 | EXPORT_SYMBOL(ieee80211_wake_queue); | 345 | EXPORT_SYMBOL(ieee80211_wake_queue); |
@@ -350,9 +348,12 @@ void ieee80211_stop_queue(struct ieee80211_hw *hw, int queue) | |||
350 | { | 348 | { |
351 | struct ieee80211_local *local = hw_to_local(hw); | 349 | struct ieee80211_local *local = hw_to_local(hw); |
352 | 350 | ||
353 | if (!ieee80211_qdisc_installed(local->mdev) && queue == 0) | 351 | if (ieee80211_is_multiqueue(local)) { |
352 | netif_stop_subqueue(local->mdev, queue); | ||
353 | } else { | ||
354 | WARN_ON(queue != 0); | ||
354 | netif_stop_queue(local->mdev); | 355 | netif_stop_queue(local->mdev); |
355 | set_bit(IEEE80211_LINK_STATE_XOFF, &local->state[queue]); | 356 | } |
356 | } | 357 | } |
357 | EXPORT_SYMBOL(ieee80211_stop_queue); | 358 | EXPORT_SYMBOL(ieee80211_stop_queue); |
358 | 359 | ||
@@ -360,7 +361,7 @@ void ieee80211_stop_queues(struct ieee80211_hw *hw) | |||
360 | { | 361 | { |
361 | int i; | 362 | int i; |
362 | 363 | ||
363 | for (i = 0; i < hw->queues + hw->ampdu_queues; i++) | 364 | for (i = 0; i < ieee80211_num_queues(hw); i++) |
364 | ieee80211_stop_queue(hw, i); | 365 | ieee80211_stop_queue(hw, i); |
365 | } | 366 | } |
366 | EXPORT_SYMBOL(ieee80211_stop_queues); | 367 | EXPORT_SYMBOL(ieee80211_stop_queues); |