ath9k: improve PS filter clearing and retry counting for A-MPDU
Do not increment the retry counter if packets to a sleeping station were not sent because of tx failure, instead of only checking the filter flag. Clear the PS filter only after an A-MPDU was reported as filtered, otherwise the hardware might do some unnecessary extra retransmissions. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
030d629435
commit
26a64259b7
@ -373,7 +373,6 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
|
|||||||
struct ath_frame_info *fi;
|
struct ath_frame_info *fi;
|
||||||
int nframes;
|
int nframes;
|
||||||
u8 tidno;
|
u8 tidno;
|
||||||
bool clear_filter;
|
|
||||||
|
|
||||||
skb = bf->bf_mpdu;
|
skb = bf->bf_mpdu;
|
||||||
hdr = (struct ieee80211_hdr *)skb->data;
|
hdr = (struct ieee80211_hdr *)skb->data;
|
||||||
@ -463,11 +462,9 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
|
|||||||
*/
|
*/
|
||||||
txfail = 1;
|
txfail = 1;
|
||||||
} else if (fi->retries < ATH_MAX_SW_RETRIES) {
|
} else if (fi->retries < ATH_MAX_SW_RETRIES) {
|
||||||
if (!(ts->ts_status & ATH9K_TXERR_FILT) ||
|
if (txok || !an->sleeping)
|
||||||
!an->sleeping)
|
|
||||||
ath_tx_set_retry(sc, txq, bf->bf_mpdu);
|
ath_tx_set_retry(sc, txq, bf->bf_mpdu);
|
||||||
|
|
||||||
clear_filter = true;
|
|
||||||
txpending = 1;
|
txpending = 1;
|
||||||
} else {
|
} else {
|
||||||
txfail = 1;
|
txfail = 1;
|
||||||
@ -545,11 +542,13 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
|
|||||||
ieee80211_sta_set_buffered(sta, tid->tidno, true);
|
ieee80211_sta_set_buffered(sta, tid->tidno, true);
|
||||||
|
|
||||||
spin_lock_bh(&txq->axq_lock);
|
spin_lock_bh(&txq->axq_lock);
|
||||||
if (clear_filter)
|
|
||||||
tid->ac->clear_ps_filter = true;
|
|
||||||
skb_queue_splice(&bf_pending, &tid->buf_q);
|
skb_queue_splice(&bf_pending, &tid->buf_q);
|
||||||
if (!an->sleeping)
|
if (!an->sleeping) {
|
||||||
ath_tx_queue_tid(txq, tid);
|
ath_tx_queue_tid(txq, tid);
|
||||||
|
|
||||||
|
if (ts->ts_status & ATH9K_TXERR_FILT)
|
||||||
|
tid->ac->clear_ps_filter = true;
|
||||||
|
}
|
||||||
spin_unlock_bh(&txq->axq_lock);
|
spin_unlock_bh(&txq->axq_lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user