Skip to content

Commit

Permalink
ath9k: downgrade ASSERT() in ath_clone_txbuf()
Browse files Browse the repository at this point in the history
We can easily run out of tx buf if there is any stuck in
transmission, so downgrade it to WARN_ON().

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Vasanthakumar Thiagarajan authored and John W. Linville committed Jul 10, 2009
1 parent c3d8f02 commit 8a46097
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/wireless/ath/ath9k/xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ static struct ath_buf* ath_clone_txbuf(struct ath_softc *sc, struct ath_buf *bf)
struct ath_buf *tbf;

spin_lock_bh(&sc->tx.txbuflock);
if (WARN_ON(list_empty(&sc->tx.txbuf))) {
spin_unlock_bh(&sc->tx.txbuflock);
return NULL;
}
ASSERT(!list_empty((&sc->tx.txbuf)));
tbf = list_first_entry(&sc->tx.txbuf, struct ath_buf, list);
list_del(&tbf->list);
Expand Down Expand Up @@ -379,6 +383,8 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
struct ath_buf *tbf;

tbf = ath_clone_txbuf(sc, bf_last);
if (!tbf)
break;
ath9k_hw_cleartxdesc(sc->sc_ah, tbf->bf_desc);
list_add_tail(&tbf->list, &bf_head);
} else {
Expand Down

0 comments on commit 8a46097

Please sign in to comment.