mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-15 21:47:40 +07:00
ath9k: fix rate handling/reporting
This patch fixes some issues introduced in the rate control API rework. When not running aggregation, copy bf->rates into info->control.rates before applying the rate control status to it. In ath_lookup_rate, the rates need to be pulled from bf->rates, not the tx info. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
16e2342802
commit
0c585dda35
@ -630,6 +630,7 @@ static void ath_tx_process_buffer(struct ath_softc *sc, struct ath_txq *txq,
|
|||||||
struct ath_tx_status *ts, struct ath_buf *bf,
|
struct ath_tx_status *ts, struct ath_buf *bf,
|
||||||
struct list_head *bf_head)
|
struct list_head *bf_head)
|
||||||
{
|
{
|
||||||
|
struct ieee80211_tx_info *info;
|
||||||
bool txok, flush;
|
bool txok, flush;
|
||||||
|
|
||||||
txok = !(ts->ts_status & ATH9K_TXERR_MASK);
|
txok = !(ts->ts_status & ATH9K_TXERR_MASK);
|
||||||
@ -641,8 +642,12 @@ static void ath_tx_process_buffer(struct ath_softc *sc, struct ath_txq *txq,
|
|||||||
txq->axq_ampdu_depth--;
|
txq->axq_ampdu_depth--;
|
||||||
|
|
||||||
if (!bf_isampdu(bf)) {
|
if (!bf_isampdu(bf)) {
|
||||||
if (!flush)
|
if (!flush) {
|
||||||
|
info = IEEE80211_SKB_CB(bf->bf_mpdu);
|
||||||
|
memcpy(info->control.rates, bf->rates,
|
||||||
|
sizeof(info->control.rates));
|
||||||
ath_tx_rc_status(sc, bf, ts, 1, txok ? 0 : 1, txok);
|
ath_tx_rc_status(sc, bf, ts, 1, txok ? 0 : 1, txok);
|
||||||
|
}
|
||||||
ath_tx_complete_buf(sc, bf, txq, bf_head, ts, txok);
|
ath_tx_complete_buf(sc, bf, txq, bf_head, ts, txok);
|
||||||
} else
|
} else
|
||||||
ath_tx_complete_aggr(sc, txq, bf, bf_head, ts, txok);
|
ath_tx_complete_aggr(sc, txq, bf, bf_head, ts, txok);
|
||||||
@ -686,7 +691,7 @@ static u32 ath_lookup_rate(struct ath_softc *sc, struct ath_buf *bf,
|
|||||||
|
|
||||||
skb = bf->bf_mpdu;
|
skb = bf->bf_mpdu;
|
||||||
tx_info = IEEE80211_SKB_CB(skb);
|
tx_info = IEEE80211_SKB_CB(skb);
|
||||||
rates = tx_info->control.rates;
|
rates = bf->rates;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find the lowest frame length among the rate series that will have a
|
* Find the lowest frame length among the rate series that will have a
|
||||||
|
Loading…
Reference in New Issue
Block a user