diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2021-04-18 18:45:27 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-04-21 20:55:52 +0200 |
commit | fad90e43eac0434108af18e326e179d1b5153135 (patch) | |
tree | 4d9a97b5a66084efea4996eecbd12e5f66d37e49 /drivers/net/wireless/mediatek/mt76/mt76_connac.h | |
parent | mt76: mt7921: remove leftover function declaration (diff) | |
download | linux-fad90e43eac0434108af18e326e179d1b5153135.tar.xz linux-fad90e43eac0434108af18e326e179d1b5153135.zip |
mt76: mt7921: fix a race between mt7921_mcu_drv_pmctrl and mt7921_mcu_fw_pmctrl
Introduce a mutex in order to avoid a race between mt7921_mcu_drv_pmctrl and
mt7921_mcu_fw_pmctrl routines since they are run two independent works
Fixes: 1d8efc741df8 ("mt76: mt7921: introduce Runtime PM support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt76_connac.h')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt76_connac.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac.h b/drivers/net/wireless/mediatek/mt76/mt76_connac.h index b811f3c410a1..2b31c9794e92 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76_connac.h +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac.h @@ -54,6 +54,7 @@ struct mt76_connac_pm { struct work_struct wake_work; struct completion wake_cmpl; + struct mutex mutex; struct delayed_work ps_work; unsigned long last_activity; |