From 26b58991b0bfe3b19b39ae8bfb190b569a072e9c Mon Sep 17 00:00:00 2001 From: Lech Perczak Date: Sat, 15 Oct 2022 17:59:38 +0200 Subject: [PATCH] ipq40xx: fix ZTE MF289F port mapping With initial support, the mapping of LAN1/WAN and LAN2 ports was swapped. Fix it to match labels on the device, keeping the "WAN" personality of the first port - in line with current state of DSA setup in master for this device. Tested-by: Marcin Gajda Tested-by: Christian Heuff Signed-off-by: Lech Perczak --- target/linux/ipq40xx/base-files/etc/board.d/02_network | 2 +- .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf289f.dts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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 deb9ec64f6..a38d35a10d 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -153,7 +153,7 @@ ipq40xx_setup_interfaces() zte,mf289f) ucidef_set_interfaces_lan_wan "eth0" "eth1" ucidef_add_switch "switch0" \ - "0u@eth0" "0u@eth1" "2:lan:1" "5:lan:2" + "0u@eth0" "5:lan:2" "0u@eth1" "2:wan" ;; *) echo "Unsupported hardware. Network interfaces not initialized" diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf289f.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf289f.dts index 41cd46710c..3f16b56a55 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf289f.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf289f.dts @@ -103,6 +103,8 @@ ess-switch@c000000 { status = "okay"; + switch_lan_bmp = <0x20>; + switch_wan_bmp = <0x4>; }; edma@c080000 { @@ -322,12 +324,14 @@ &gmac0 { nvmem-cell-names = "mac-address"; nvmem-cells = <&macaddr_mac_0>; + vlan_tag = <1 0x20>; }; &gmac1 { nvmem-cell-names = "mac-address"; nvmem-cells = <&macaddr_mac_0>; mac-address-increment = <1>; + vlan_tag = <2 0x4>; }; -- 2.30.2