]> asedeno.scripts.mit.edu Git - linux.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)
commita6e56d749f1b4c89f24d8cb008385d648fa52582
tree18e2a67a0ee8377fe66b20db497cc4759b733475
parent1235a3b66cbfe4262b52137115056829c1760120
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: 63fefa050477 ("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