diff mbox series

[1/5] wifi: ath11k: rearrange IRQ enable/disable in reset path

Message ID 20240221024725.10057-2-quic_bqiang@quicinc.com (mailing list archive)
State Accepted
Commit d455e805de706e8c1ce945a0202028c8d764b9bc
Delegated to: Kalle Valo
Headers show
Series wifi: ath11k: prepare for hibernation support | expand

Commit Message

Baochen Qiang Feb. 21, 2024, 2:47 a.m. UTC
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>
---
 drivers/net/wireless/ath/ath11k/core.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Jeff Johnson Feb. 21, 2024, 5:13 p.m. UTC | #1
On 2/20/2024 6:47 PM, Baochen Qiang wrote:
> 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>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Kalle Valo Feb. 23, 2024, 3:52 p.m. UTC | #2
Baochen Qiang <quic_bqiang@quicinc.com> wrote:

> 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>

5 patches applied to ath-next branch of ath.git, thanks.

d455e805de70 wifi: ath11k: rearrange IRQ enable/disable in reset path
fbb2a14afe00 wifi: ath11k: remove MHI LOOPBACK channels
5f3288a34878 wifi: ath11k: do not dump SRNG statistics during resume
361c90ed3647 wifi: ath11k: fix warning on DMA ring capabilities event
50556081e09b wifi: ath11k: thermal: don't try to register multiple times
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index 922e67f8e04f..c78bce19bd75 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -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);