wifi: ath11k: rearrange IRQ enable/disable in reset path
authorBaochen Qiang <quic_bqiang@quicinc.com>
Fri, 23 Feb 2024 15:20:32 +0000 (17:20 +0200)
committerKalle Valo <quic_kvalo@quicinc.com>
Fri, 23 Feb 2024 15:52:07 +0000 (17:52 +0200)
For non WoW suspend/resume, ath11k host powers down whole hardware
when suspend and powers up it when resume, the code path it goes
through is very like the ath11k reset logic.

In order to reuse that logic, rearrange IRQ handling in the reset
path.

Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30

Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
Link: https://msgid.link/20240221024725.10057-2-quic_bqiang@quicinc.com
drivers/net/wireless/ath/ath11k/core.c

index 922e67f8e04ff67efedee4704518f5cb682c95f2..c78bce19bd754293399c318c20beb794718504f6 100644 (file)
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: BSD-3-Clause-Clear
 /*
  * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include <linux/module.h>
@@ -1869,10 +1869,9 @@ static int ath11k_core_reconfigure_on_crash(struct ath11k_base *ab)
 
        mutex_lock(&ab->core_lock);
        ath11k_thermal_unregister(ab);
-       ath11k_hif_irq_disable(ab);
        ath11k_dp_pdev_free(ab);
        ath11k_spectral_deinit(ab);
-       ath11k_hif_stop(ab);
+       ath11k_ce_cleanup_pipes(ab);
        ath11k_wmi_detach(ab);
        ath11k_dp_pdev_reo_cleanup(ab);
        mutex_unlock(&ab->core_lock);
@@ -2127,6 +2126,9 @@ static void ath11k_core_reset(struct work_struct *work)
        time_left = wait_for_completion_timeout(&ab->recovery_start,
                                                ATH11K_RECOVER_START_TIMEOUT_HZ);
 
+       ath11k_hif_irq_disable(ab);
+       ath11k_hif_ce_irq_disable(ab);
+
        ath11k_hif_power_down(ab);
        ath11k_hif_power_up(ab);