summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ath/if_ath.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index b6b4217..1e796a0 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -3581,17 +3581,24 @@ ath_tx_update_stats(struct ath_softc *sc, struct ath_tx_status *ts,
if (ts->ts_status & HAL_TXERR_TIMER_EXPIRED)
sc->sc_stats.ast_tx_timerexpired++;
- if (ts->ts_status & HAL_TX_DATA_UNDERRUN)
- sc->sc_stats.ast_tx_data_underrun++;
- if (ts->ts_status & HAL_TX_DELIM_UNDERRUN)
- sc->sc_stats.ast_tx_delim_underrun++;
-
if (bf->bf_m->m_flags & M_FF)
sc->sc_stats.ast_ff_txerr++;
}
/* XXX when is this valid? */
- if (ts->ts_status & HAL_TX_DESC_CFG_ERR)
+ if (ts->ts_flags & HAL_TX_DESC_CFG_ERR)
sc->sc_stats.ast_tx_desccfgerr++;
+ /*
+ * This can be valid for successful frame transmission!
+ * If there's a TX FIFO underrun during aggregate transmission,
+ * the MAC will pad the rest of the aggregate with delimiters.
+ * If a BA is returned, the frame is marked as "OK" and it's up
+ * to the TX completion code to notice which frames weren't
+ * successfully transmitted.
+ */
+ if (ts->ts_flags & HAL_TX_DATA_UNDERRUN)
+ sc->sc_stats.ast_tx_data_underrun++;
+ if (ts->ts_flags & HAL_TX_DELIM_UNDERRUN)
+ sc->sc_stats.ast_tx_delim_underrun++;
sr = ts->ts_shortretry;
lr = ts->ts_longretry;
OpenPOWER on IntegriCloud