From: Jo-Philipp Wich Date: Thu, 3 Dec 2015 17:30:56 +0000 (+0000) Subject: board.d: remove redundant ucidef_set_interfaces_lan_wan() calls X-Git-Tag: reboot~1338 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8f8b702f850a5f1c27fb2cfd74e5580a5f6cd7e8;p=oweals%2Fopenwrt.git board.d: remove redundant ucidef_set_interfaces_lan_wan() calls This removes calls to ucidef_set_interfaces_lan_wan() and ucidef_set_interfaces_lan() on boards where all relevant info can be inferred from the switch definition. Signed-off-by: Jo-Philipp Wich SVN-Revision: 47722 --- diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network b/target/linux/ar71xx/base-files/etc/board.d/02_network index b88b6bb046..b7d6a3e1b7 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -24,14 +24,12 @@ ubnt-unifi-outdoor) ap132 |\ wlr8100) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0@eth0" "2:lan" "3:lan" "4:lan" "5:lan" "1:wan" ;; esr1750 |\ epg5000) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" ;; @@ -68,13 +66,11 @@ bsb) ;; cpe510) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0@eth0" "5:lan" "4:wan" ;; airgatewaypro) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0@eth0" "4:lan" "5:wan" ;; @@ -85,8 +81,6 @@ rb-2011uas |\ rb-2011uias |\ rb-2011uas-2hnd|\ rb-2011uias-2hnd) - ucidef_set_interfaces_lan_wan "eth0.1 eth1" "eth0.2" - case "$board" in rb-2011uas* | rb-2011uias | rb-2011uias-2hnd) ucidef_add_switch "switch0" \ @@ -162,7 +156,6 @@ rb-750gl |\ rb-751g |\ rb-951g-2hnd |\ wzr-hp-g450h) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0@eth0" "2:lan" "3:lan" "4:lan" "5:lan" "1:wan" ;; @@ -182,7 +175,6 @@ rb-493g) wzr-hp-g300nh2 |\ pb92 |\ ap113) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0@eth0" "1:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "2:wan" ;; @@ -195,19 +187,16 @@ el-m150) tl-wdr4300|\ tl-wr1041n-v2) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" ;; tl-wr1043nd) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "5@eth0" ;; tl-wr2543n) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9@eth0" ;; @@ -238,13 +227,11 @@ wnr1000-v2) ;; uap-pro) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0@eth0" "1:lan" "2:wan" ;; nanostation-m-xw) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0@eth0" "5:lan" "1:wan" ;; @@ -264,7 +251,6 @@ wzr-hp-g300nh) dgl-5500-a1 |\ dir-825-c1) local mac - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" mac=$(mtd_get_mac_ascii nvram "wan_mac") @@ -273,7 +259,6 @@ dir-825-c1) mynet-n750) local mac - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" mac=$(mtd_get_mac_ascii devdata "wanmac") @@ -288,7 +273,6 @@ dhp-1565-a1 |\ dir-835-a1 |\ wndr3700v4 | \ wndr4300) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" mac_lan=$(mtd_get_mac_binary caldata 0) @@ -299,7 +283,6 @@ wndr4300) esr900) local mac - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" mac=$(mtd_get_mac_ascii u-boot-env "wanaddr") @@ -395,7 +378,6 @@ gl-ar300) ;; wpj344) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0@eth0" "3:lan" "2:wan" ;; @@ -405,7 +387,6 @@ wpj531) ;; wpj558) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "5:lan" "1:wan" "6@eth0" ;; @@ -449,13 +430,11 @@ wzr-hp-ag300h) ;; wzr-hp-g450h) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0@eth0" "2:lan:1 3:lan:2 4:lan:3 5:lan:4" "1:wan" ;; ew-dorin) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0@eth0" "1:lan" "2:lan" "3:wan" ;; diff --git a/target/linux/bcm53xx/base-files/etc/board.d/02_network b/target/linux/bcm53xx/base-files/etc/board.d/02_network index 5abb0610df..736cdac94a 100755 --- a/target/linux/bcm53xx/base-files/etc/board.d/02_network +++ b/target/linux/bcm53xx/base-files/etc/board.d/02_network @@ -28,7 +28,6 @@ netgear,r8000) esac ucidef_set_interface_loopback -ucidef_set_interfaces_lan_wan "$ifname.1" "$ifname.2" # Workaround for devices using CPU port 8 (connected to eth2) case "$board" in diff --git a/target/linux/mpc85xx/base-files/etc/board.d/02_network b/target/linux/mpc85xx/base-files/etc/board.d/02_network index 5aab17c0a2..f99ce4c20e 100755 --- a/target/linux/mpc85xx/base-files/etc/board.d/02_network +++ b/target/linux/mpc85xx/base-files/etc/board.d/02_network @@ -14,7 +14,6 @@ board=$(mpc85xx_board_name) case "$board" in tl-wdr4900-v1) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan" ;; diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 3cfb6bac66..f2c0edb576 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -86,12 +86,10 @@ ramips_setup_interfaces() y1|\ zbt-wg2626|\ youku-yk1) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" ;; a5-v11) - ucidef_set_interface_lan "eth0.1" ucidef_add_switch "switch0" \ "0:lan" "6t@eth0" ;; @@ -99,14 +97,12 @@ ramips_setup_interfaces() ar725w|\ rt-n15|\ wl-351) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "5@eth0" ;; asl26555|\ re6500|\ rp-n53) - ucidef_set_interface_lan "eth0.1" ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "6t@eth0" ;; @@ -123,12 +119,10 @@ ramips_setup_interfaces() wrtnode|\ wt3020|\ zbt-wa05) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0" ;; awapn2403) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0:lan" "1:wan" "6@eth0" ;; @@ -142,17 +136,14 @@ ramips_setup_interfaces() ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ;; br-6475nd) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9@eth0" ;; cf-wr800n) - ucidef_set_interface_lan "eth0.1" ucidef_add_switch "switch0" \ "4:lan" "6t@eth0" ;; cy-swr1100) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "9@eth0" ;; @@ -164,13 +155,11 @@ ramips_setup_interfaces() ;; e1700|\ mt7620a_mt7530) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch1" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" ;; hc5*61|\ y1s) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "5:lan" "0:wan" "6@eth0" ;; @@ -187,44 +176,36 @@ ramips_setup_interfaces() ;; mzk-dp150n|\ vocore) - ucidef_set_interface_lan "eth0.1" ucidef_add_switch "switch0" \ "0:lan" "4:lan" "6t@eth0" ;; rt-n56u) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "8@eth0" ;; tew-691gr|\ tew-692gr) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0" ;; v11st-fe|\ wzr-agl300nh) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "5@eth0" ;; wcr-150gn) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0:lan" "6t@eth0" ;; whr-1166d) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "5:wan" "6@eth0" ;; wizfi630a) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "1:lan" "2:lan" "0:wan" "6@eth0" ;; zbt-wr8305rt) - ucidef_set_interfaces_lan_wan "eth0.1" "eth0.2" ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" ;;