]> git.baikalelectronics.ru Git - kernel.git/commit
ath10k: fix core PCI suspend when WoWLAN is supported but disabled
authorBrian Norris <briannorris@chromium.org>
Wed, 4 Oct 2017 09:22:55 +0000 (12:22 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 13 Oct 2017 11:37:03 +0000 (14:37 +0300)
commit49056923f4153b05fd54672ac6b270e787456f71
treeac449bc21b32532f35a27bb48b6eb7bc67d60718
parent955853adb76c37575b001b427b52d35b09fd3183
ath10k: fix core PCI suspend when WoWLAN is supported but disabled

For devices where the FW supports WoWLAN but user-space has not
configured it, we don't do any PCI-specific suspend/resume operations,
because mac80211 doesn't call drv_suspend() when !wowlan. This has
particularly bad effects for some platforms, because we don't stop the
power-save timer, and if this timer goes off after the PCI controller
has suspended the link, Bad Things will happen.

Commit 9acca3eb5cbc ("ath10k: add the PCI PM core suspend/resume ops")
got some of this right, in that it understood there was a problem on
non-WoWLAN firmware. But it forgot the $subject case.

Fix this by moving all the PCI driver suspend/resume logic exclusively
into the driver PM hooks. This shouldn't affect WoWLAN support much
(this just gets executed later on).

I would just as well kill the entirety of ath10k_hif_suspend(), as it's
not even implemented on the USB or SDIO drivers. I expect that we don't
need the callback, except to return "supported" (i.e., 0) or "not
supported" (i.e., -EOPNOTSUPP).

Fixes: 9acca3eb5cbc ("ath10k: add the PCI PM core suspend/resume ops")
Fixes: 723fde4b29c5 ("ath10k: enable pci soc powersaving")
Signed-off-by: Brian Norris <briannorris@chromium.org>
Cc: Ryan Hsu <ryanhsu@qti.qualcomm.com>
Cc: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/pci.c