mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-03 09:20:14 -05:00
ath9k: fix duration calculation for non-aggregated packets
When not aggregating packets, fi->framelen should be passed in as length to calculate the duration. Before the tx path rework, ath_tx_fill_desc was called for either one aggregate, or one single frame, with the length of the packet or the aggregate as a parameter. After the rework, ath_tx_sched_aggr can pass a burst of single frames to ath_tx_fill_desc and sets len=0. Fix broken duration calculation by overriding the length in ath_tx_fill_desc before passing it to ath_buf_set_rate. Cc: [email protected] Reported-by: Simon Wunderlich <[email protected]> Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: John W. Linville <[email protected]>
This commit is contained in:
parent
a59b40b30f
commit
bbf807bc06
1 changed files with 4 additions and 0 deletions
|
|
@ -1276,6 +1276,10 @@ static void ath_tx_fill_desc(struct ath_softc *sc, struct ath_buf *bf,
|
|||
if (!rts_thresh || (len > rts_thresh))
|
||||
rts = true;
|
||||
}
|
||||
|
||||
if (!aggr)
|
||||
len = fi->framelen;
|
||||
|
||||
ath_buf_set_rate(sc, bf, &info, len, rts);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue