提交 c41d92dc 编写于 作者: V Vasanthakumar Thiagarajan 提交者: John W. Linville

ath9k: Handle tx desc shortage more appropriately

Update tx BA window and complete the frame as failed
one if we can't clone the holding descriptor due to
unavailability of descriptors.
Signed-off-by: NVasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 8e7f98b5
...@@ -382,8 +382,24 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq, ...@@ -382,8 +382,24 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
struct ath_buf *tbf; struct ath_buf *tbf;
tbf = ath_clone_txbuf(sc, bf_last); tbf = ath_clone_txbuf(sc, bf_last);
if (!tbf) /*
* Update tx baw and complete the frame with
* failed status if we run out of tx buf
*/
if (!tbf) {
spin_lock_bh(&txq->axq_lock);
ath_tx_update_baw(sc, tid,
bf->bf_seqno);
spin_unlock_bh(&txq->axq_lock);
bf->bf_state.bf_type |= BUF_XRETRY;
ath_tx_rc_status(bf, ds, nbad,
0, false);
ath_tx_complete_buf(sc, bf, &bf_head,
0, 0);
break; break;
}
ath9k_hw_cleartxdesc(sc->sc_ah, tbf->bf_desc); ath9k_hw_cleartxdesc(sc->sc_ah, tbf->bf_desc);
list_add_tail(&tbf->list, &bf_head); list_add_tail(&tbf->list, &bf_head);
} else { } else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册