ath9k: Don't trust TX status TID number when reporting airtime
authorToke Høiland-Jørgensen <toke@redhat.com>
Thu, 7 Mar 2019 18:39:44 +0000 (19:39 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 29 Apr 2019 14:51:49 +0000 (17:51 +0300)
commit389b72e58259336c2d56d58b660b79cf4b9e0dcb
treeb88dae091781651b60b8695f1d3e53cb172a132a
parente643da21e19a62f928fb30f080470ea2e335b7f0
ath9k: Don't trust TX status TID number when reporting airtime

As already noted a comment in ath_tx_complete_aggr(), the hardware will
occasionally send a TX status with the wrong tid number. If we trust the
value, airtime usage will be reported to the wrong AC, which can cause the
deficit on that AC to become very low, blocking subsequent attempts to
transmit.

To fix this, account airtime usage to the TID number from the original skb,
instead of the one in the hardware TX status report.

Reported-by: Miguel Catalan Cid <miguel.catalan@i2cat.net>
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath9k/xmit.c