Message ID | 20230815142908.92257-1-dmantipov@yandex.ru |
---|---|
State | New |
Headers | show |
Series | wifi: rtw88: add missing call to cancel_work_sync() | expand |
> -----Original Message----- > From: Dmitry Antipov <dmantipov@yandex.ru> > Sent: Tuesday, August 15, 2023 10:28 PM > To: Ping-Ke Shih <pkshih@realtek.com> > Cc: Kalle Valo <kvalo@kernel.org>; linux-wireless@vger.kernel.org; Dmitry Antipov <dmantipov@yandex.ru> > Subject: [PATCH] wifi: rtw88: add missing call to cancel_work_sync() > > Add missing call to 'cancel_work_sync()' in 'rtw_core_stop()'. > > Fixes: 5c831644e1f4 ("rtw88: handle and recover when firmware crash") > Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> rtwdev->fw_recovery_work is used to restart hardware when firmware reports things get abnormal. The calling flow will be fw_ recovery_work() -> ... -> rtw_enter_ips() -> rtw_core_stop() -> cancel_work_sync(&rtwdev->fw_recovery_work) /* wait for self to finish */ It would be safe to add this cancel_work_sync(&rtwdev->fw_recovery_work) in rtw_core_deinit()? So, NACK. Ping-Ke
diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c index 4a33d2e47f33..3a63dfc81d06 100644 --- a/drivers/net/wireless/realtek/rtw88/main.c +++ b/drivers/net/wireless/realtek/rtw88/main.c @@ -1522,6 +1522,7 @@ void rtw_core_stop(struct rtw_dev *rtwdev) mutex_unlock(&rtwdev->mutex); cancel_work_sync(&rtwdev->c2h_work); + cancel_work_sync(&rtwdev->fw_recovery_work); cancel_work_sync(&rtwdev->update_beacon_work); cancel_delayed_work_sync(&rtwdev->watch_dog_work); cancel_delayed_work_sync(&coex->bt_relink_work);
Add missing call to 'cancel_work_sync()' in 'rtw_core_stop()'. Fixes: 5c831644e1f4 ("rtw88: handle and recover when firmware crash") Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> --- drivers/net/wireless/realtek/rtw88/main.c | 1 + 1 file changed, 1 insertion(+)