mediatek: fix eeprom loading (Mercusys MR90X v1)
authorMikhail Zhilkin <csharper2005@gmail.com>
Sat, 30 Sep 2023 14:07:15 +0000 (14:07 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 2 Oct 2023 10:40:27 +0000 (11:40 +0100)
Commit mt76: drop default eeprom file for mt7986-firmware
(e3aa645b267ca4f08773b5366583e9b0020fc3e9) breaks eeprom loading for
Mercusys MR90X v1. As a result WiFi is not working at all.

This commit adds Mercusus MR90x to the caldata script (it works after the
commit mentioned above). And we can safely drop "81_fix_eeprom" script
as it's no longer required.

Fixes: e3aa645b267ca4f08773b5366583e9b0020fc3e9
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata
target/linux/mediatek/filogic/base-files/lib/preinit/81_fix_eeprom [deleted file]

index e4d33879c6d14d0a0c04fc88c562f066c6c6180b..bc1dcb0008c25e227cf91bf25c96eafbf42732fc 100644 (file)
@@ -21,6 +21,14 @@ case "$FIRMWARE" in
                ;;
        esac
        ;;
+"mediatek/mt7986_eeprom_mt7975_dual.bin")
+       case "$board" in
+       mercusys,mr90x-v1)
+               ln -sf /tmp/tp_data/MT7986_EEPROM.bin \
+                       /lib/firmware/$FIRMWARE
+               ;;
+       esac
+       ;;
 "mediatek/mt7986_eeprom_mt7976.bin")
        case "$board" in
        acer,predator-w6)
diff --git a/target/linux/mediatek/filogic/base-files/lib/preinit/81_fix_eeprom b/target/linux/mediatek/filogic/base-files/lib/preinit/81_fix_eeprom
deleted file mode 100644 (file)
index 0a842fa..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-. /lib/functions/system.sh
-
-preinit_fix_eeprom() {
-       case $(board_name) in
-       mercusys,mr90x-v1)
-               eeprom="/lib/firmware/mediatek/mt7986_eeprom_mt7975_dual.bin"
-               oem="/tmp/tp_data/MT7986_EEPROM.bin"
-               [ ! -L $eeprom -a -e $oem ] && \
-                       mv -f $eeprom $eeprom.bak && ln -s $oem $eeprom
-               ;;
-       *)
-               ;;
-       esac
-}
-
-boot_hook_add preinit_main preinit_fix_eeprom