wifi: mt76: mt7921: fix CLC command timeout when suspend/resume

[ Upstream commit d0a2bc5fe7 ]

When enter suspend/resume while in a connected state, the upper layer
will trigger disconnection before entering suspend, and at the same time,
it will trigger regd_notifier() and update CLC, causing the CLC event to
not be received due to suspend, resulting in a command timeout.

Therefore, the update of CLC is postponed until resume, to ensure data
consistency and avoid the occurrence of command timeout.

Fixes: 4fc8df50fd ("wifi: mt76: mt7921: get regulatory information from the clc event")
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Ming Yen Hsieh 2023-11-22 11:06:45 +08:00 • committed by Greg Kroah-Hartman
commit 33af3fb9fc
3 changed files with 22 additions and 5 deletions