[OpenWrt-Devel] [PATCH] ipq40xx: remove redundant ucidef_set_interfaces_* in 02_network

Adrian Schmutzler freifunk at adrianschmutzler.de
Mon Sep 23 09:34:17 EDT 2019


If already included in ucidef_add_switch, you do not have to
additionally set the interface mode in ucidef_set_interfaces_*
functions.

This patch removes/adjusts such redundant cases.

Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>

---

This is not tested on the affected devices.

However, the same approach is taken for other targets, and
network setup is essentially device-independent concerning the
changes done here.
---
 target/linux/ipq40xx/base-files/etc/board.d/02_network | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network
index e5ba7260f3..b7631a301c 100755
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -24,14 +24,14 @@ ipq40xx_setup_interfaces()
 		;;
 	asus,rt-ac58u|\
 	zyxel,nbg6617)
-		ucidef_set_interfaces_lan_wan "eth0" "eth1"
+		ucidef_set_interface_wan "eth1"
 		ucidef_add_switch "switch0" \
 			"0u at eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
 		;;
 	avm,fritzbox-4040|\
 	linksys,ea6350v3|\
 	linksys,ea8300)
-		ucidef_set_interfaces_lan_wan "eth0" "eth1"
+		ucidef_set_interface_wan "eth1"
 		ucidef_add_switch "switch0" \
 			"0u at eth0" "1:lan" "2:lan" "3:lan" "4:lan"
 		;;
@@ -51,13 +51,12 @@ ipq40xx_setup_interfaces()
 		ucidef_set_interface_lan "eth0"
 		;;
 	glinet,gl-b1300)
-		ucidef_set_interfaces_lan_wan "eth0" "eth1"
+		ucidef_set_interface_wan "eth1"
 		ucidef_add_switch "switch0" \
 			"0u at eth0" "3:lan" "4:lan"
 		;;
 	qxwlan,e2600ac-c1 |\
 	qxwlan,e2600ac-c2)
-		ucidef_set_interfaces_lan_wan "eth0" "eth1"
 		ucidef_add_switch "switch0" \
 			"0u at eth0" "3:lan" "4:lan" "0u at eth1" "5:wan"
 		;;
-- 
2.20.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list