Toke Høiland-Jørgensen wrote: > 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@xxxxxxxxxx> > [rmanohar@xxxxxxxxxxxxxx: ported only the airtime computation] > Signed-off-by: Rajkumar Manoharan <rmanohar@xxxxxxxxxxxxxx> > [toke@xxxxxxxxxx: Rebase to mac80211-next, add test note] > Signed-off-by: Toke Høiland-Jørgensen <toke@xxxxxxxxxx> > Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxxxxxx> There was a trivial conflict, please check my resolution in the pending branch. I also reworded the commit log a bit. $ git am -s --reject 10775551.mbox Applying: ath10k: reporting estimated tx airtime for fairness Checking patch drivers/net/wireless/ath/ath10k/core.h... Checking patch drivers/net/wireless/ath/ath10k/htt_rx.c... Hunk #1 succeeded at 3080 (offset 2 lines). Checking patch drivers/net/wireless/ath/ath10k/mac.c... Hunk #1 succeeded at 3566 (offset 22 lines). Hunk #2 succeeded at 3583 (offset 22 lines). Hunk #3 succeeded at 3971 (offset 22 lines). Hunk #4 succeeded at 4029 (offset 22 lines). Hunk #5 succeeded at 4047 (offset 22 lines). Hunk #6 succeeded at 4315 (offset 22 lines). Hunk #7 succeeded at 8671 (offset 20 lines). Checking patch drivers/net/wireless/ath/ath10k/txrx.c... error: while searching for: wake_up(&htt->empty_tx_wq); spin_unlock_bh(&htt->tx_lock); if (ar->dev_type != ATH10K_DEV_TYPE_HL) dma_unmap_single(dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE); error: patch failed: drivers/net/wireless/ath/ath10k/txrx.c:95 Applied patch drivers/net/wireless/ath/ath10k/core.h cleanly. Applied patch drivers/net/wireless/ath/ath10k/htt_rx.c cleanly. Applied patch drivers/net/wireless/ath/ath10k/mac.c cleanly. Applying patch drivers/net/wireless/ath/ath10k/txrx.c with 1 reject... Rejected hunk #1. Patch failed at 0001 ath10k: reporting estimated tx airtime for fairness -- https://patchwork.kernel.org/patch/10775551/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches