* [PATCH] b43: Move DMA stop sanity check
@ 2009-02-19 19:17 Michael Buesch
0 siblings, 0 replies; only message in thread
From: Michael Buesch @ 2009-02-19 19:17 UTC (permalink / raw)
To: linville; +Cc: bcm43xx-dev, linux-wireless
Move the DMA stop sanity check up a few lines, so it's actually
theoretically possible to trigger. (But it still shouldn't trigger, of course).
Signed-off-by: Michael Buesch <mb@bu3sch.de>
---
Index: wireless-testing/drivers/net/wireless/b43/dma.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43/dma.c 2008-12-26 22:47:29.000000000 +0100
+++ wireless-testing/drivers/net/wireless/b43/dma.c 2009-02-19 20:14:56.000000000 +0100
@@ -1306,16 +1306,18 @@ int b43_dma_tx(struct b43_wldev *dev, st
}
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
--
Greetings, Michael.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-02-19 19:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-19 19:17 [PATCH] b43: Move DMA stop sanity check Michael Buesch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).