Skip to content
Commit 86f15d04 authored by Sean Wang's avatar Sean Wang Committed by Felix Fietkau
Browse files

wifi: mt76: mt7921u: fix race issue between reset and suspend/resume

It is unexpected that the reset work is running simultaneously with
the suspend or resume context and it is possible that reset work is still
running even after mt7921 is suspended if we don't fix the race issue.

Thus, the suspend procedure should be waiting until the reset is completed
at the beginning and ignore the subsequent the reset requests.

In case there is an error that happens during either suspend or resume
handler, we will schedule a reset task to recover the error before
returning the error code to ensure we can immediately fix the error there.

Fixes: df3e4143

 ("mt76: mt7921u: add suspend/resume support")
Co-developed-by: default avatarYN Chen <YN.Chen@mediatek.com>
Signed-off-by: default avatarYN Chen <YN.Chen@mediatek.com>
Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent e86f10e6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment