mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-23 04:12:31 +00:00
89 lines
2.8 KiB
Diff
89 lines
2.8 KiB
Diff
From 2b4e9b201abb859e8bf6717ce206d51efccf91e3 Mon Sep 17 00:00:00 2001
|
|
From: Aishwarya R <quic_aisr@quicinc.com>
|
|
Date: Tue, 28 Mar 2023 18:53:40 +0530
|
|
Subject: [PATCH] ath12k: Fixed reboot assert issue when MLO enabled
|
|
|
|
Facing firware assert issue as pci shutdown not
|
|
happening properly. ath12k_hif_power_down is responsible
|
|
for sending mhi_power_off state to firmware by this
|
|
it's power off one chip while the core does not stop
|
|
for other parallel running chips. calling core_deinit
|
|
during shutdown to fix this issue
|
|
|
|
Signed-off-by: Aishwarya R <quic_aisr@quicinc.com>
|
|
---
|
|
drivers/net/wireless/ath/ath12k/pci.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/net/wireless/ath/ath12k/pci.c
|
|
+++ b/drivers/net/wireless/ath/ath12k/pci.c
|
|
@@ -1434,7 +1434,9 @@ static void ath12k_pci_shutdown(struct p
|
|
{
|
|
struct ath12k_base *ab = pci_get_drvdata(pdev);
|
|
|
|
- ath12k_pci_power_down(ab);
|
|
+ set_bit(ATH12K_FLAG_UNREGISTERING, &ab->ag->dev_flags);
|
|
+ cancel_work_sync(&ab->reset_work);
|
|
+ ath12k_core_deinit(ab);
|
|
}
|
|
|
|
static __maybe_unused int ath12k_pci_pm_suspend(struct device *dev)
|
|
--- a/drivers/net/wireless/ath/ath12k/core.c
|
|
+++ b/drivers/net/wireless/ath/ath12k/core.c
|
|
@@ -807,8 +807,6 @@ err_qmi_deinit:
|
|
|
|
static void ath12k_core_soc_destroy(struct ath12k_base *ab)
|
|
{
|
|
- ath12k_dp_free(ab);
|
|
- ath12k_reg_free(ab);
|
|
ath12k_qmi_deinit_service(ab);
|
|
}
|
|
|
|
@@ -1509,6 +1507,7 @@ int ath12k_core_qmi_firmware_ready(struc
|
|
goto err_dp_free;
|
|
}
|
|
|
|
+ set_bit(ATH12K_FLAG_CORE_REGISTERED, &ab->dev_flags);
|
|
mutex_unlock(&ab->core_lock);
|
|
|
|
if (ath12k_core_hw_group_start_ready(ag)) {
|
|
@@ -1537,6 +1536,7 @@ int ath12k_core_qmi_firmware_ready(struc
|
|
err_core_stop:
|
|
mutex_lock(&ab->core_lock);
|
|
ath12k_core_stop(ab);
|
|
+ clear_bit(ATH12K_FLAG_CORE_REGISTERED, &ab->dev_flags);
|
|
err_dp_free:
|
|
ath12k_dp_free(ab);
|
|
mutex_unlock(&ab->core_lock);
|
|
@@ -2116,6 +2116,8 @@ static void ath12k_core_hw_group_destroy
|
|
mutex_lock(&ab->core_lock);
|
|
if (test_bit(ATH12K_FLAG_HW_GROUP_ATTACHED, &ab->dev_flags)) {
|
|
clear_bit(ATH12K_FLAG_HW_GROUP_ATTACHED, &ab->dev_flags);
|
|
+ ath12k_reg_free(ab);
|
|
+ ath12k_dp_free(ab);
|
|
ath12k_core_soc_destroy(ab);
|
|
}
|
|
mutex_unlock(&ab->core_lock);
|
|
@@ -2158,6 +2160,7 @@ static void ath12k_core_hw_group_stop(st
|
|
ath12k_hif_irq_disable(ab);
|
|
ath12k_core_pdev_destroy(ab);
|
|
ath12k_core_stop(ab);
|
|
+ clear_bit(ATH12K_FLAG_CORE_REGISTERED, &ab->dev_flags);
|
|
|
|
mutex_unlock(&ab->core_lock);
|
|
}
|
|
@@ -2208,7 +2211,12 @@ void ath12k_core_deinit(struct ath12k_ba
|
|
mutex_lock(&ab->core_lock);
|
|
|
|
clear_bit(ATH12K_FLAG_HW_GROUP_ATTACHED, &ab->dev_flags);
|
|
- ath12k_core_stop(ab);
|
|
+ if (test_bit(ATH12K_FLAG_CORE_REGISTERED, &ab->dev_flags)) {
|
|
+ ath12k_core_stop(ab);
|
|
+ ath12k_reg_free(ab);
|
|
+ ath12k_dp_free(ab);
|
|
+ clear_bit(ATH12K_FLAG_CORE_REGISTERED, &ab->dev_flags);
|
|
+ }
|
|
ath12k_hif_power_down(ab);
|
|
ath12k_core_soc_destroy(ab);
|
|
|