From e39e986a59487e7e229f1149d951e31bc386ab88 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Wed, 9 Jun 2021 12:37:52 +0200 Subject: [PATCH] fff-network: adapt support for TP-Link CPE210/510 v1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This migrates the support for the TP-Link CPE210 v1 and CPE510 v1 so they are recognized by the new two-port setup code. Assignment of ports should be consistent to the ar71xx implementation, i.e. primary port (PoE in) assigned to WAN and secondary port (PoE out) assigned to CLIENT by default. Note that this is the exact opposite of the default configuration of what OpenWrt does (but both have been consistent in behavior). Since they work again, also re-enable image transfer. Signed-off-by: Adrian Schmutzler Reviewed-by: Fabian Bläse --- bsp/ath79-generic.bsp | 4 ++-- src/packages/fff/fff-network/Makefile | 2 +- .../fff-network/mips/network.tplink,cpe210-v1 | 16 ++-------------- .../fff-network/mips/network.tplink,cpe510-v1 | 16 ++-------------- 4 files changed, 7 insertions(+), 31 deletions(-) diff --git a/bsp/ath79-generic.bsp b/bsp/ath79-generic.bsp index b530d16..0402ee2 100644 --- a/bsp/ath79-generic.bsp +++ b/bsp/ath79-generic.bsp @@ -6,10 +6,10 @@ images=("openwrt-${chipset}-${subtarget}-glinet_gl-ar150-squashfs-*" "openwrt-${chipset}-${subtarget}-tplink_archer-c60-v2-squashfs-*" "openwrt-${chipset}-${subtarget}-tplink_archer-c7-v2-squashfs-*" "openwrt-${chipset}-${subtarget}-tplink_archer-c7-v5-squashfs-*" -# "openwrt-${chipset}-${subtarget}-tplink_cpe210-v1-squashfs-*" + "openwrt-${chipset}-${subtarget}-tplink_cpe210-v1-squashfs-*" "openwrt-${chipset}-${subtarget}-tplink_cpe210-v2-squashfs-*" "openwrt-${chipset}-${subtarget}-tplink_cpe210-v3-squashfs-*" -# "openwrt-${chipset}-${subtarget}-tplink_cpe510-v1-squashfs-*" + "openwrt-${chipset}-${subtarget}-tplink_cpe510-v1-squashfs-*" "openwrt-${chipset}-${subtarget}-tplink_tl-wdr3500-v1-squashfs-*" "openwrt-${chipset}-${subtarget}-tplink_tl-wdr3600-v1-squashfs-*" "openwrt-${chipset}-${subtarget}-tplink_tl-wdr4300-v1-squashfs-*" diff --git a/src/packages/fff/fff-network/Makefile b/src/packages/fff/fff-network/Makefile index cdbfa5c..25f81c5 100644 --- a/src/packages/fff/fff-network/Makefile +++ b/src/packages/fff/fff-network/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fff-network -PKG_RELEASE:=42 +PKG_RELEASE:=43 include $(INCLUDE_DIR)/package.mk diff --git a/src/packages/fff/fff-network/mips/network.tplink,cpe210-v1 b/src/packages/fff/fff-network/mips/network.tplink,cpe210-v1 index 3c0a422..0f2898f 100644 --- a/src/packages/fff/fff-network/mips/network.tplink,cpe210-v1 +++ b/src/packages/fff/fff-network/mips/network.tplink,cpe210-v1 @@ -1,17 +1,5 @@ -. /lib/functions/fff/network - -WANDEV=eth0 +WANDEV=eth1 SWITCHDEV=eth0 -CLIENT_PORTS="0t" -WAN_PORTS="0t" -BATMAN_PORTS="0t" - -# use mac address from phy0 with 'locally administered' bit set to '1' -# only possible, because wXmesh is created first and therefore gets the 'universally administered address' - -ETHMESHMAC=$(macFlipLocalBit "$(cat /sys/class/ieee80211/phy0/macaddress)") +TWO_PORT=YES . /etc/network.mode - -LAN0PORT=5 -LAN1PORT=4 diff --git a/src/packages/fff/fff-network/mips/network.tplink,cpe510-v1 b/src/packages/fff/fff-network/mips/network.tplink,cpe510-v1 index 3c0a422..0f2898f 100644 --- a/src/packages/fff/fff-network/mips/network.tplink,cpe510-v1 +++ b/src/packages/fff/fff-network/mips/network.tplink,cpe510-v1 @@ -1,17 +1,5 @@ -. /lib/functions/fff/network - -WANDEV=eth0 +WANDEV=eth1 SWITCHDEV=eth0 -CLIENT_PORTS="0t" -WAN_PORTS="0t" -BATMAN_PORTS="0t" - -# use mac address from phy0 with 'locally administered' bit set to '1' -# only possible, because wXmesh is created first and therefore gets the 'universally administered address' - -ETHMESHMAC=$(macFlipLocalBit "$(cat /sys/class/ieee80211/phy0/macaddress)") +TWO_PORT=YES . /etc/network.mode - -LAN0PORT=5 -LAN1PORT=4