aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Huang <cjhuang@codeaurora.org>2020-07-22 09:37:30 +0300
committerKalle Valo <kvalo@codeaurora.org>2020-08-13 16:21:30 +0300
commit74a9b3a69c58202a65ffd8e3557a5c593549c656 (patch)
tree27b11f083e54a059da0878318a0426b525fa6916
parent91a14cac4c3b74032608bc071cd561b629b2d861 (diff)
HACK: ath11k: fix ath11k_pci rmmod crash
For QCA6390, it needs to free_irq and then disable_msi. Otherwise, crash happened. Also free other resources during ath11k_pci_remove. Fixed the typo in ath11k_debug_pdev_destroy and ath11k_debug_soc_destroy. Tested-on: QCA6390 WLAN.HST.1.0.1-01230-QCAHSTSWPLZ_V2_TO_X86-1 Signed-off-by: Carl Huang <cjhuang@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r--drivers/net/wireless/ath/ath11k/debug.c8
-rw-r--r--drivers/net/wireless/ath/ath11k/pci.c9
2 files changed, 12 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath11k/debug.c b/drivers/net/wireless/ath/ath11k/debug.c
index 0a3cfa716390..2ac0df8aee26 100644
--- a/drivers/net/wireless/ath/ath11k/debug.c
+++ b/drivers/net/wireless/ath/ath11k/debug.c
@@ -952,8 +952,8 @@ int ath11k_debug_pdev_create(struct ath11k_base *ab)
void ath11k_debug_pdev_destroy(struct ath11k_base *ab)
{
- debugfs_remove_recursive(ab->debugfs_ath11k);
- ab->debugfs_ath11k = NULL;
+ debugfs_remove_recursive(ab->debugfs_soc);
+ ab->debugfs_soc = NULL;
}
int ath11k_debug_soc_create(struct ath11k_base *ab)
@@ -971,8 +971,8 @@ int ath11k_debug_soc_create(struct ath11k_base *ab)
void ath11k_debug_soc_destroy(struct ath11k_base *ab)
{
- debugfs_remove_recursive(ab->debugfs_soc);
- ab->debugfs_soc = NULL;
+ debugfs_remove_recursive(ab->debugfs_ath11k);
+ ab->debugfs_ath11k = NULL;
}
void ath11k_debug_fw_stats_init(struct ath11k *ar)
diff --git a/drivers/net/wireless/ath/ath11k/pci.c b/drivers/net/wireless/ath/ath11k/pci.c
index feed90f216cb..7af23abaed6d 100644
--- a/drivers/net/wireless/ath/ath11k/pci.c
+++ b/drivers/net/wireless/ath/ath11k/pci.c
@@ -1136,10 +1136,17 @@ static void ath11k_pci_remove(struct pci_dev *pdev)
struct ath11k_pci *ab_pci = ath11k_pci_priv(ab);
set_bit(ATH11K_FLAG_UNREGISTERING, &ab->dev_flags);
+
+ ath11k_core_deinit(ab);
+
ath11k_mhi_unregister(ab_pci);
+
+ ath11k_pci_free_irq(ab);
ath11k_pci_disable_msi(ab_pci);
ath11k_pci_free_region(ab_pci);
- ath11k_pci_free_irq(ab);
+
+ ath11k_hal_srng_deinit(ab);
+ ath11k_ce_free_pipes(ab);
ath11k_core_free(ab);
}