]> git.baikalelectronics.ru Git - kernel.git/commit
ath9k: switch to rate table based lookup
authorJonas Jelonek <jelonek.jonas@gmail.com>
Sun, 28 Nov 2021 09:07:53 +0000 (10:07 +0100)
committerKalle Valo <quic_kvalo@quicinc.com>
Tue, 7 Dec 2021 15:16:16 +0000 (17:16 +0200)
commit5120d91e6af5f54d763889c25ee87019175eecf8
treec6a99b144bf53da9a57974f352dec143916d823f
parentcae147596575886a84d3b051725147b1b43a4cdf
ath9k: switch to rate table based lookup

This patch changes mac80211 rate control for the ath9k driver.  The rate lookup
per packet is changed from legacy usage of ieee80211_get_tx_rates() to the new
rate table based lookup in struct ieee80211_sta->rates.

The most recent rate control API, introduced with commit 9cdf5d1dbb89
("mac80211: improve the rate control API"), allows drivers to directly get
rates from ieee80211_sta->rates. This is not used by every driver yet, the
translation/merge is currently performed in ieee80211_get_tx_rates.  This patch
changes the behaviour and avoids the call to ieee80211_get_tx_rates and
subsequent calls. ath9k now directly reads rates from sta->rates into its rate
table. Cause ath9k does not expect rate selection in SKB->CB, the table merge
does not consider rate array in SKB->CB except for the first entry (used for
probing).

Tested with a 8devices Rambutan with QCA9558 SoC by performing two runs, one
without the patch and one with. Generated traffic between AP and multiple STAs
in each run, measured throughput and captured rc_stats.  Comparison of both
runs resulted in same rate selection and no performance loss or other negative
effects.

Co-developed-by: Thomas Huehn <thomas.huehn@hs-nordhausen.de>
Signed-off-by: Thomas Huehn <thomas.huehn@hs-nordhausen.de>
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20211128090753.958-1-jelonek.jonas@gmail.com
drivers/net/wireless/ath/ath9k/xmit.c