OSDN Git Service

wifi: mt76: mt7615: avoid mcu_restart function pointer
authorLorenzo Bianconi <lorenzo@kernel.org>
Sun, 1 Jan 2023 11:53:20 +0000 (12:53 +0100)
committerFelix Fietkau <nbd@nbd.name>
Fri, 3 Feb 2023 13:47:16 +0000 (14:47 +0100)
Run mt7615_mcu_restart routine directly and avoid mcu_restart function
pointer whenever it is possible.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
drivers/net/wireless/mediatek/mt76/mt7615/sdio_mcu.c
drivers/net/wireless/mediatek/mt76/mt7615/usb_mcu.c

index 83f3030..eea398c 100644 (file)
@@ -1692,7 +1692,6 @@ int mt7615_mcu_init(struct mt7615_dev *dev)
                .headroom = sizeof(struct mt7615_mcu_txd),
                .mcu_skb_send_msg = mt7615_mcu_send_message,
                .mcu_parse_response = mt7615_mcu_parse_response,
-               .mcu_restart = mt7615_mcu_restart,
        };
        int ret;
 
@@ -1732,7 +1731,7 @@ EXPORT_SYMBOL_GPL(mt7615_mcu_init);
 
 void mt7615_mcu_exit(struct mt7615_dev *dev)
 {
-       __mt76_mcu_restart(&dev->mt76);
+       mt7615_mcu_restart(&dev->mt76);
        mt7615_mcu_set_fw_ctrl(dev);
        skb_queue_purge(&dev->mt76.mcu.res_q);
 }
index dc9a2f0..b009420 100644 (file)
@@ -137,7 +137,6 @@ int mt7663s_mcu_init(struct mt7615_dev *dev)
                .tailroom = MT_USB_TAIL_SIZE,
                .mcu_skb_send_msg = mt7663s_mcu_send_message,
                .mcu_parse_response = mt7615_mcu_parse_response,
-               .mcu_restart = mt7615_mcu_restart,
                .mcu_rr = mt76_connac_mcu_reg_rr,
                .mcu_wr = mt76_connac_mcu_reg_wr,
        };
index 98bf2f6..a8b1a0f 100644 (file)
@@ -69,7 +69,6 @@ int mt7663u_mcu_init(struct mt7615_dev *dev)
                .tailroom = MT_USB_TAIL_SIZE,
                .mcu_skb_send_msg = mt7663u_mcu_send_message,
                .mcu_parse_response = mt7615_mcu_parse_response,
-               .mcu_restart = mt7615_mcu_restart,
        };
        int ret;