Martin Kaistra <martin.kaistra@xxxxxxxxxxxxx> wrote: > 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@xxxxxxxxxxxxx> > Reviewed-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx> Patch applied to wireless-next.git, thanks. 94dd7ce1885e wifi: rtl8xxxu: update rate mask per sta -- https://patchwork.kernel.org/project/linux-wireless/patch/20240205093040.1941140-1-martin.kaistra@xxxxxxxxxxxxx/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches