diff options
author | David Bauer <mail@david-bauer.net> | 2022-04-25 01:00:49 +0200 |
---|---|---|
committer | David Bauer <mail@david-bauer.net> | 2022-04-26 01:04:30 +0200 |
commit | 3579ee63bccc74f0d9b8761a7da091e5ecc9cf86 (patch) | |
tree | edd08c02facc0d7d4b25c5f125f186d9a109a095 /target/linux | |
parent | 084053ddf77837f404f37c0d146be62ecc12b825 (diff) | |
download | upstream-3579ee63bccc74f0d9b8761a7da091e5ecc9cf86.tar.gz upstream-3579ee63bccc74f0d9b8761a7da091e5ecc9cf86.tar.bz2 upstream-3579ee63bccc74f0d9b8761a7da091e5ecc9cf86.zip |
mpc85xx: set WS-AP3825i mac-address in preinit
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>
(cherry picked from commit c6d52515e009d96e0afbe77310bf172f113d0eef)
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/mpc85xx/base-files/lib/preinit/10_fix_eth_mac.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/target/linux/mpc85xx/base-files/lib/preinit/10_fix_eth_mac.sh b/target/linux/mpc85xx/base-files/lib/preinit/10_fix_eth_mac.sh new file mode 100644 index 0000000000..d94eba688c --- /dev/null +++ b/target/linux/mpc85xx/base-files/lib/preinit/10_fix_eth_mac.sh @@ -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 |