Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 93170516 authored by Felix Fietkau's avatar Felix Fietkau Committed by John W. Linville
Browse files

ath9k: fix ASPM initialization on resume



ath_pci_aspm_init is only called on card init, so PCI registers get reset
after a suspend/resume cycle.

Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 6825a26c
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -324,6 +324,9 @@ static int ath_pci_suspend(struct device *device)
static int ath_pci_resume(struct device *device)
static int ath_pci_resume(struct device *device)
{
{
	struct pci_dev *pdev = to_pci_dev(device);
	struct pci_dev *pdev = to_pci_dev(device);
	struct ieee80211_hw *hw = pci_get_drvdata(pdev);
	struct ath_softc *sc = hw->priv;
	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
	u32 val;
	u32 val;


	/*
	/*
@@ -335,6 +338,8 @@ static int ath_pci_resume(struct device *device)
	if ((val & 0x0000ff00) != 0)
	if ((val & 0x0000ff00) != 0)
		pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
		pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);


	ath_pci_aspm_init(common);

	return 0;
	return 0;
}
}