OSDN Git Service

mwifiex: Add quirk to disable deep sleep with certain hardware revision
authorJonas Dreßler <verdre@v0yd.nl>
Wed, 3 Nov 2021 20:17:59 +0000 (21:17 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 26 Nov 2021 16:29:38 +0000 (18:29 +0200)
commit939b571a3b62b64cf407fa5dbc3941bc87e0ba3b
treee68b8833183ee59173fbe1d7e2dc8894e90ad252
parent2d1d7091ddac4cbeeac9e62ffcf2d29897334e3e
mwifiex: Add quirk to disable deep sleep with certain hardware revision

The 88W8897 PCIe+USB card in the hardware revision 20 apparently has a
hardware issue where the card wakes up from deep sleep randomly and very
often, somewhat depending on the card activity, maybe the hardware has a
floating wakeup pin or something. This was found by comparing two MS
Surface Book 2 devices, where one devices wifi card experienced spurious
wakeups, while the other one didn't.

Those continuous wakeups prevent the card from entering host sleep when
the computer suspends. And because the host won't answer to events from
the card anymore while it's suspended, the firmwares internal power
saving state machine seems to get confused and the card can't sleep
anymore at all after that.

Since we can't work around that hardware bug in the firmware, let's
get the hardware revision string from the firmware and match it with
known bad revisions. Then disable auto deep sleep for those revisions,
which makes sure we no longer get those spurious wakeups.

Signed-off-by: Jonas Dreßler <verdre@v0yd.nl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211103201800.13531-3-verdre@v0yd.nl
drivers/net/wireless/marvell/mwifiex/main.c
drivers/net/wireless/marvell/mwifiex/main.h
drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c