> -----Original Message----- > From: Martin Kaistra <martin.kaistra@xxxxxxxxxxxxx> > Sent: Monday, February 5, 2024 5:31 PM > To: linux-wireless@xxxxxxxxxxxxxxx > Cc: Jes Sorensen <Jes.Sorensen@xxxxxxxxx>; Kalle Valo <kvalo@xxxxxxxxxx>; Ping-Ke Shih > <pkshih@xxxxxxxxxxx>; Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx>; Sebastian Andrzej Siewior > <bigeasy@xxxxxxxxxxxxx> > Subject: [PATCH v3] 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@xxxxxxxxxxxxx> Reviewed-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>