Skip to content

Commit

Permalink
mpc85xx: set WS-AP3825i mac-address in preinit
Browse files Browse the repository at this point in the history
The bootloader does seem to not correctly patch in the MAC address for
eth0 / eth1 in some cases. While the root cause is not known, manually
applying the MAC-Address in preinit does not hurt.

Reported-by: Tom Herbers <freifunk@tomherbers.de>
Signed-off-by: David Bauer <mail@david-bauer.net>
  • Loading branch information
blocktrron committed Apr 25, 2022
1 parent 8b3c313 commit c6d5251
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions target/linux/mpc85xx/base-files/lib/preinit/10_fix_eth_mac.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
. /lib/functions.sh

preinit_set_mac_address() {
case $(board_name) in
extreme-networks,ws-ap3825i)
ip link set dev eth0 address $(mtd_get_mac_ascii cfg1 ethaddr)
ip link set dev eth1 address $(mtd_get_mac_ascii cfg1 eth1addr)
;;
esac
}

boot_hook_add preinit_main preinit_set_mac_address

0 comments on commit c6d5251

Please sign in to comment.