mt76: mt7915: rely on mt76_connac_mcu_start_firmware

Rely on mt76_connac_mcu_start_firmware and remove duplicated code.

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Lorenzo Bianconi 2021-12-24 11:58:05 +01:00 committed by Felix Fietkau
parent 8f4fa0f337
commit 3dc531b92b

View File

@ -1941,21 +1941,6 @@ int mt7915_mcu_add_beacon(struct ieee80211_hw *hw,
MCU_EXT_CMD(BSS_INFO_UPDATE), true);
}
static int mt7915_mcu_start_firmware(struct mt7915_dev *dev, u32 addr,
u32 option)
{
struct {
__le32 option;
__le32 addr;
} req = {
.option = cpu_to_le32(option),
.addr = cpu_to_le32(addr),
};
return mt76_mcu_send_msg(&dev->mt76, MCU_CMD(FW_START_REQ), &req,
sizeof(req), true);
}
static int mt7915_mcu_restart(struct mt76_dev *dev)
{
struct {
@ -2175,7 +2160,7 @@ mt7915_mcu_send_ram_firmware(struct mt7915_dev *dev,
if (is_wa)
option |= FW_START_WORKING_PDA_CR4;
return mt7915_mcu_start_firmware(dev, override, option);
return mt76_connac_mcu_start_firmware(&dev->mt76, override, option);
}
static int mt7915_load_ram(struct mt7915_dev *dev)