Skip to content

Commit

Permalink
net: ethernet: mtk_eth_soc: use WO firmware for MT7981
Browse files Browse the repository at this point in the history
In order to support wireless offloading on MT7981 we need to load the
appropriate firmware. Recognize MT7981 and load mt7981_wo.bin.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Daniel Golle authored and David S. Miller committed Apr 22, 2023
1 parent cf88231 commit 86ce0d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/net/ethernet/mediatek/mtk_wed_mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,11 @@ mtk_wed_mcu_load_firmware(struct mtk_wed_wo *wo)
wo->hw->index + 1);

/* load firmware */
fw_name = wo->hw->index ? MT7986_FIRMWARE_WO1 : MT7986_FIRMWARE_WO0;
if (of_device_is_compatible(wo->hw->node, "mediatek,mt7981-wed"))
fw_name = MT7981_FIRMWARE_WO;
else
fw_name = wo->hw->index ? MT7986_FIRMWARE_WO1 : MT7986_FIRMWARE_WO0;

ret = request_firmware(&fw, fw_name, wo->hw->dev);
if (ret)
return ret;
Expand Down Expand Up @@ -386,5 +390,6 @@ int mtk_wed_mcu_init(struct mtk_wed_wo *wo)
100, MTK_FW_DL_TIMEOUT);
}

MODULE_FIRMWARE(MT7981_FIRMWARE_WO);
MODULE_FIRMWARE(MT7986_FIRMWARE_WO0);
MODULE_FIRMWARE(MT7986_FIRMWARE_WO1);
1 change: 1 addition & 0 deletions drivers/net/ethernet/mediatek/mtk_wed_wo.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ enum mtk_wed_dummy_cr_idx {
MTK_WED_DUMMY_CR_WO_STATUS,
};

#define MT7981_FIRMWARE_WO "mediatek/mt7981_wo.bin"
#define MT7986_FIRMWARE_WO0 "mediatek/mt7986_wo_0.bin"
#define MT7986_FIRMWARE_WO1 "mediatek/mt7986_wo_1.bin"

Expand Down

0 comments on commit 86ce0d0

Please sign in to comment.