ath9k: Remove ATH9K_TX_SW_ABORTED and introduce a bool for this purpose
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
d826c83277
commit
6d913f7db3
3 changed files with 5 additions and 6 deletions
|
@ -82,6 +82,7 @@ struct ath_buf {
|
||||||
dma_addr_t bf_buf_addr; /* physical addr of data buffer */
|
dma_addr_t bf_buf_addr; /* physical addr of data buffer */
|
||||||
bool bf_stale;
|
bool bf_stale;
|
||||||
bool bf_isnullfunc;
|
bool bf_isnullfunc;
|
||||||
|
bool bf_tx_aborted;
|
||||||
u16 bf_flags;
|
u16 bf_flags;
|
||||||
struct ath_buf_state bf_state;
|
struct ath_buf_state bf_state;
|
||||||
dma_addr_t bf_dmacontext;
|
dma_addr_t bf_dmacontext;
|
||||||
|
|
|
@ -86,7 +86,6 @@
|
||||||
#define ATH9K_TX_DESC_CFG_ERR 0x04
|
#define ATH9K_TX_DESC_CFG_ERR 0x04
|
||||||
#define ATH9K_TX_DATA_UNDERRUN 0x08
|
#define ATH9K_TX_DATA_UNDERRUN 0x08
|
||||||
#define ATH9K_TX_DELIM_UNDERRUN 0x10
|
#define ATH9K_TX_DELIM_UNDERRUN 0x10
|
||||||
#define ATH9K_TX_SW_ABORTED 0x40
|
|
||||||
#define ATH9K_TX_SW_FILTERED 0x80
|
#define ATH9K_TX_SW_FILTERED 0x80
|
||||||
|
|
||||||
/* 64 bytes */
|
/* 64 bytes */
|
||||||
|
|
|
@ -359,7 +359,7 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
|
||||||
acked_cnt++;
|
acked_cnt++;
|
||||||
} else {
|
} else {
|
||||||
if (!(tid->state & AGGR_CLEANUP) &&
|
if (!(tid->state & AGGR_CLEANUP) &&
|
||||||
ts->ts_flags != ATH9K_TX_SW_ABORTED) {
|
!bf_last->bf_tx_aborted) {
|
||||||
if (bf->bf_retries < ATH_MAX_SW_RETRIES) {
|
if (bf->bf_retries < ATH_MAX_SW_RETRIES) {
|
||||||
ath_tx_set_retry(sc, txq, bf);
|
ath_tx_set_retry(sc, txq, bf);
|
||||||
txpending = 1;
|
txpending = 1;
|
||||||
|
@ -1036,9 +1036,6 @@ void ath_draintxq(struct ath_softc *sc, struct ath_txq *txq, bool retry_tx)
|
||||||
struct ath_tx_status ts;
|
struct ath_tx_status ts;
|
||||||
|
|
||||||
memset(&ts, 0, sizeof(ts));
|
memset(&ts, 0, sizeof(ts));
|
||||||
if (!retry_tx)
|
|
||||||
ts.ts_flags = ATH9K_TX_SW_ABORTED;
|
|
||||||
|
|
||||||
INIT_LIST_HEAD(&bf_head);
|
INIT_LIST_HEAD(&bf_head);
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
@ -1063,6 +1060,8 @@ void ath_draintxq(struct ath_softc *sc, struct ath_txq *txq, bool retry_tx)
|
||||||
}
|
}
|
||||||
|
|
||||||
lastbf = bf->bf_lastbf;
|
lastbf = bf->bf_lastbf;
|
||||||
|
if (!retry_tx)
|
||||||
|
lastbf->bf_tx_aborted = true;
|
||||||
|
|
||||||
/* remove ath_buf's of the same mpdu from txq */
|
/* remove ath_buf's of the same mpdu from txq */
|
||||||
list_cut_position(&bf_head, &txq->axq_q, &lastbf->list);
|
list_cut_position(&bf_head, &txq->axq_q, &lastbf->list);
|
||||||
|
@ -1897,7 +1896,7 @@ static int ath_tx_num_badfrms(struct ath_softc *sc, struct ath_buf *bf,
|
||||||
int nbad = 0;
|
int nbad = 0;
|
||||||
int isaggr = 0;
|
int isaggr = 0;
|
||||||
|
|
||||||
if (ts->ts_flags == ATH9K_TX_SW_ABORTED)
|
if (bf->bf_tx_aborted)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
isaggr = bf_isaggr(bf);
|
isaggr = bf_isaggr(bf);
|
||||||
|
|
Loading…
Reference in a new issue