From fd884e709b3f5bc9c6c64fe54a0acc11b88f706f Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sat, 25 Sep 2021 11:06:39 +0200 Subject: [PATCH] ipq806x/ipq807x: fix lan/wan mapping on ecw5410 and wf194 Fixes: WIFI-3706 Signed-off-by: John Crispin --- ...x-add-the-Qualcomm-AX-target-support.patch | 14 +++++++------- ...806x-add-edgecore_ssw2ac2600-support.patch | 19 +++++++++++++------ 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/patches/0017-ipq807x-add-the-Qualcomm-AX-target-support.patch b/patches/0017-ipq807x-add-the-Qualcomm-AX-target-support.patch index 2129d97e0..cd6037ca1 100644 --- a/patches/0017-ipq807x-add-the-Qualcomm-AX-target-support.patch +++ b/patches/0017-ipq807x-add-the-Qualcomm-AX-target-support.patch @@ -1,4 +1,4 @@ -From 13e8f73314821c1bba233df508f278c8e564acac Mon Sep 17 00:00:00 2001 +From 67a6b38fa419294a243219e1d99ac0f8e89daef4 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Sat, 18 Jul 2020 08:53:44 +0200 Subject: [PATCH 01/30] ipq807x: add the Qualcomm AX target support @@ -321,7 +321,7 @@ index 0000000000..0bfa04d614 +exit 0 diff --git a/target/linux/ipq807x/base-files/etc/board.d/02_network b/target/linux/ipq807x/base-files/etc/board.d/02_network new file mode 100755 -index 0000000000..d53f743d27 +index 0000000000..ee9973f7a8 --- /dev/null +++ b/target/linux/ipq807x/base-files/etc/board.d/02_network @@ -0,0 +1,78 @@ @@ -381,17 +381,17 @@ index 0000000000..d53f743d27 + mac=$(grep BaseMacAddress= /dev/mtd14 | cut -dx -f2) + wan_mac=$(macaddr_canonicalize $mac) + lan_mac=$(macaddr_add "$wan_mac" 1) -+ ucidef_set_network_device_mac eth0 $wan_mac -+ ucidef_set_network_device_mac eth1 $lan_mac -+ ip link set eth0 address $wan_mac -+ ip link set eth1 address $lan_mac ++ ucidef_set_network_device_mac eth0 $lan_mac ++ ucidef_set_network_device_mac eth1 $wan_mac ++ ip link set eth0 address $lan_mac ++ ip link set eth1 address $wan_mac + ;; + *) + wan_mac=$(cat /sys/class/net/eth0/address) + lan_mac=$(macaddr_add "$wan_mac" 1) + ;; + esac -+ [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac ++ [ -n "$lan_mac" ] && ucidef_set_interface_macaddr "lan" $lan_mac + [ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac +} + diff --git a/patches/0043-ipq806x-add-edgecore_ssw2ac2600-support.patch b/patches/0043-ipq806x-add-edgecore_ssw2ac2600-support.patch index 5654bbda6..0a4bd1728 100644 --- a/patches/0043-ipq806x-add-edgecore_ssw2ac2600-support.patch +++ b/patches/0043-ipq806x-add-edgecore_ssw2ac2600-support.patch @@ -1,7 +1,7 @@ -From 282fff50a526b7eef8f4ffbaf9c2a01c407920ad Mon Sep 17 00:00:00 2001 +From b91c659806905ea2c8dd71bdd552cad9e9a48c8a Mon Sep 17 00:00:00 2001 From: John Crispin Date: Wed, 18 Aug 2021 15:49:56 +0200 -Subject: [PATCH 43/43] ipq806x: add edgecore_ssw2ac2600 support +Subject: [PATCH 27/30] ipq806x: add edgecore_ssw2ac2600 support Signed-off-by: John Crispin --- @@ -9,14 +9,14 @@ Signed-off-by: John Crispin package/firmware/ipq-wifi/Makefile | 2 + .../board-edgecore_ssw2ac2600.qca9984 | Bin 0 -> 24324 bytes .../ipq806x/base-files/etc/board.d/01_leds | 1 + - .../ipq806x/base-files/etc/board.d/02_network | 1 + + .../ipq806x/base-files/etc/board.d/02_network | 3 + .../etc/hotplug.d/firmware/11-ath10k-caldata | 2 + .../ipq806x/base-files/etc/init.d/bootcount | 1 + .../base-files/lib/upgrade/platform.sh | 1 + .../arm/boot/dts/qcom-ipq8068-ssw2ac2600.dts | 341 ++++++++++++++++++ target/linux/ipq806x/image/Makefile | 14 + .../0069-arm-boot-add-dts-files.patch | 3 +- - 11 files changed, 366 insertions(+), 1 deletion(-) + 11 files changed, 368 insertions(+), 1 deletion(-) create mode 100644 package/firmware/ipq-wifi/board-edgecore_ssw2ac2600.qca9984 create mode 100644 target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-ssw2ac2600.dts @@ -137,10 +137,10 @@ index 74b94a29b4..05c63c817f 100755 ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wlan2g" "phy1tpt" ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wlan5g" "phy0tpt" diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network b/target/linux/ipq806x/base-files/etc/board.d/02_network -index 1a1cec51aa..146d42cb0a 100755 +index 1a1cec51aa..078de50a31 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/02_network +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network -@@ -27,6 +27,7 @@ tplink,vr2600v) +@@ -27,11 +27,14 @@ tplink,vr2600v) ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0" ;; @@ -148,6 +148,13 @@ index 1a1cec51aa..146d42cb0a 100755 edgecore,ecw5410) ucidef_set_interfaces_lan_wan "eth1" "eth0" if [ -b "$(find_mtd_part 0:art)" ]; then + ucidef_set_interface_macaddr "lan" "$(mtd_get_mac_binary "0:art" 0x6)" + ucidef_set_interface_macaddr "wan" "$(mtd_get_mac_binary "0:art" 0x0)" ++ ucidef_set_network_device_mac "eth1" "$(mtd_get_mac_binary "0:art" 0x6)" ++ ucidef_set_network_device_mac "eth0" "$(mtd_get_mac_binary "0:art" 0x0)" + else + # XXX: drop upper case after kernel v5.4 is gone (qcom-smem) + ucidef_set_interface_macaddr "lan" "$(mtd_get_mac_binary "0:ART" 0x6)" diff --git a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index b9d0fec25e..ae8feba798 100644 --- a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata