diff options
Diffstat (limited to 'drivers/net/wireless/b43legacy/dma.c')
-rw-r--r-- | drivers/net/wireless/b43legacy/dma.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/wireless/b43legacy/dma.c b/drivers/net/wireless/b43legacy/dma.c index e03e01d0bc35..c33934ad6cd2 100644 --- a/drivers/net/wireless/b43legacy/dma.c +++ b/drivers/net/wireless/b43legacy/dma.c | |||
@@ -817,14 +817,13 @@ static void dmacontroller_cleanup(struct b43legacy_dmaring *ring) | |||
817 | 817 | ||
818 | static void free_all_descbuffers(struct b43legacy_dmaring *ring) | 818 | static void free_all_descbuffers(struct b43legacy_dmaring *ring) |
819 | { | 819 | { |
820 | struct b43legacy_dmadesc_generic *desc; | ||
821 | struct b43legacy_dmadesc_meta *meta; | 820 | struct b43legacy_dmadesc_meta *meta; |
822 | int i; | 821 | int i; |
823 | 822 | ||
824 | if (!ring->used_slots) | 823 | if (!ring->used_slots) |
825 | return; | 824 | return; |
826 | for (i = 0; i < ring->nr_slots; i++) { | 825 | for (i = 0; i < ring->nr_slots; i++) { |
827 | desc = ring->ops->idx2desc(ring, i, &meta); | 826 | ring->ops->idx2desc(ring, i, &meta); |
828 | 827 | ||
829 | if (!meta->skb) { | 828 | if (!meta->skb) { |
830 | B43legacy_WARN_ON(!ring->tx); | 829 | B43legacy_WARN_ON(!ring->tx); |
@@ -1371,10 +1370,8 @@ int b43legacy_dma_tx(struct b43legacy_wldev *dev, | |||
1371 | struct sk_buff *skb) | 1370 | struct sk_buff *skb) |
1372 | { | 1371 | { |
1373 | struct b43legacy_dmaring *ring; | 1372 | struct b43legacy_dmaring *ring; |
1374 | struct ieee80211_hdr *hdr; | ||
1375 | int err = 0; | 1373 | int err = 0; |
1376 | unsigned long flags; | 1374 | unsigned long flags; |
1377 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | ||
1378 | 1375 | ||
1379 | ring = priority_to_txring(dev, skb_get_queue_mapping(skb)); | 1376 | ring = priority_to_txring(dev, skb_get_queue_mapping(skb)); |
1380 | spin_lock_irqsave(&ring->lock, flags); | 1377 | spin_lock_irqsave(&ring->lock, flags); |
@@ -1401,8 +1398,6 @@ int b43legacy_dma_tx(struct b43legacy_wldev *dev, | |||
1401 | 1398 | ||
1402 | /* dma_tx_fragment might reallocate the skb, so invalidate pointers pointing | 1399 | /* dma_tx_fragment might reallocate the skb, so invalidate pointers pointing |
1403 | * into the skb data or cb now. */ | 1400 | * into the skb data or cb now. */ |
1404 | hdr = NULL; | ||
1405 | info = NULL; | ||
1406 | err = dma_tx_fragment(ring, &skb); | 1401 | err = dma_tx_fragment(ring, &skb); |
1407 | if (unlikely(err == -ENOKEY)) { | 1402 | if (unlikely(err == -ENOKEY)) { |
1408 | /* Drop this packet, as we don't have the encryption key | 1403 | /* Drop this packet, as we don't have the encryption key |
@@ -1435,7 +1430,6 @@ void b43legacy_dma_handle_txstatus(struct b43legacy_wldev *dev, | |||
1435 | { | 1430 | { |
1436 | const struct b43legacy_dma_ops *ops; | 1431 | const struct b43legacy_dma_ops *ops; |
1437 | struct b43legacy_dmaring *ring; | 1432 | struct b43legacy_dmaring *ring; |
1438 | struct b43legacy_dmadesc_generic *desc; | ||
1439 | struct b43legacy_dmadesc_meta *meta; | 1433 | struct b43legacy_dmadesc_meta *meta; |
1440 | int retry_limit; | 1434 | int retry_limit; |
1441 | int slot; | 1435 | int slot; |
@@ -1450,7 +1444,7 @@ void b43legacy_dma_handle_txstatus(struct b43legacy_wldev *dev, | |||
1450 | ops = ring->ops; | 1444 | ops = ring->ops; |
1451 | while (1) { | 1445 | while (1) { |
1452 | B43legacy_WARN_ON(!(slot >= 0 && slot < ring->nr_slots)); | 1446 | B43legacy_WARN_ON(!(slot >= 0 && slot < ring->nr_slots)); |
1453 | desc = ops->idx2desc(ring, slot, &meta); | 1447 | ops->idx2desc(ring, slot, &meta); |
1454 | 1448 | ||
1455 | if (meta->skb) | 1449 | if (meta->skb) |
1456 | unmap_descbuffer(ring, meta->dmaaddr, | 1450 | unmap_descbuffer(ring, meta->dmaaddr, |