-+ if (ts->ts_status & ATH9K_TXERR_FILT) {
-+ if (!an->sleeping)
-+ clear_filter = true;
-+ txpending = 1;
-+ } else if (fi->retries < ATH_MAX_SW_RETRIES) {
- ath_tx_set_retry(sc, txq, bf->bf_mpdu);
- txpending = 1;
- } else {
-@@ -496,6 +501,7 @@ static void ath_tx_complete_aggr(struct
+- ath_tx_set_retry(sc, txq, bf->bf_mpdu);
+- txpending = 1;
+- } else {
+- bf->bf_state.bf_type |= BUF_XRETRY;
+- txfail = 1;
+- sendbar = 1;
+- txfail_cnt++;
+- }
+- } else {
++ if ((tid->state & AGGR_CLEANUP) || !retry) {
+ /*
+ * cleanup in progress, just fail
+ * the un-acked sub-frames
+ */
+ txfail = 1;
++ } else if (fi->retries < ATH_MAX_SW_RETRIES) {
++ if (!(ts->ts_status & ATH9K_TXERR_FILT) ||
++ !an->sleeping)
++ ath_tx_set_retry(sc, txq, bf->bf_mpdu);
++
++ clear_filter = true;
++ txpending = 1;
++ } else {
++ bf->bf_state.bf_type |= BUF_XRETRY;
++ txfail = 1;
++ sendbar = 1;
++ txfail_cnt++;
+ }
+ }
+
+@@ -496,6 +499,7 @@ static void ath_tx_complete_aggr(struct