0
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-11-26 06:56:14 +00:00
openwrt/target/linux/mediatek/filogic/base-files/etc/hotplug.d/firmware/11-mt76-caldata
Daniel Golle dbc2923cbe mediatek: filogic: convert Acer Predator W6 to use NVMEM framework
Read WiFi calibration data via NVMEM framework. The MAC addresses are
stored inside a file on a filesystem and hence still have to be
extracted in userspace.

WiFI EEPROM extraction has already accidentally been partially removed
by commit 3e6de5d77a ("mediatek: use NVMEM framework on all Adtran
devices").

Fixes: 3e6de5d77a ("mediatek: use NVMEM framework on all Adtran devices")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-18 12:38:21 +01:00

30 lines
464 B
Bash

#!/bin/sh
[ -e /lib/firmware/$FIRMWARE ] && exit 0
. /lib/functions/caldata.sh
board=$(board_name)
case "$FIRMWARE" in
"mediatek/mt7981_eeprom_mt7976_dbdc.bin")
case "$board" in
ubnt,unifi-6-plus)
caldata_extract_mmc "factory" 0x0 0x1000
;;
esac
;;
"mediatek/mt7986_eeprom_mt7975_dual.bin")
case "$board" in
mercusys,mr90x-v1|\
tplink,re6000xd)
ln -sf /tmp/tp_data/MT7986_EEPROM.bin \
/lib/firmware/$FIRMWARE
;;
esac
;;
*)
exit 1
;;
esac