wifi: mt76: mt7921: fix CLC command timeout when suspend/resume
authorMing Yen Hsieh <mingyen.hsieh@mediatek.com>
Wed, 22 Nov 2023 03:06:45 +0000 (11:06 +0800)
committerFelix Fietkau <nbd@nbd.name>
Mon, 11 Dec 2023 12:11:53 +0000 (13:11 +0100)
commitd0a2bc5fe712217d2c73822ae75fd4e69a15cb2c
tree787ae47c7f1a083e825d05ccbf658a4b68d4c339
parentfa6ad88e023ddfa6c5dcdb466d159e89f451e305
wifi: mt76: mt7921: fix CLC command timeout when suspend/resume

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: 4fc8df50fd41 ("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>
drivers/net/wireless/mediatek/mt76/mt7921/init.c
drivers/net/wireless/mediatek/mt76/mt7921/mt7921.h
drivers/net/wireless/mediatek/mt76/mt7921/pci.c