]> git.baikalelectronics.ru Git - kernel.git/commit
ath9k: clean up and fix ath_tx_count_airtime
authorFelix Fietkau <nbd@nbd.name>
Sun, 12 Feb 2017 13:29:31 +0000 (14:29 +0100)
committerKalle Valo <kvalo@qca.qualcomm.com>
Tue, 14 Feb 2017 17:58:33 +0000 (19:58 +0200)
commit0838cb6cf787d00fd60a960484e0add99496f756
tree18e2a67a0ee8377fe66b20db497cc4759b733475
parent9b21db27d168fce53442a79b40d9e13e050d3bd1
ath9k: clean up and fix ath_tx_count_airtime

ath_tx_count_airtime is doing a lot of unnecessary work:

- Redundant station lookup
- Redundant rcu_read_lock/unlock
- Useless memcpy of bf->rates
- Useless NULL check of bf->bf_mpdu
- Redundant lookup of the skb tid

Additionally, it tries to look up the mac80211 queue index from the txq,
which fails if the frame was delivered via the power save queue.

This patch fixes all of these issues by passing down the right set of
pointers instead of doing extra work

Cc: stable@vger.kernel.org
Fixes: a353d00e4f1f ("ath9k: Introduce airtime fairness scheduling between stations")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath9k/xmit.c