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 /drivers/net/wireless/b43 | |
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 'drivers/net/wireless/b43')
-rw-r--r-- | drivers/net/wireless/b43/dma.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/b43/pio.c | 8 |
2 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/wireless/b43/dma.c b/drivers/net/wireless/b43/dma.c index aced9866d815..b4eadd908bea 100644 --- a/drivers/net/wireless/b43/dma.c +++ b/drivers/net/wireless/b43/dma.c | |||
@@ -1297,7 +1297,8 @@ int b43_dma_tx(struct b43_wldev *dev, struct sk_buff *skb) | |||
1297 | hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_MOREDATA); | 1297 | hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_MOREDATA); |
1298 | } else { | 1298 | } else { |
1299 | /* Decide by priority where to put this frame. */ | 1299 | /* Decide by priority where to put this frame. */ |
1300 | ring = select_ring_by_priority(dev, info->queue); | 1300 | ring = select_ring_by_priority( |
1301 | dev, skb_get_queue_mapping(skb)); | ||
1301 | } | 1302 | } |
1302 | 1303 | ||
1303 | spin_lock_irqsave(&ring->lock, flags); | 1304 | spin_lock_irqsave(&ring->lock, flags); |
@@ -1315,7 +1316,7 @@ int b43_dma_tx(struct b43_wldev *dev, struct sk_buff *skb) | |||
1315 | /* Assign the queue number to the ring (if not already done before) | 1316 | /* Assign the queue number to the ring (if not already done before) |
1316 | * so TX status handling can use it. The queue to ring mapping is | 1317 | * so TX status handling can use it. The queue to ring mapping is |
1317 | * static, so we don't need to store it per frame. */ | 1318 | * static, so we don't need to store it per frame. */ |
1318 | ring->queue_prio = info->queue; | 1319 | ring->queue_prio = skb_get_queue_mapping(skb); |
1319 | 1320 | ||
1320 | err = dma_tx_fragment(ring, skb); | 1321 | err = dma_tx_fragment(ring, skb); |
1321 | if (unlikely(err == -ENOKEY)) { | 1322 | if (unlikely(err == -ENOKEY)) { |
@@ -1333,7 +1334,7 @@ int b43_dma_tx(struct b43_wldev *dev, struct sk_buff *skb) | |||
1333 | if ((free_slots(ring) < SLOTS_PER_PACKET) || | 1334 | if ((free_slots(ring) < SLOTS_PER_PACKET) || |
1334 | should_inject_overflow(ring)) { | 1335 | should_inject_overflow(ring)) { |
1335 | /* This TX ring is full. */ | 1336 | /* This TX ring is full. */ |
1336 | ieee80211_stop_queue(dev->wl->hw, info->queue); | 1337 | ieee80211_stop_queue(dev->wl->hw, skb_get_queue_mapping(skb)); |
1337 | ring->stopped = 1; | 1338 | ring->stopped = 1; |
1338 | if (b43_debug(dev, B43_DBG_DMAVERBOSE)) { | 1339 | if (b43_debug(dev, B43_DBG_DMAVERBOSE)) { |
1339 | b43dbg(dev->wl, "Stopped TX ring %d\n", ring->index); | 1340 | b43dbg(dev->wl, "Stopped TX ring %d\n", ring->index); |
diff --git a/drivers/net/wireless/b43/pio.c b/drivers/net/wireless/b43/pio.c index 284786a94e7d..8b1555d95f1c 100644 --- a/drivers/net/wireless/b43/pio.c +++ b/drivers/net/wireless/b43/pio.c | |||
@@ -509,7 +509,7 @@ int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *skb) | |||
509 | hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_MOREDATA); | 509 | hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_MOREDATA); |
510 | } else { | 510 | } else { |
511 | /* Decide by priority where to put this frame. */ | 511 | /* Decide by priority where to put this frame. */ |
512 | q = select_queue_by_priority(dev, info->queue); | 512 | q = select_queue_by_priority(dev, skb_get_queue_mapping(skb)); |
513 | } | 513 | } |
514 | 514 | ||
515 | spin_lock_irqsave(&q->lock, flags); | 515 | spin_lock_irqsave(&q->lock, flags); |
@@ -532,7 +532,7 @@ int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *skb) | |||
532 | if (total_len > (q->buffer_size - q->buffer_used)) { | 532 | if (total_len > (q->buffer_size - q->buffer_used)) { |
533 | /* Not enough memory on the queue. */ | 533 | /* Not enough memory on the queue. */ |
534 | err = -EBUSY; | 534 | err = -EBUSY; |
535 | ieee80211_stop_queue(dev->wl->hw, info->queue); | 535 | ieee80211_stop_queue(dev->wl->hw, skb_get_queue_mapping(skb)); |
536 | q->stopped = 1; | 536 | q->stopped = 1; |
537 | goto out_unlock; | 537 | goto out_unlock; |
538 | } | 538 | } |
@@ -540,7 +540,7 @@ int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *skb) | |||
540 | /* Assign the queue number to the ring (if not already done before) | 540 | /* Assign the queue number to the ring (if not already done before) |
541 | * so TX status handling can use it. The mac80211-queue to b43-queue | 541 | * so TX status handling can use it. The mac80211-queue to b43-queue |
542 | * mapping is static, so we don't need to store it per frame. */ | 542 | * mapping is static, so we don't need to store it per frame. */ |
543 | q->queue_prio = info->queue; | 543 | q->queue_prio = skb_get_queue_mapping(skb); |
544 | 544 | ||
545 | err = pio_tx_frame(q, skb); | 545 | err = pio_tx_frame(q, skb); |
546 | if (unlikely(err == -ENOKEY)) { | 546 | if (unlikely(err == -ENOKEY)) { |
@@ -560,7 +560,7 @@ int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *skb) | |||
560 | if (((q->buffer_size - q->buffer_used) < roundup(2 + 2 + 6, 4)) || | 560 | if (((q->buffer_size - q->buffer_used) < roundup(2 + 2 + 6, 4)) || |
561 | (q->free_packet_slots == 0)) { | 561 | (q->free_packet_slots == 0)) { |
562 | /* The queue is full. */ | 562 | /* The queue is full. */ |
563 | ieee80211_stop_queue(dev->wl->hw, info->queue); | 563 | ieee80211_stop_queue(dev->wl->hw, skb_get_queue_mapping(skb)); |
564 | q->stopped = 1; | 564 | q->stopped = 1; |
565 | } | 565 | } |
566 | 566 | ||