[RFC/RFT,3/4] ath10k: Pass last TX bitrate up to mac80211
diff mbox series

Message ID 156889576758.191202.2981673914345691512.stgit@alrua-x1
State RFC
Delegated to: Kalle Valo
Headers show
Series
  • Add Airtime Queue Limits (AQL) to mac80211
Related show

Commit Message

Toke Høiland-Jørgensen Sept. 19, 2019, 12:22 p.m. UTC
From: Toke Høiland-Jørgensen <toke@redhat.com>

Use the newly added API to pass the last_tx_bitrate up to mac80211. The
multiplication is because ath10k keeps it internally as units of 100kbps,
whereas for mac80211 we just use kbps as the variable unit.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
---
 drivers/net/wireless/ath/ath10k/htt_rx.c |    1 +
 1 file changed, 1 insertion(+)

Patch
diff mbox series

diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
index 83a7fb68fd24..0617341eb70c 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -3454,6 +3454,7 @@  ath10k_update_per_peer_tx_stats(struct ath10k *ar,
 	arsta->txrate.nss = txrate.nss;
 	arsta->txrate.bw = ath10k_bw_to_mac80211_bw(txrate.bw);
 	arsta->last_tx_bitrate = cfg80211_calculate_bitrate(&arsta->txrate);
+	ieee80211_sta_set_last_tx_bitrate(sta, arsta->last_tx_bitrate * 100);
 	if (sgi)
 		arsta->txrate.flags |= RATE_INFO_FLAGS_SHORT_GI;