diff mbox

[LEDE-DEV,5/5] lantiq: DGN3500: use the MAC address from uboot env

Message ID 1467471640-22044-5-git-send-email-dev@kresin.me
State Changes Requested
Delegated to: John Crispin
Headers show

Commit Message

Mathias Kresin July 2, 2016, 3 p.m. UTC
Extract the base MAC address from the u-boot environment instead of
relying on a properly passed ethaddr kernel command-line parameter.

Signed-off-by: Mathias Kresin <dev@kresin.me>
---
 target/linux/lantiq/base-files/etc/board.d/02_network | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/target/linux/lantiq/base-files/etc/board.d/02_network b/target/linux/lantiq/base-files/etc/board.d/02_network
index 3bb4e6e..43ab17f 100755
--- a/target/linux/lantiq/base-files/etc/board.d/02_network
+++ b/target/linux/lantiq/base-files/etc/board.d/02_network
@@ -75,6 +75,8 @@  ARV4518PWR01*)
         ;;
 
 DGN3500*)
+	lan_mac=$(mtd_get_mac_ascii uboot-env ethaddr)
+	wan_mac=$(macaddr_add "$lan_mac" 1)
 	ucidef_add_switch "switch0" \
 		"3:lan:1" "2:lan:2" "1:lan:3" "0:lan:4" "5t@eth0"
 	;;