]> www.infradead.org Git - nvme.git/commit
wifi: rtl8xxxu: update rate mask per sta
authorMartin Kaistra <martin.kaistra@linutronix.de>
Mon, 5 Feb 2024 09:30:40 +0000 (10:30 +0100)
committerKalle Valo <kvalo@kernel.org>
Tue, 6 Feb 2024 18:07:56 +0000 (20:07 +0200)
commit94dd7ce1885e530a7b10bbe50d5d68ba1bb99e6e
treeb7677902ee288d8048b59246243d7728859ca2b1
parent06b5b2942cf2b0878bd5bda2d35ffdb997874012
wifi: rtl8xxxu: update rate mask per sta

Until now, rtl8xxxu_watchdog_callback() only fetches RSSI and updates
the rate mask in station mode. This means, in AP mode only the default
rate mask is used.

In order to have the rate mask reflect the actual connection quality,
extend rtl8xxxu_watchdog_callback() to iterate over every sta. Like in
the rtw88 driver, add a function to collect all currently present stas
and then iterate over a list of copies to ensure no RCU lock problems
for register access via USB. Remove the existing RCU lock in
rtl8xxxu_refresh_rate_mask().

Since the currently used ieee80211_ave_rssi() is only for 'vif', add
driver-level tracking of RSSI per sta.

Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20240205093040.1941140-1-martin.kaistra@linutronix.de
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c