mt76: mt7663: fix a race between mt7615_mcu_drv_pmctrl and mt7615_mcu_fw_pmctrl
authorLorenzo Bianconi <lorenzo@kernel.org>
Sun, 18 Apr 2021 16:45:28 +0000 (18:45 +0200)
committerFelix Fietkau <nbd@nbd.name>
Wed, 21 Apr 2021 18:55:52 +0000 (20:55 +0200)
commit7cd740f0e499d9bfd672ff1f3f6512503141abbe
tree07cd3dca5edace2f3be00b15deb2c7d20716162d
parentfad90e43eac0434108af18e326e179d1b5153135
mt76: mt7663: fix a race between mt7615_mcu_drv_pmctrl and mt7615_mcu_fw_pmctrl

Introduce a mutex in order to avoid a race between mt7615_mcu_lp_drv_pmctrl and
mt7615_mcu_fw_pmctrl routines since they are run two independent works

Fixes: 1f549009b5b2 ("mt76: mt7615: do not request {driver,fw}_own if already granted")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7615/init.c
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c