Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159356
b: refs/heads/master
c: 18c6951
h: refs/heads/master
v: v3
  • Loading branch information
Larry Finger authored and John W. Linville committed Aug 4, 2009
1 parent dfc4e51 commit b6c1ea7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ae6f53f25f9803212d1985b5eb5a03111f439c24
refs/heads/master: 18c6951091eca7645005a71b556106cc99a6f4b1
21 changes: 15 additions & 6 deletions trunk/drivers/net/wireless/b43/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1334,13 +1334,22 @@ 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) < TX_SLOTS_PER_FRAME)) {
b43warn(dev->wl, "DMA queue overflow\n");
if (unlikely(ring->stopped)) {
/* We get here only because of a bug in mac80211.
* Because of a race, one packet may be queued after
* the queue is stopped, thus we got called when we shouldn't.
* For now, just refuse the transmit. */
if (b43_debug(dev, B43_DBG_DMAVERBOSE))
b43err(dev->wl, "Packet after queue stopped\n");
err = -ENOSPC;
goto out_unlock;
}

if (unlikely(WARN_ON(free_slots(ring) < TX_SLOTS_PER_FRAME))) {
/* If we get here, we have a real error with the queue
* full, but queues not stopped. */
b43err(dev->wl, "DMA queue overflow\n");
err = -ENOSPC;
goto out_unlock;
}
Expand Down

0 comments on commit b6c1ea7

Please sign in to comment.