diff options
author | Vasanthakumar Thiagarajan <vasanth@atheros.com> | 2009-07-14 20:17:11 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-24 15:05:18 -0400 |
commit | c41d92dc9d9a1afcec0095c32698ea7deff01098 (patch) | |
tree | 0101747c45162bd3a9540b8ccd8ed8e01ff699f7 /drivers | |
parent | 8e7f98b5690fc295e3a39b99aeed475d28c60c90 (diff) |
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: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 24663ce10ef8..4ff155e8ee59 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -382,8 +382,24 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq, | |||
382 | struct ath_buf *tbf; | 382 | struct ath_buf *tbf; |
383 | 383 | ||
384 | tbf = ath_clone_txbuf(sc, bf_last); | 384 | tbf = ath_clone_txbuf(sc, bf_last); |
385 | if (!tbf) | 385 | /* |
386 | * Update tx baw and complete the frame with | ||
387 | * failed status if we run out of tx buf | ||
388 | */ | ||
389 | if (!tbf) { | ||
390 | spin_lock_bh(&txq->axq_lock); | ||
391 | ath_tx_update_baw(sc, tid, | ||
392 | bf->bf_seqno); | ||
393 | spin_unlock_bh(&txq->axq_lock); | ||
394 | |||
395 | bf->bf_state.bf_type |= BUF_XRETRY; | ||
396 | ath_tx_rc_status(bf, ds, nbad, | ||
397 | 0, false); | ||
398 | ath_tx_complete_buf(sc, bf, &bf_head, | ||
399 | 0, 0); | ||
386 | break; | 400 | break; |
401 | } | ||
402 | |||
387 | ath9k_hw_cleartxdesc(sc->sc_ah, tbf->bf_desc); | 403 | ath9k_hw_cleartxdesc(sc->sc_ah, tbf->bf_desc); |
388 | list_add_tail(&tbf->list, &bf_head); | 404 | list_add_tail(&tbf->list, &bf_head); |
389 | } else { | 405 | } else { |