ipq40xx: enable FRITZRepeater 3000 ports on switch
authorDavid Bauer <mail@david-bauer.net>
Tue, 15 Sep 2020 09:19:14 +0000 (11:19 +0200)
committerDavid Bauer <mail@david-bauer.net>
Thu, 17 Sep 2020 16:08:46 +0000 (18:08 +0200)
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@david-bauer.net>
target/linux/ipq40xx/base-files/etc/board.d/02_network
target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts

index 5c1bdc51ceef69428a33e634f5bd659bbd9afbc8..2966fbf1fbae7605219274055ca27c2e62b049d0 100755 (executable)
@@ -61,7 +61,10 @@ ipq40xx_setup_interfaces()
                ucidef_add_switch "switch0" \
                        "0u@eth0" "1:lan" "2:lan" "3:lan" "4:lan"
                ;;
-       avm,fritzrepeater-3000|\
+       avm,fritzrepeater-3000)
+               ucidef_add_switch "switch0" \
+                       "0u@eth0" "4:lan:1" "5:lan:2"
+               ;;
        compex,wpj419|\
        compex,wpj428|\
        engenius,eap2200)
index 6914917eb32466deea4cbb546acd02500094997b..6a132adade8712d3fab55d91c6e59d16cd1fceae 100644 (file)
                ess-switch@c000000 {
                        status = "okay";
 
-                       switch_lan_bmp = <0x10>;
-                       switch_wan_bmp = <0x20>;
+                       switch_lan_bmp = <0x30>;
+                       switch_wan_bmp = <0x02>;
                };
 
                edma@c080000 {
                        status = "okay";
+                       qcom,num_gmac = <1>;
                };
        };
 
        };
 };
 
+&gmac0 {
+       vlan_tag = <1 0x30>;
+};
+
 &cryptobam {
        status = "okay";
 };