mediatek: switch to nvmem mac binding for openembed som7981

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2024-10-09 13:31:45 +08:00
parent d125e12f60
commit 5de2e1222d
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
3 changed files with 8 additions and 4 deletions

View File

@ -2,7 +2,8 @@ set_preinit_iface() {
case $(board_name) in
cudy,m3000-v1|\
cudy,tr3000-v1|\
glinet,gl-mt3000)
glinet,gl-mt3000|\
openembed,som7981)
ip link set eth1 up
ifname=eth1
;;

View File

@ -284,6 +284,12 @@
nvmem-cells = <&eeprom_factory_0>;
nvmem-cell-names = "eeprom";
status = "okay";
band@1 {
reg = <1>;
nvmem-cells = <&macaddr_factory_a 0>;
nvmem-cell-names = "mac-address";
};
};
&xhci {

View File

@ -117,9 +117,6 @@ case "$board" in
[ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 3 > /sys${DEVPATH}/macaddress
;;
openembed,som7981)
[ "$PHYNBR" = "1" ] && cat /sys/class/net/eth0/address > /sys${DEVPATH}/macaddress
;;
qihoo,360t7)
addr=$(mtd_get_mac_ascii factory lanMac)
[ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress