;;
duzun,dm06|\
netgear,r6120|\
- rakwireless,rak633|\
- tplink,archer-c20-v4|\
- tplink,archer-c50-v3|\
- tplink,archer-c50-v4|\
- tplink,tl-mr3420-v5|\
- tplink,tl-wr840n-v4|\
- tplink,tl-wr840n-v5|\
- tplink,tl-wr841n-v13|\
- tplink,tl-wr841n-v14|\
- tplink,tl-wr842n-v5|\
- unielec,u7628-01-16m|\
- wavlink,wl-wn570ha1|\
- wavlink,wl-wn575a3|\
- wiznet,wizfi630s|\
wrtnode,wrtnode2p|\
wrtnode,wrtnode2r|\
- xiaomi,mir4a-100m|\
- xiaomi,miwifi-nano|\
- zbtlink,zbt-we1226|\
zyxel,keenetic-extra-ii)
- wan_mac=$(macaddr_add "$(cat /sys/class/net/eth0/address)" 1)
+ wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1)
;;
hilink,hlk-7628n)
lan_mac=$(macaddr_setbit_la "$(cat /sys/class/net/eth0/address)")
mercury,mac1200r-v2)
wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory_info 0xd)" 1)
;;
+ rakwireless,rak633|\
+ unielec,u7628-01-16m|\
+ wavlink,wl-wn575a3|\
+ wiznet,wizfi630s|\
+ xiaomi,miwifi-nano)
+ wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x28)" 1)
+ ;;
skylab,skw92a|\
totolink,lr1200)
wan_mac=$(mtd_get_mac_binary factory 0x2e)
;;
+ tplink,archer-c20-v4|\
+ tplink,archer-c50-v3|\
+ tplink,tl-mr3420-v5|\
+ tplink,tl-wr840n-v4|\
+ tplink,tl-wr840n-v5|\
+ tplink,tl-wr841n-v13|\
+ tplink,tl-wr841n-v14|\
+ tplink,tl-wr842n-v5)
+ wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0xf100)" 1)
+ ;;
+ tplink,archer-c50-v4)
+ wan_mac=$(macaddr_add "$(mtd_get_mac_binary rom 0xf100)" 1)
+ ;;
vocore,vocore2|\
vocore,vocore2-lite)
label_mac=$(mtd_get_mac_binary factory 0x8)
;;
+ wavlink,wl-wn570ha1|\
+ zbtlink,zbt-we1226)
+ wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x2e)" 1)
+ ;;
+ xiaomi,mir4a-100m)
+ wan_mac=$(mtd_get_mac_binary factory 0x4)
+ ;;
esac
[ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac