mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-31 02:17:58 +00:00 
			
		
		
		
	ipq806x/ipq807x: fix lan/wan mapping on ecw5410 and wf194
Fixes: WIFI-3706 Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
		| @@ -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 <john@phrozen.org> | From: John Crispin <john@phrozen.org> | ||||||
| Date: Sat, 18 Jul 2020 08:53:44 +0200 | Date: Sat, 18 Jul 2020 08:53:44 +0200 | ||||||
| Subject: [PATCH 01/30] ipq807x: add the Qualcomm AX target support | Subject: [PATCH 01/30] ipq807x: add the Qualcomm AX target support | ||||||
| @@ -321,7 +321,7 @@ index 0000000000..0bfa04d614 | |||||||
| +exit 0 | +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 | 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 | new file mode 100755 | ||||||
| index 0000000000..d53f743d27 | index 0000000000..ee9973f7a8 | ||||||
| --- /dev/null | --- /dev/null | ||||||
| +++ b/target/linux/ipq807x/base-files/etc/board.d/02_network | +++ b/target/linux/ipq807x/base-files/etc/board.d/02_network | ||||||
| @@ -0,0 +1,78 @@ | @@ -0,0 +1,78 @@ | ||||||
| @@ -381,17 +381,17 @@ index 0000000000..d53f743d27 | |||||||
| +		mac=$(grep BaseMacAddress= /dev/mtd14 | cut -dx -f2) | +		mac=$(grep BaseMacAddress= /dev/mtd14 | cut -dx -f2) | ||||||
| +		wan_mac=$(macaddr_canonicalize $mac) | +		wan_mac=$(macaddr_canonicalize $mac) | ||||||
| +		lan_mac=$(macaddr_add "$wan_mac" 1) | +		lan_mac=$(macaddr_add "$wan_mac" 1) | ||||||
| +		ucidef_set_network_device_mac eth0 $wan_mac | +		ucidef_set_network_device_mac eth0 $lan_mac | ||||||
| +		ucidef_set_network_device_mac eth1 $lan_mac | +		ucidef_set_network_device_mac eth1 $wan_mac | ||||||
| +		ip link set eth0 address $wan_mac | +		ip link set eth0 address $lan_mac | ||||||
| +		ip link set eth1 address $lan_mac | +		ip link set eth1 address $wan_mac | ||||||
| +		;; | +		;; | ||||||
| +	*) | +	*) | ||||||
| +		wan_mac=$(cat /sys/class/net/eth0/address) | +		wan_mac=$(cat /sys/class/net/eth0/address) | ||||||
| +		lan_mac=$(macaddr_add "$wan_mac" 1) | +		lan_mac=$(macaddr_add "$wan_mac" 1) | ||||||
| +		;; | +		;; | ||||||
| +	esac | +	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 | +	[ -n "$wan_mac" ] && ucidef_set_interface_macaddr "wan" $wan_mac | ||||||
| +} | +} | ||||||
| + | + | ||||||
|   | |||||||
| @@ -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 <john@phrozen.org> | From: John Crispin <john@phrozen.org> | ||||||
| Date: Wed, 18 Aug 2021 15:49:56 +0200 | 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 <john@phrozen.org> | Signed-off-by: John Crispin <john@phrozen.org> | ||||||
| --- | --- | ||||||
| @@ -9,14 +9,14 @@ Signed-off-by: John Crispin <john@phrozen.org> | |||||||
|  package/firmware/ipq-wifi/Makefile            |   2 + |  package/firmware/ipq-wifi/Makefile            |   2 + | ||||||
|  .../board-edgecore_ssw2ac2600.qca9984         | Bin 0 -> 24324 bytes |  .../board-edgecore_ssw2ac2600.qca9984         | Bin 0 -> 24324 bytes | ||||||
|  .../ipq806x/base-files/etc/board.d/01_leds    |   1 + |  .../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 + |  .../etc/hotplug.d/firmware/11-ath10k-caldata  |   2 + | ||||||
|  .../ipq806x/base-files/etc/init.d/bootcount   |   1 + |  .../ipq806x/base-files/etc/init.d/bootcount   |   1 + | ||||||
|  .../base-files/lib/upgrade/platform.sh        |   1 + |  .../base-files/lib/upgrade/platform.sh        |   1 + | ||||||
|  .../arm/boot/dts/qcom-ipq8068-ssw2ac2600.dts  | 341 ++++++++++++++++++ |  .../arm/boot/dts/qcom-ipq8068-ssw2ac2600.dts  | 341 ++++++++++++++++++ | ||||||
|  target/linux/ipq806x/image/Makefile           |  14 + |  target/linux/ipq806x/image/Makefile           |  14 + | ||||||
|  .../0069-arm-boot-add-dts-files.patch         |   3 +- |  .../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 package/firmware/ipq-wifi/board-edgecore_ssw2ac2600.qca9984 | ||||||
|  create mode 100644 target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-ssw2ac2600.dts |  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 "wlan2g" "WLAN2G" "green:wlan2g" "phy1tpt" | ||||||
|  	ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wlan5g" "phy0tpt" |  	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 | 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 | --- a/target/linux/ipq806x/base-files/etc/board.d/02_network | ||||||
| +++ b/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" \ |  	ucidef_add_switch "switch0" \ | ||||||
|  		"1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0" |  		"1:lan" "2:lan" "3:lan" "4:lan" "6@eth1" "5:wan" "0@eth0" | ||||||
|  	;; |  	;; | ||||||
| @@ -148,6 +148,13 @@ index 1a1cec51aa..146d42cb0a 100755 | |||||||
|  edgecore,ecw5410) |  edgecore,ecw5410) | ||||||
|  	ucidef_set_interfaces_lan_wan "eth1" "eth0" |  	ucidef_set_interfaces_lan_wan "eth1" "eth0" | ||||||
|  	if [ -b "$(find_mtd_part 0:art)" ]; then |  	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 | 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 | index b9d0fec25e..ae8feba798 100644 | ||||||
| --- a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata | --- a/target/linux/ipq806x/base-files/etc/hotplug.d/firmware/11-ath10k-caldata | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 John Crispin
					John Crispin