Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 214727
b: refs/heads/master
c: 2341329
h: refs/heads/master
i:
  214725: ce47100
  214723: 8f47b56
  214719: d701dc2
v: v3
  • Loading branch information
Bruno Randolf authored and John W. Linville committed Sep 21, 2010
1 parent 397f21d commit e3df86f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 33 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: 923e5b3d3d773b9956b943ac64f782d5a127bdea
refs/heads/master: 234132960dcf8ebd9d424d92a4dfb0e57fa63a17
64 changes: 32 additions & 32 deletions trunk/drivers/net/wireless/ath/ath5k/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1586,44 +1586,44 @@ ath5k_tx_processq(struct ath5k_softc *sc, struct ath5k_txq *txq)

spin_lock(&txq->lock);
list_for_each_entry_safe(bf, bf0, &txq->q, list) {
ds = bf->desc;

txq->txq_poll_mark = false;

/* skb might already have been processed last time. */
if (bf->skb != NULL) {
ds = bf->desc;

ret = sc->ah->ah_proc_tx_desc(sc->ah, ds, &ts);
if (unlikely(ret == -EINPROGRESS))
break;
else if (unlikely(ret)) {
ATH5K_ERR(sc,
"error %d while processing "
"queue %u\n", ret, txq->qnum);
break;
}

skb = bf->skb;
bf->skb = NULL;
pci_unmap_single(sc->pdev, bf->skbaddr, skb->len,
PCI_DMA_TODEVICE);
ath5k_tx_frame_completed(sc, skb, &ts);
}

/*
* It's possible that the hardware can say the buffer is
* completed when it hasn't yet loaded the ds_link from
* host memory and moved on. If there are more TX
* descriptors in the queue, wait for TXDP to change
* before processing this one.
* host memory and moved on.
* Always keep the last descriptor to avoid HW races...
*/
if (ath5k_hw_get_txdp(sc->ah, txq->qnum) == bf->daddr &&
!list_is_last(&bf->list, &txq->q))
break;
ret = sc->ah->ah_proc_tx_desc(sc->ah, ds, &ts);
if (unlikely(ret == -EINPROGRESS))
break;
else if (unlikely(ret)) {
ATH5K_ERR(sc, "error %d while processing queue %u\n",
ret, txq->qnum);
break;
if (ath5k_hw_get_txdp(sc->ah, txq->qnum) != bf->daddr) {
spin_lock(&sc->txbuflock);
list_move_tail(&bf->list, &sc->txbuf);
sc->txbuf_len++;
txq->txq_len--;
spin_unlock(&sc->txbuflock);
}

skb = bf->skb;
bf->skb = NULL;
pci_unmap_single(sc->pdev, bf->skbaddr, skb->len,
PCI_DMA_TODEVICE);

ath5k_tx_frame_completed(sc, skb, &ts);

spin_lock(&sc->txbuflock);
list_move_tail(&bf->list, &sc->txbuf);
sc->txbuf_len++;
txq->txq_len--;
spin_unlock(&sc->txbuflock);

txq->txq_poll_mark = false;
}
if (likely(list_empty(&txq->q)))
txq->link = NULL;
spin_unlock(&txq->lock);
if (txq->txq_len < ATH5K_TXQ_LEN_LOW)
ieee80211_wake_queue(sc->hw, txq->qnum);
Expand Down Expand Up @@ -2188,7 +2188,7 @@ ath5k_tx_complete_poll_work(struct work_struct *work)
if (sc->txqs[i].setup) {
txq = &sc->txqs[i];
spin_lock_bh(&txq->lock);
if (txq->txq_len > 0) {
if (txq->txq_len > 1) {
if (txq->txq_poll_mark) {
ATH5K_DBG(sc, ATH5K_DEBUG_XMIT,
"TX queue stuck %d\n",
Expand Down

0 comments on commit e3df86f

Please sign in to comment.