diff mbox series

[v2,12/26,SRU,U/OEM-5.10] UBUNTU: SAUCE: HACK: ath11k: add delays to suspend and resume handlers

Message ID 20201204152521.197069-13-vicamo.yang@canonical.com
State New
Headers show
Series Support Killer 500s (QCA6390) WLAN/BT | expand

Commit Message

You-Sheng Yang Dec. 4, 2020, 3:25 p.m. UTC
From: Kalle Valo <kvalo@codeaurora.org>

BugLink: https://bugs.launchpad.net/bugs/1879633

Resume was failing most of the time when connected to an AP. Adding these
delays seem to solve that, which points that we have a some kind of race
condition in ath11k.

This is not the proper fix, only a temporary workaround.

Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
(cherry picked from commit a9ce8040a968bdbb5aad2d767298d390e2507b16
https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git)
Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com>
---
 drivers/net/wireless/ath/ath11k/pci.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath11k/pci.c b/drivers/net/wireless/ath/ath11k/pci.c
index 4f058ceaa0f1..044b09463873 100644
--- a/drivers/net/wireless/ath/ath11k/pci.c
+++ b/drivers/net/wireless/ath/ath11k/pci.c
@@ -1189,10 +1189,14 @@  static __maybe_unused int ath11k_pci_pm_suspend(struct device *dev)
 	struct ath11k_base *ab = dev_get_drvdata(dev);
 	int ret;
 
+	msleep(3000);
+
 	ret = ath11k_core_suspend(ab);
 	if (ret)
 		ath11k_warn(ab, "failed to suspend hif: %d\n", ret);
 
+	msleep(3000);
+
 	return ret;
 }
 
@@ -1201,10 +1205,14 @@  static __maybe_unused int ath11k_pci_pm_resume(struct device *dev)
 	struct ath11k_base *ab = dev_get_drvdata(dev);
 	int ret;
 
+	msleep(3000);
+
 	ret = ath11k_core_resume(ab);
 	if (ret)
 		ath11k_warn(ab, "failed to resume hif: %d\n", ret);
 
+	msleep(3000);
+
 	return ret;
 }