developer | fd40db2 | 2021-04-29 10:08:25 +0800 | [diff] [blame] | 1 | diff --git a/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network b/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network |
| 2 | index 3a409c8..4b19c0d 100755 |
| 3 | --- a/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network |
| 4 | +++ b/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network |
| 5 | @@ -29,9 +29,25 @@ mediatek_setup_interfaces() |
| 6 | mediatek_setup_macs() |
| 7 | { |
| 8 | local board="$1" |
| 9 | + local part_name="Factory" |
| 10 | + local lan_mac="" |
| 11 | + local wan_mac="" |
| 12 | + local lan_mac_offset="" |
| 13 | + local wan_mac_offset="" |
| 14 | |
| 15 | case $board in |
| 16 | + *) |
| 17 | + #512k - 12 byte |
| 18 | + lan_mac_offset="0x7FFF4" |
| 19 | + wan_mac_offset="0x7FFFA" |
| 20 | + ;; |
| 21 | esac |
| 22 | + |
| 23 | + lan_mac=$(mtd_get_mac_binary $part_name $lan_mac_offset) |
| 24 | + wan_mac=$(mtd_get_mac_binary $part_name $wan_mac_offset) |
| 25 | + |
| 26 | + [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" "$lan_mac" |
| 27 | + [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" "$wan_mac" |
| 28 | } |
| 29 | |
| 30 | board_config_update |