From 1edba538a97fe8a17a388a43506fe562533b02ed Mon Sep 17 00:00:00 2001 From: Chuanhong Guo Date: Thu, 2 Aug 2018 13:17:44 +0800 Subject: ath79: Fix led nodes for TL-WR740N v2 and add its clones This patch did the following things: 1. Separate ath9k-leds out of gpio leds so that all other leds will work before ath9k loded (e.g. during preinit/init stage). 2. Rename wps led to qss since that's how TP-Link mark it. 3. Rename LED prefix to tp-link because that dts is shared by many devices. 4. Rename to wr740n-v1 because v1 is the first and v2 just use the fw of v1. (This will require a forced sysupgrade if you comes from the previous wr740n v2 image.) 5. Remove SUPPORTED_DEVICES. (tl-wr740n-v2 doesn't exist anywhere so it's useless.) 6. Add all WR741ND v1 clones found in ar71xx. Signed-off-by: Chuanhong Guo --- target/linux/ath79/base-files/etc/board.d/01_leds | 17 +++++++++++------ target/linux/ath79/base-files/etc/board.d/02_network | 7 ++++++- .../base-files/etc/hotplug.d/firmware/10-ath9k-eeprom | 9 ++++++++- 3 files changed, 25 insertions(+), 8 deletions(-) (limited to 'target/linux/ath79/base-files/etc') diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds b/target/linux/ath79/base-files/etc/board.d/01_leds index 1ae2feb080..c3dc1bbe56 100755 --- a/target/linux/ath79/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/base-files/etc/board.d/01_leds @@ -56,12 +56,17 @@ tplink,tl-wr1043nd-v4) ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04" ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02" ;; -tplink,tl-wr740n-v2) - ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0" - ucidef_set_led_switch "lan1" "LAN1" "$boardname:green:lan1" "switch0" "0x02" - ucidef_set_led_switch "lan2" "LAN2" "$boardname:green:lan2" "switch0" "0x04" - ucidef_set_led_switch "lan3" "LAN3" "$boardname:green:lan3" "switch0" "0x08" - ucidef_set_led_switch "lan4" "LAN4" "$boardname:green:lan4" "switch0" "0x10" +tplink,tl-wr740n-v1|\ +tplink,tl-wr740n-v3|\ +tplink,tl-wr741-v1|\ +tplink,tl-wr743nd-v1|\ +tplink,tl-wr841-v5|\ +tplink,tl-wr941-v4) + ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0" + ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x02" + ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x04" + ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x08" + ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x10" ;; tplink,tl-wr740nd-v4|\ tplink,tl-wr741nd-v4) diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index f0233b4b28..9ec78ece23 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -97,7 +97,12 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9@eth0" ;; - tplink,tl-wr740n-v2) + tplink,tl-wr740n-v1|\ + tplink,tl-wr740n-v3|\ + tplink,tl-wr741-v1|\ + tplink,tl-wr743nd-v1|\ + tplink,tl-wr841-v5|\ + tplink,tl-wr941-v4) ucidef_set_interface_wan "eth0" ucidef_add_switch "switch0" \ "0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index b55ae0dbb3..e8adcf613a 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -61,11 +61,18 @@ case "$FIRMWARE" in tplink,tl-mr3220-v1|\ tplink,tl-mr3420-v1|\ tplink,tl-wr2543-v1|\ - tplink,tl-wr740n-v2|\ + tplink,tl-wr740n-v1|\ + tplink,tl-wr740n-v3|\ + tplink,tl-wr741-v1|\ + tplink,tl-wr743nd-v1|\ tplink,tl-wr841-v7|\ ubnt,unifi) ath9k_eeprom_extract "art" 4096 2048 ;; + tplink,tl-wr841-v5|\ + tplink,tl-wr941-v4) + ath9k_eeprom_extract "art" 4096 3768 + ;; *) ath9k_eeprom_die "board $board is not supported yet" ;; -- cgit v1.2.3