[OpenWrt-Devel] ath79: Add LED migration for several Archer Cxx devices
diff mbox series

Message ID 20190902091021.1083-1-freifunk@adrianschmutzler.de
State Under Review
Delegated to: David Bauer
Headers show
Series
  • [OpenWrt-Devel] ath79: Add LED migration for several Archer Cxx devices
Related show

Commit Message

Adrian Schmutzler Sept. 2, 2019, 9:10 a.m. UTC
Several Archer Cxx devices were using board-specific LED names in
ar71xx, which were changed to "tp-link:*" in ath79.

This patch adds migration for them.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
---
 .../base-files/etc/uci-defaults/04_led_migration  | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

David Bauer Sept. 2, 2019, 11:08 p.m. UTC | #1
Hello Adrian

On 9/2/19 11:10 AM, Adrian Schmutzler wrote:
> Several Archer Cxx devices were using board-specific LED names in
> ar71xx, which were changed to "tp-link:*" in ath79.
> 
> This patch adds migration for them.

Have you run-tested this patch? For me i ran into the issue of the device
not being reachable via Ethernet, as the Ethernet MACs were swapped.

Has anyone yet tried to find an migration approach for this? I assume this
could be tricky, as we might need to update the board.json also in this run.

Regarding the actual patch: I assume the LEDs were migrated (as the WAN Ethernet
got illuminated), but i want to hear your opinion on how we should proceed with
the Ethernet migration. :)

Best wishes
David
Adrian Schmutzler Sept. 3, 2019, 9:29 a.m. UTC | #2
Hi,

concerning LED migration:

I have _not_ run-tested this patch, as it's closely similar to what has been done for c7-v5, which has been tested.

I own C25 and both C60, though, so if you insist I can test (but not so soon).

Concerning eth0/eth1 swap:

After https://github.com/openwrt/openwrt/pull/2066 , several devices were aligned to the ar71xx order, but also several that were "correct" before are wrong now.
This affects the TP-Link C58, C59, C60, Glint AR150, not sure about C25, and most probably several others I have not encountered.

There was a brief discussion about migration somewhere, but I do not recall how or whether it was resolved. I had a quick look into the code, and didn't find anything for eth migration (but might have overlooked it).

Technically, a migration script only would have to exchange eth0 and eth1 (with an intermediate step), so it shouldn't be too complicated, unless I overlooked something. One could do the same for board.json, although solving it like this leaves a little of a sour taste.

Maybe one should restart this discussion on the list ...

However, please note that I'm only dealing with this topic by accident, as I've found out about the missing LED migration (and with ramips LEDs, as I've destroyed them in the first place ;-) ). I'm mostly using OpenWrt to develop Freifunk firmware based on it, where we completely circumvent OpenWrt migration mechanism. So I'm definitely not an expert with this.

Best

Adrian



> -----Original Message-----
> From: openwrt-devel [mailto:openwrt-devel-bounces@lists.openwrt.org] On Behalf Of David Bauer
> Sent: Dienstag, 3. September 2019 01:09
> To: Adrian Schmutzler <freifunk@adrianschmutzler.de>
> Cc: openwrt-devel@lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH] ath79: Add LED migration for several Archer Cxx devices
> 
> Hello Adrian
> 
> On 9/2/19 11:10 AM, Adrian Schmutzler wrote:
> > Several Archer Cxx devices were using board-specific LED names in
> > ar71xx, which were changed to "tp-link:*" in ath79.
> >
> > This patch adds migration for them.
> 
> Have you run-tested this patch? For me i ran into the issue of the device
> not being reachable via Ethernet, as the Ethernet MACs were swapped.
> 
> Has anyone yet tried to find an migration approach for this? I assume this
> could be tricky, as we might need to update the board.json also in this run.
> 
> Regarding the actual patch: I assume the LEDs were migrated (as the WAN Ethernet
> got illuminated), but i want to hear your opinion on how we should proceed with
> the Ethernet migration. :)
> 
> Best wishes
> David
> 
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Adrian Schmutzler Sept. 17, 2019, 12:45 p.m. UTC | #3
Hi David,

since C59v2 had to be added anyway, I've sent a v2 patchset with a different approach.

Just wanted to notify you also in this thread, as you have marked this as Under Review.

Best

Adrian

> -----Original Message-----
> From: David Bauer [mailto:mail@david-bauer.net]
> Sent: Dienstag, 3. September 2019 01:09
> To: Adrian Schmutzler <freifunk@adrianschmutzler.de>
> Cc: openwrt-devel@lists.openwrt.org
> Subject: Re: [OpenWrt-Devel] [PATCH] ath79: Add LED migration for several Archer Cxx devices
> 
> Hello Adrian
> 
> On 9/2/19 11:10 AM, Adrian Schmutzler wrote:
> > Several Archer Cxx devices were using board-specific LED names in
> > ar71xx, which were changed to "tp-link:*" in ath79.
> >
> > This patch adds migration for them.
> 
> Have you run-tested this patch? For me i ran into the issue of the device
> not being reachable via Ethernet, as the Ethernet MACs were swapped.
> 
> Has anyone yet tried to find an migration approach for this? I assume this
> could be tricky, as we might need to update the board.json also in this run.
> 
> Regarding the actual patch: I assume the LEDs were migrated (as the WAN Ethernet
> got illuminated), but i want to hear your opinion on how we should proceed with
> the Ethernet migration. :)
> 
> Best wishes
> David

Patch
diff mbox series

diff --git a/target/linux/ath79/base-files/etc/uci-defaults/04_led_migration b/target/linux/ath79/base-files/etc/uci-defaults/04_led_migration
index b1afd0ee76..9059b8d5b5 100644
--- a/target/linux/ath79/base-files/etc/uci-defaults/04_led_migration
+++ b/target/linux/ath79/base-files/etc/uci-defaults/04_led_migration
@@ -9,6 +9,21 @@  case "$board" in
 engenius,epg5000)
 	migrate_leds ":wlan-2g=:wlan2g" ":wlan-5g=:wlan5g"
 	;;
+tplink,archer-c25-v1)
+	migrate_leds "^archer-c25-v1:=tp-link:"
+	;;
+tplink,archer-c58-v1)
+	migrate_leds "^archer-c58-v1:=tp-link:"
+	;;
+tplink,archer-c59-v1)
+	migrate_leds "^archer-c59-v1:=tp-link:"
+	;;
+tplink,archer-c60-v1)
+	migrate_leds "^archer-c60-v1:=tp-link:"
+	;;
+tplink,archer-c60-v2)
+	migrate_leds "^archer-c60-v2:=tp-link:"
+	;;
 tplink,archer-c7-v2)
 	migrate_leds ":blue:=:green:"
 	;;