summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo@kernel.org>2019-04-13 16:01:28 +0200
committerFelix Fietkau <nbd@nbd.name>2019-05-01 13:04:00 +0200
commita4834814e1d3376e07c00ecf339f1c4b8818c8a2 (patch)
tree8bf53b724d90abf05ccb52f6f8700d587cedfaee /drivers
parente2c2fd0f698338222ba098f905e0a19279fcf2d8 (diff)
downloadlinux-a4834814e1d3376e07c00ecf339f1c4b8818c8a2.tar.bz2
mt76: mt7603: init mcu_restart function pointer
Use common function wrapper in mt7603_mcu_exit since the code is shared with mt7615 driver Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7603/mcu.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c
index c52ae301062c..7ebfcb021d40 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mcu.c
@@ -161,9 +161,9 @@ mt7603_mcu_start_firmware(struct mt7603_dev *dev, u32 addr)
}
static int
-mt7603_mcu_restart(struct mt7603_dev *dev)
+mt7603_mcu_restart(struct mt76_dev *dev)
{
- return __mt76_mcu_send_msg(&dev->mt76, -MCU_CMD_RESTART_DL_REQ,
+ return __mt76_mcu_send_msg(dev, -MCU_CMD_RESTART_DL_REQ,
NULL, 0, true);
}
@@ -269,6 +269,7 @@ int mt7603_mcu_init(struct mt7603_dev *dev)
{
static const struct mt76_mcu_ops mt7603_mcu_ops = {
.mcu_send_msg = mt7603_mcu_msg_send,
+ .mcu_restart = mt7603_mcu_restart,
};
dev->mt76.mcu_ops = &mt7603_mcu_ops;
@@ -277,7 +278,7 @@ int mt7603_mcu_init(struct mt7603_dev *dev)
void mt7603_mcu_exit(struct mt7603_dev *dev)
{
- mt7603_mcu_restart(dev);
+ __mt76_mcu_restart(&dev->mt76);
skb_queue_purge(&dev->mt76.mmio.mcu.res_q);
}