diff --git a/drivers/net/wireless/ath/ath12k/core.c b/drivers/net/wireless/ath/ath12k/core.c index 4ed608ba3c304..e86dcc6ddbb86 100644 --- a/drivers/net/wireless/ath/ath12k/core.c +++ b/drivers/net/wireless/ath/ath12k/core.c @@ -1770,6 +1770,8 @@ static int ath12k_core_panic_handler(struct notifier_block *nb, struct ath12k_base *ab = container_of(nb, struct ath12k_base, panic_nb); + set_bit(ATH12K_FLAG_PANIC_PROCESSING, &ab->dev_flags); + return ath12k_hif_panic_handler(ab); } diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h index 990934ec92fca..490c8a20028fa 100644 --- a/drivers/net/wireless/ath/ath12k/core.h +++ b/drivers/net/wireless/ath/ath12k/core.h @@ -279,6 +279,7 @@ enum ath12k_dev_flags { ATH12K_FLAG_QMI_FW_READY_COMPLETE, ATH12K_FLAG_FTM_SEGMENTED, ATH12K_FLAG_FIXED_MEM_REGION, + ATH12K_FLAG_PANIC_PROCESSING, }; struct ath12k_tx_conf { diff --git a/drivers/net/wireless/ath/ath12k/pci.c b/drivers/net/wireless/ath/ath12k/pci.c index 375277ca2b892..9efc9396c90b7 100644 --- a/drivers/net/wireless/ath/ath12k/pci.c +++ b/drivers/net/wireless/ath/ath12k/pci.c @@ -1157,7 +1157,8 @@ u32 ath12k_pci_read32(struct ath12k_base *ab, u32 offset) * need to wakeup MHI to access. */ if (test_bit(ATH12K_PCI_FLAG_INIT_DONE, &ab_pci->flags) && - offset >= ACCESS_ALWAYS_OFF && ab_pci->pci_ops->wakeup) + offset >= ACCESS_ALWAYS_OFF && ab_pci->pci_ops->wakeup && + !test_bit(ATH12K_FLAG_PANIC_PROCESSING, &ab->dev_flags)) ret = ab_pci->pci_ops->wakeup(ab); if (offset < WINDOW_START) { @@ -1205,7 +1206,8 @@ void ath12k_pci_write32(struct ath12k_base *ab, u32 offset, u32 value) * need to wakeup MHI to access. */ if (test_bit(ATH12K_PCI_FLAG_INIT_DONE, &ab_pci->flags) && - offset >= ACCESS_ALWAYS_OFF && ab_pci->pci_ops->wakeup) + offset >= ACCESS_ALWAYS_OFF && ab_pci->pci_ops->wakeup && + !test_bit(ATH12K_FLAG_PANIC_PROCESSING, &ab->dev_flags)) ret = ab_pci->pci_ops->wakeup(ab); if (offset < WINDOW_START) {