1e04c974fe33456b519ae80108024255c06a8ca7
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / ath11k / 0009-wifi-ath11k-Send-PME-message-during-wakeup-from-D3co.patch
1 From 3f9b09ccf7d5f23066b02881a737bee42def9d1a Mon Sep 17 00:00:00 2001
2 From: Baochen Qiang <quic_bqiang@quicinc.com>
3 Date: Mon, 10 Oct 2022 11:32:37 +0800
4 Subject: [PATCH 9/9] wifi: ath11k: Send PME message during wakeup from D3cold
5
6 We are seeing system stuck on some specific platforms due to
7 WLAN chip fails to wakeup from D3cold state.
8
9 With this flag, firmware will send PME message during wakeup
10 and this issue is gone.
11
12 Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
13
14 Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
15 Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
16 Link: https://lore.kernel.org/r/20221010033237.415478-1-quic_bqiang@quicinc.com
17 ---
18 drivers/net/wireless/ath/ath11k/qmi.c | 3 +++
19 1 file changed, 3 insertions(+)
20
21 --- a/drivers/net/wireless/ath/ath11k/qmi.c
22 +++ b/drivers/net/wireless/ath/ath11k/qmi.c
23 @@ -19,6 +19,7 @@
24 #define SLEEP_CLOCK_SELECT_INTERNAL_BIT 0x02
25 #define HOST_CSTATE_BIT 0x04
26 #define PLATFORM_CAP_PCIE_GLOBAL_RESET 0x08
27 +#define PLATFORM_CAP_PCIE_PME_D3COLD 0x10
28
29 #define FW_BUILD_ID_MASK "QC_IMAGE_VERSION_STRING="
30
31 @@ -1752,6 +1753,8 @@ static int ath11k_qmi_host_cap_send(stru
32 if (ab->hw_params.global_reset)
33 req.nm_modem |= PLATFORM_CAP_PCIE_GLOBAL_RESET;
34
35 + req.nm_modem |= PLATFORM_CAP_PCIE_PME_D3COLD;
36 +
37 ath11k_dbg(ab, ATH11K_DBG_QMI, "qmi host cap request\n");
38
39 ret = qmi_txn_init(&ab->qmi.handle, &txn,