b43: Move DMA stop sanity check
[safe/jmp/linux-2.6] / drivers / net / wireless / b43 / dma.c
index 098f886..0f021c6 100644 (file)
@@ -1306,16 +1306,18 @@ int b43_dma_tx(struct b43_wldev *dev, struct sk_buff *skb)
        }
 
        spin_lock_irqsave(&ring->lock, flags);
+
        B43_WARN_ON(!ring->tx);
+       /* Check if the queue was stopped in mac80211,
+        * but we got called nevertheless.
+        * That would be a mac80211 bug. */
+       B43_WARN_ON(ring->stopped);
+
        if (unlikely(free_slots(ring) < SLOTS_PER_PACKET)) {
                b43warn(dev->wl, "DMA queue overflow\n");
                err = -ENOSPC;
                goto out_unlock;
        }
-       /* Check if the queue was stopped in mac80211,
-        * but we got called nevertheless.
-        * That would be a mac80211 bug. */
-       B43_WARN_ON(ring->stopped);
 
        /* Assign the queue number to the ring (if not already done before)
         * so TX status handling can use it. The queue to ring mapping is
@@ -1387,13 +1389,11 @@ void b43_dma_handle_txstatus(struct b43_wldev *dev,
 
                        info = IEEE80211_SKB_CB(meta->skb);
 
-                       memset(&info->status, 0, sizeof(info->status));
-
                        /*
                         * Call back to inform the ieee80211 subsystem about
                         * the status of the transmission.
                         */
-                       frame_succeed = b43_fill_txstatus_report(info, status);
+                       frame_succeed = b43_fill_txstatus_report(dev, info, status);
 #ifdef CONFIG_B43_DEBUG
                        if (frame_succeed)
                                ring->nr_succeed_tx_packets++;