wifi: mt76: mt7915: avoid mcu_restart function pointer
authorLorenzo Bianconi <lorenzo@kernel.org>
Sun, 1 Jan 2023 11:53:18 +0000 (12:53 +0100)
committerFelix Fietkau <nbd@nbd.name>
Fri, 3 Feb 2023 13:47:16 +0000 (14:47 +0100)
Run mt76_connac_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/mt7915/mcu.c

index 640c7cf59b9e11ae80e995b1189a5e2907774e32..f6e92de764cebdef021d0d3da0c5424fa08953d3 100644 (file)
@@ -2117,7 +2117,7 @@ static int mt7915_load_firmware(struct mt7915_dev *dev)
        /* make sure fw is download state */
        if (mt7915_firmware_state(dev, false)) {
                /* restart firmware once */
-               __mt76_mcu_restart(&dev->mt76);
+               mt76_connac_mcu_restart(&dev->mt76);
                ret = mt7915_firmware_state(dev, false);
                if (ret) {
                        dev_err(dev->mt76.dev,
@@ -2349,7 +2349,6 @@ int mt7915_mcu_init(struct mt7915_dev *dev)
                .headroom = sizeof(struct mt76_connac2_mcu_txd),
                .mcu_skb_send_msg = mt7915_mcu_send_message,
                .mcu_parse_response = mt7915_mcu_parse_response,
-               .mcu_restart = mt76_connac_mcu_restart,
        };
 
        dev->mt76.mcu_ops = &mt7915_mcu_ops;
@@ -2359,7 +2358,7 @@ int mt7915_mcu_init(struct mt7915_dev *dev)
 
 void mt7915_mcu_exit(struct mt7915_dev *dev)
 {
-       __mt76_mcu_restart(&dev->mt76);
+       mt76_connac_mcu_restart(&dev->mt76);
        if (mt7915_firmware_state(dev, false)) {
                dev_err(dev->mt76.dev, "Failed to exit mcu\n");
                goto out;