@@ -574,9 +574,7 @@ static void __fw_recovery_work(struct rtw_dev *rtwdev)
WARN(1, "firmware crash, start reset and recover\n");
- rcu_read_lock();
- rtw_iterate_keys_rcu(rtwdev, NULL, rtw_reset_key_iter, rtwdev);
- rcu_read_unlock();
+ rtw_iterate_keys(rtwdev, NULL, rtw_reset_key_iter, rtwdev);
rtw_iterate_stas(rtwdev, rtw_reset_sta_iter, rtwdev);
rtw_iterate_vifs(rtwdev, rtw_reset_vif_iter, rtwdev);
rtw_enter_ips(rtwdev);
@@ -19,8 +19,6 @@ struct rtw_dev;
ieee80211_iterate_stations_atomic(rtwdev->hw, iterator, data)
#define rtw_iterate_keys(rtwdev, vif, iterator, data) \
ieee80211_iter_keys(rtwdev->hw, vif, iterator, data)
-#define rtw_iterate_keys_rcu(rtwdev, vif, iterator, data) \
- ieee80211_iter_keys_rcu((rtwdev)->hw, vif, iterator, data)
static inline u8 *get_hdr_bssid(struct ieee80211_hdr *hdr)
{
Upcoming SDIO support may sleep in the read/write handlers. The only occurrence of rtw_iterate_keys_rcu() reads and writes registers from it's iterator function. Replace it with rtw_iterate_keys() (the non-RCU version). This will prevent an "scheduling while atomic" issue when using an SDIO device. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> --- drivers/net/wireless/realtek/rtw88/main.c | 4 +--- drivers/net/wireless/realtek/rtw88/util.h | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-)