mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

Previously commit 166a490f59
("wifi: ath11k: support hibernation") was
reverted due to [1], so currently we only support WoWLAN mode suspend.
This works well in scenarios where WLAN power is sustained during suspend,
however breaks in those where power is cut off.
This change basically brings the reverted commit back, but differs in that
we decide based on the PM policy to choose WoWLAN mode suspend or the
non-WoWLAN mode. As stated in the previous patch for now the PM policy is
determined based on machine models. That said we will choose WoWLAN mode
suspend if we are running on machines listed in ath11k_pm_quirk_table,
otherwise we choose the other one.
[1] https://bugzilla.kernel.org/show_bug.cgi?id=219196
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.30
Tested-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Tested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
Link: https://patch.msgid.link/20250328-ath11k-bring-hibernation-back-v3-4-23405ae23431@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
31 lines
1,003 B
C
31 lines
1,003 B
C
/* SPDX-License-Identifier: BSD-3-Clause-Clear */
|
|
/*
|
|
* Copyright (c) 2020 The Linux Foundation. All rights reserved.
|
|
* Copyright (c) 2022, 2024-2025 Qualcomm Innovation Center, Inc. All rights reserved.
|
|
*/
|
|
#ifndef _ATH11K_MHI_H
|
|
#define _ATH11K_MHI_H
|
|
|
|
#include "pci.h"
|
|
|
|
#define PCIE_TXVECDB 0x360
|
|
#define PCIE_TXVECSTATUS 0x368
|
|
#define PCIE_RXVECDB 0x394
|
|
#define PCIE_RXVECSTATUS 0x39C
|
|
|
|
#define MHISTATUS 0x48
|
|
#define MHICTRL 0x38
|
|
#define MHICTRL_RESET_MASK 0x2
|
|
|
|
int ath11k_mhi_start(struct ath11k_pci *ar_pci);
|
|
void ath11k_mhi_stop(struct ath11k_pci *ar_pci, bool is_suspend);
|
|
int ath11k_mhi_register(struct ath11k_pci *ar_pci);
|
|
void ath11k_mhi_unregister(struct ath11k_pci *ar_pci);
|
|
void ath11k_mhi_set_mhictrl_reset(struct ath11k_base *ab);
|
|
void ath11k_mhi_clear_vector(struct ath11k_base *ab);
|
|
|
|
int ath11k_mhi_suspend(struct ath11k_pci *ar_pci);
|
|
int ath11k_mhi_resume(struct ath11k_pci *ar_pci);
|
|
void ath11k_mhi_coredump(struct mhi_controller *mhi_ctrl, bool in_panic);
|
|
|
|
#endif
|