Skip to contentSkip to conversation

ath9k: Make sure to zero status.tx_time before reporting TX status

PATCH In review Toke Høiland-Jørgensen 2 participants 2 messages Feb 15, 2019 – Feb 26, 2019 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath9k: Make sure to zero status.tx_time before reporting TX status

Since ath9k reports airtime usage directly using the ieee80211_report_airtime() callback, it shouldn't also report it using the tx_time in status. Make sure the field is zeroed before TX status is reported to avoid spurious airtime being accounted by bits being left over from earlier uses of the cb.

Fixes 89cea7493a34 ("ath9k: Switch to mac80211 TXQ scheduling and airtime APIs")
---
 drivers/net/wireless/ath/ath9k/xmit.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/wireless/ath/ath9k/xmit.c +3 -0
index 06e0c5a6fab6..773d428ff1b0 100644
@@ -2552,6 +2552,9 @@ static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf,
 	}
 
 	tx_info->status.rates[tx_rateindex].count = ts->ts_longretry + 1;
+
+	/* we report airtime in ath_tx_count_airtime(), don't report twice */
+	tx_info->status.tx_time = 0;
 }
 
 static void ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq)
Signature · 1 line
2.20.1
#1 lore raw
Quoted 9 lines · Toke Høiland-Jørgensen

Since ath9k reports airtime usage directly using the ieee80211_report_airtime() callback, it shouldn't also report it using the tx_time in status. Make sure the field is zeroed before TX status is reported to avoid spurious airtime being accounted by bits being left over from earlier uses of the cb.

Fixes 89cea7493a34 ("ath9k: Switch to mac80211 TXQ scheduling and airtime APIs")

Patch applied to ath-next branch of ath.git, thanks.

cc591d77aba1 ath9k: Make sure to zero status.tx_time before reporting TX status

Signature · 3 lines
https://patchwork.kernel.org/patch/10815445/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches