[openwrt/openwrt] ipq40xx: enable FRITZRepeater 3000 ports on switch

LEDE Commits lede-commits at lists.infradead.org
Thu Sep 17 12:11:36 EDT 2020


blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/056945faa4dd611298979767978f4bb2a52cabc0

commit 056945faa4dd611298979767978f4bb2a52cabc0
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Tue Sep 15 11:19:14 2020 +0200

    ipq40xx: enable FRITZRepeater 3000 ports on switch
    
    The ethernet ports on the AVM FRITZRepeater 3000 are not separated
    between LAN and WAN in the stock firmware. OpenWrt currently abstracts
    port 4 as eth0 and port 5 as eth1, bridging them in the kernel.
    
    This patch adjusts the GMAC port bitmasks and default bitmask for ar40xx
    to bridge them on the switch, avoiding traffic on both ports to pass
    thru the CPU.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 target/linux/ipq40xx/base-files/etc/board.d/02_network           | 5 ++++-
 .../files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts  | 9 +++++++--
 2 files changed, 11 insertions(+), 3 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 5c1bdc51ce..2966fbf1fb 100755
--- a/target/linux/ipq40xx/base-files/etc/board.d/02_network
+++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network
@@ -61,7 +61,10 @@ ipq40xx_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"0u at eth0" "1:lan" "2:lan" "3:lan" "4:lan"
 		;;
-	avm,fritzrepeater-3000|\
+	avm,fritzrepeater-3000)
+		ucidef_add_switch "switch0" \
+			"0u at eth0" "4:lan:1" "5:lan:2"
+		;;
 	compex,wpj419|\
 	compex,wpj428|\
 	engenius,eap2200)
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts
index 6914917eb3..6a132adade 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts
@@ -58,12 +58,13 @@
 		ess-switch at c000000 {
 			status = "okay";
 
-			switch_lan_bmp = <0x10>;
-			switch_wan_bmp = <0x20>;
+			switch_lan_bmp = <0x30>;
+			switch_wan_bmp = <0x02>;
 		};
 
 		edma at c080000 {
 			status = "okay";
+			qcom,num_gmac = <1>;
 		};
 	};
 
@@ -209,6 +210,10 @@
 	};
 };
 
+&gmac0 {
+	vlan_tag = <1 0x30>;
+};
+
 &cryptobam {
 	status = "okay";
 };



More information about the lede-commits mailing list