wifi: rtw88: iterate over vif/sta list non-atomically
authorSascha Hauer <s.hauer@pengutronix.de>
Fri, 2 Dec 2022 08:12:19 +0000 (09:12 +0100)
committerKalle Valo <kvalo@kernel.org>
Thu, 8 Dec 2022 14:48:41 +0000 (16:48 +0200)
commit78d5bf925f30bf9f79a69ce77386902672defe68
treef295e83e69f9be5d38d12624f9d7a6ecc0d4d77b
parent8647f7f0b9080bc2d2f6e02524782f2f02f159bc
wifi: rtw88: iterate over vif/sta list non-atomically

The driver uses ieee80211_iterate_active_interfaces_atomic()
and ieee80211_iterate_stations_atomic() in several places and does
register accesses in the iterators. This doesn't cope with upcoming
USB support as registers can only be accessed non-atomically.

Split these into a two stage process: First use the atomic iterator
functions to collect all active interfaces or stations on a list, then
iterate over the list non-atomically and call the iterator on each
entry.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Suggested-by: Ping-Ke shih <pkshih@realtek.com>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20221202081224.2779981-7-s.hauer@pengutronix.de
drivers/net/wireless/realtek/rtw88/phy.c
drivers/net/wireless/realtek/rtw88/ps.c
drivers/net/wireless/realtek/rtw88/util.c
drivers/net/wireless/realtek/rtw88/util.h