ath10k: report estimated frame transmit airtime to improve fairness
authorKan Yan <kyan@google.com>
Mon, 11 Feb 2019 16:47:52 +0000 (18:47 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 12 Feb 2019 18:44:58 +0000 (20:44 +0200)
commitd1ce37b7831ac6445c60f34b680f7214359e87ab
treed5a2f779c5aa31cb731c8cdbccb6be89fa40adda
parentbb2edb733586527b8d0957d92f786daecb07e80b
ath10k: report estimated frame transmit airtime to improve fairness

The airtime of a transmitted frame will be estimated from last used tx rate
which the firmware reports with the peer stats feature
(WMI_SERVICE_PEER_STATS). The airtime is computed on the tx path and it
will be reported to mac80211 upon tx completion.

This change is based on Kan's orginal commit in Chromium tree
("CHROMIUM: ath10k: Implementing airtime fairness based TX scheduler")
ref: https://chromium-review.googlesource.com/588190

Tested on QCA4019 with firmware version 10.4-3.2.1.1-00015
Tested on QCA9984 with firmware version 10.4-3.9.0.1-00005

Signed-off-by: Kan Yan <kyan@google.com>
[rmanohar@codeaurora.org: ported only the airtime computation]
Signed-off-by: Rajkumar Manoharan <rmanohar@codeaurora.org>
[toke@redhat.com: Rebase to mac80211-next, add test note]
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath10k/core.h
drivers/net/wireless/ath/ath10k/htt_rx.c
drivers/net/wireless/ath/ath10k/mac.c
drivers/net/wireless/ath/ath10k/txrx.c