wifi: ath12k: delete the timer rx_replenish_retry during rmmod
authorHari Chandrakanthan <quic_haric@quicinc.com>
Mon, 29 May 2023 10:13:58 +0000 (15:43 +0530)
committerKalle Valo <quic_kvalo@quicinc.com>
Fri, 9 Jun 2023 13:33:05 +0000 (16:33 +0300)
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>
Link: https://lore.kernel.org/r/1685355238-3282-1-git-send-email-quic_haric@quicinc.com
drivers/net/wireless/ath/ath12k/core.c

index 499b81cd938ea6ab680ff696e2edc5d9ac3f6db1..3df8059d55129b13e10b3898b7b5b52b533e9379 100644 (file)
@@ -886,6 +886,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);