diff mbox series

wifi: rtw89: delete timer and free skb queue when unloading

Message ID 20230615110519.61687-1-dmantipov@yandex.ru
State New
Headers show
Series wifi: rtw89: delete timer and free skb queue when unloading | expand

Commit Message

Dmitry Antipov June 15, 2023, 11:05 a.m. UTC
Delete TX purge timer and free C2H queue in 'rtw_core_deinit()'.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
 drivers/net/wireless/realtek/rtw88/main.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Kalle Valo June 15, 2023, 11:54 a.m. UTC | #1
Dmitry Antipov <dmantipov@yandex.ru> writes:

> Delete TX purge timer and free C2H queue in 'rtw_core_deinit()'.

The commit log should always answer to the question "Why?". Please
explain in the commit log why this is needed.
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
index 9447a3aae3b5..572fc126b9de 100644
--- a/drivers/net/wireless/realtek/rtw88/main.c
+++ b/drivers/net/wireless/realtek/rtw88/main.c
@@ -2180,9 +2180,11 @@  void rtw_core_deinit(struct rtw_dev *rtwdev)
 		release_firmware(wow_fw->firmware);
 
 	destroy_workqueue(rtwdev->tx_wq);
+	timer_delete_sync(&rtwdev->tx_report.purge_timer);
 	spin_lock_irqsave(&rtwdev->tx_report.q_lock, flags);
 	skb_queue_purge(&rtwdev->tx_report.queue);
 	skb_queue_purge(&rtwdev->coex.queue);
+	skb_queue_purge(&rtwdev->c2h_queue);
 	spin_unlock_irqrestore(&rtwdev->tx_report.q_lock, flags);
 
 	list_for_each_entry_safe(rsvd_pkt, tmp, &rtwdev->rsvd_page_list,