diff mbox series

wifi: ath12k: delete the timer rx_replenish_retry during rmmod

Message ID 1685355238-3282-1-git-send-email-quic_haric@quicinc.com
State New
Headers show
Series wifi: ath12k: delete the timer rx_replenish_retry during rmmod | expand

Commit Message

Hari Chandrakanthan May 29, 2023, 10:13 a.m. UTC
The rx_replenish_retry timer is initialized in ath12k_core_alloc() when
ath12k module is loaded.
But rx_replenish_retry timer is not deleted anywhere in the code.
It is supposed to be deleted when ath12k module is removed/unloaded.

Delete the timer rx_replenish_retry in ath12k_core_free().

Found during code review.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0-02903-QCAHKSWPL_SILICONZ-1

Signed-off-by: Hari Chandrakanthan <quic_haric@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/core.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Kalle Valo June 9, 2023, 1:33 p.m. UTC | #1
Hari Chandrakanthan <quic_haric@quicinc.com> wrote:

> The rx_replenish_retry timer is initialized in ath12k_core_alloc() when ath12k
> module is loaded.  But rx_replenish_retry timer is not deleted anywhere in the
> code.  It is supposed to be deleted when ath12k module is removed/unloaded.
> 
> Delete the timer rx_replenish_retry in ath12k_core_free().
> 
> Found during code review.
> 
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0-02903-QCAHKSWPL_SILICONZ-1
> 
> Signed-off-by: Hari Chandrakanthan <quic_haric@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>

Patch applied to ath-next branch of ath.git, thanks.

e2d1f005d3fb wifi: ath12k: delete the timer rx_replenish_retry during rmmod
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c
index a89e666..d992380 100644
--- a/drivers/net/wireless/ath/ath12k/core.c
+++ b/drivers/net/wireless/ath/ath12k/core.c
@@ -885,6 +885,7 @@  void ath12k_core_deinit(struct ath12k_base *ab)
 
 void ath12k_core_free(struct ath12k_base *ab)
 {
+	timer_delete_sync(&ab->rx_replenish_retry);
 	destroy_workqueue(ab->workqueue_aux);
 	destroy_workqueue(ab->workqueue);
 	kfree(ab);