[source] lantiq: board.d: set lan mac address only where necessary

LEDE Commits lede-commits at lists.infradead.org
Wed Aug 10 02:16:43 PDT 2016


blogic pushed a commit to source.git, branch master:
https://git.lede-project.org/?p=source.git;a=commitdiff;h=0b327c1652c880ae228f87ab803967104153c67b

commit 0b327c1652c880ae228f87ab803967104153c67b
Author: Mathias Kresin <dev at kresin.me>
AuthorDate: Tue Aug 2 22:27:16 2016 +0200

    lantiq: board.d: set lan mac address only where necessary
    
    Do not set the lan mac address for boards which having the lan mac
    address already set in device tree source file.
    
    Signed-off-by: Mathias Kresin <dev at kresin.me>
---
 .../linux/lantiq/base-files/etc/board.d/02_network | 24 ++++++++--------------
 1 file changed, 8 insertions(+), 16 deletions(-)

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 989dbf3..cda2d2d 100755
--- a/target/linux/lantiq/base-files/etc/board.d/02_network
+++ b/target/linux/lantiq/base-files/etc/board.d/02_network
@@ -47,16 +47,14 @@ ARV4519PW|ARV7510PW22|ARV7518PW|ARV752DPW22|ARV8539PW22)
 
 # rtl8306g
 ARV7506PW11)
-	lan_mac=$(mtd_get_mac_binary board_config 22)
-	wan_mac=$(macaddr_add "$lan_mac" 2)
+	wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 22)" 2)
 	ucidef_add_switch "switch0" \
 		"4:lan:1" "3:lan:2" "2:lan:3" "1:lan:4" "5t at eth0"
 	;;
 
 # rtl8306g
 ARV7519PW)
-	lan_mac=$(mtd_get_mac_binary board_config 22)
-	wan_mac=$(macaddr_add "$lan_mac" 1)
+	wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 22)" 1)
 	ucidef_add_switch "switch0" \
 		"0:lan:1" "1:lan:2" "2:lan:3" "3:lan:4" "4t at eth0"
 	;;
@@ -103,22 +101,19 @@ P2812HNUF*)
 	;;
 
 TDW8970|TDW8980)
-	lan_mac=$(mtd_get_mac_binary boardconfig 61696)
-	wan_mac=$(macaddr_add "$lan_mac" 1)
+	wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 61696)" 1)
 	ucidef_add_switch "switch0" \
 		"0:lan:1" "2:lan:2" "4:lan:3" "5:lan:4" "6t at eth0"
 	;;
 
 VR200v)
-	lan_mac=$(mtd_get_mac_binary romfile 61696)
-	wan_mac=$(macaddr_add "$lan_mac" 1)
+	wan_mac=$(macaddr_add "$(mtd_get_mac_binary romfile 61696)" 1)
 	ucidef_add_switch "switch0" \
 		"0:lan:1" "2:lan:2" "4:lan:3" "5:lan:4" "6t at eth0"
 	;;
 
 ARV7519RW22)
-	lan_mac=$(mtd_get_mac_binary boardconfig 22)
-	wan_mac=$(macaddr_add "$lan_mac" 1)
+	wan_mac=$(macaddr_add "$(mtd_get_mac_binary boardconfig 22)" 1)
 	ucidef_add_switch "switch0" \
 		"0:lan:1" "2:lan:2" "3:lan:3" "4:lan:4" "5:lan:5" "6t at eth0"
 	;;
@@ -130,22 +125,19 @@ BTHOMEHUBV2B|BTHOMEHUBV3A)
 	;;
 
 BTHOMEHUBV5A)
-	lan_mac=$(mtd_get_mac_binary caldata 4364)
-	wan_mac=$(macaddr_add "$lan_mac" 1)
+	wan_mac=$(macaddr_add "$(mtd_get_mac_binary caldata 4364)" 1)
 	ucidef_add_switch "switch0" \
 		"0:lan:1" "1:lan:2" "2:lan:3" "4:lan:4" "6t at eth0"
 	;;
 
 VGV7519)
-	lan_mac=$(mtd_get_mac_binary board_config 22)
-	wan_mac=$(macaddr_add "$lan_mac" 1)
+	wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 22)" 1)
 	ucidef_add_switch "switch0" \
 		"4:lan:1" "2:lan:2" "1:lan:3" "0:lan:4" "6t at eth0"
 	;;
 
 VGV7510KW22)
-	lan_mac=$(mtd_get_mac_binary board_config 22)
-	wan_mac=$(macaddr_add "$lan_mac" 1)
+	wan_mac=$(macaddr_add "$(mtd_get_mac_binary board_config 22)" 1)
 	ucidef_add_switch "switch0" \
 		"2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "6t at eth0"
 	;;



More information about the lede-commits mailing list