Re: [OpenWrt-Devel] [PATCH] ar71xx: add support for the Telldus TellStick ZNet Lite

2016-03-05 Thread Felix Fietkau
On 2016-03-01 11:32, micke.p...@telldus.se wrote:
> Signed-off-by: Micke Prag 
> ---
>   target/linux/ar71xx/base-files/etc/board.d/01_leds |   5 +
>   .../linux/ar71xx/base-files/etc/board.d/02_network |   5 +
>   target/linux/ar71xx/base-files/etc/diag.sh |   3 +
>   target/linux/ar71xx/base-files/lib/ar71xx.sh   |   6 +
>   .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
>   target/linux/ar71xx/config-4.1 |   1 +
>   target/linux/ar71xx/config-4.4 |   1 +
>   .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  10 ++
>   target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
>   .../arch/mips/ath79/mach-tellstick-znet-lite.c | 129 
> +
>   .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
>   target/linux/ar71xx/generic/profiles/telldus.mk|  17 +++
>   target/linux/ar71xx/image/Makefile |   9 ++
>   13 files changed, 189 insertions(+)
>   create mode 100644 
> target/linux/ar71xx/files/arch/mips/ath79/mach-tellstick-znet-lite.c
>   create mode 100644 target/linux/ar71xx/generic/profiles/telldus.mk
> 
The patch is badly damaged by line wrapping. Please consider using
git send-email.

- Felix
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] ar71xx: add support for the Telldus TellStick ZNet Lite

2016-03-01 Thread micke . prag

Signed-off-by: Micke Prag 
---
 target/linux/ar71xx/base-files/etc/board.d/01_leds |   5 +
 .../linux/ar71xx/base-files/etc/board.d/02_network |   5 +
 target/linux/ar71xx/base-files/etc/diag.sh |   3 +
 target/linux/ar71xx/base-files/lib/ar71xx.sh   |   6 +
 .../ar71xx/base-files/lib/upgrade/platform.sh  |   1 +
 target/linux/ar71xx/config-4.1 |   1 +
 target/linux/ar71xx/config-4.4 |   1 +
 .../ar71xx/files/arch/mips/ath79/Kconfig.openwrt   |  10 ++
 target/linux/ar71xx/files/arch/mips/ath79/Makefile |   1 +
 .../arch/mips/ath79/mach-tellstick-znet-lite.c | 129 
+

 .../linux/ar71xx/files/arch/mips/ath79/machtypes.h |   1 +
 target/linux/ar71xx/generic/profiles/telldus.mk|  17 +++
 target/linux/ar71xx/image/Makefile |   9 ++
 13 files changed, 189 insertions(+)
 create mode 100644 
target/linux/ar71xx/files/arch/mips/ath79/mach-tellstick-znet-lite.c

 create mode 100644 target/linux/ar71xx/generic/profiles/telldus.mk

diff --git a/target/linux/ar71xx/base-files/etc/board.d/01_leds 
b/target/linux/ar71xx/base-files/etc/board.d/01_leds

index 151eac2..c787ed7 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -407,6 +407,11 @@ smart-300)
ucidef_set_led_wlan "wlan" "WLAN" "nc-link:green:wlan" "phy0tpt"
;;

+tellstick-znet-lite)
+	ucidef_set_led_netdev "lan_act" "LANACT" "tellstick:green:lan" "eth0" 
"tx rx"
+	ucidef_set_led_netdev "lan_link" "LANLINK" "tellstick:orange:lan" 
"eth0" "link"

+   ;;
+
 tew-712br)
ucidef_set_led_netdev "wan" "WAN" "trendnet:green:wan" "eth1"
 	ucidef_set_led_switch "lan1" "LAN1" "trendnet:green:lan1" "switch0" 
"0x02"
diff --git a/target/linux/ar71xx/base-files/etc/board.d/02_network 
b/target/linux/ar71xx/base-files/etc/board.d/02_network

index 799d98e..e88ef3a 100755
--- a/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ b/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -192,6 +192,11 @@ el-m150)
"0:lan" "1:lan" "3@eth1" # XXX: confirm!
;;

+tellstick-znet-lite)
+   ucidef_set_interface_wan "eth0" "dhcp"
+   ucidef_set_interface_raw "wlan" "wlan0" "dhcp"
+   ;;
+
 tl-wdr4300|\
 tl-wr1041n-v2)
ucidef_add_switch "switch0" \
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh 
b/target/linux/ar71xx/base-files/etc/diag.sh

index 1971b84..4078eab 100644
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -263,6 +263,9 @@ get_status_led() {
qihoo-c301)
status_led="qihoo:green:status"
;;
+   tellstick-znet-lite)
+   status_led="tellstick:white:system"
+   ;;
tew-632brp)
status_led="tew-632brp:green:status"
;;
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh 
b/target/linux/ar71xx/base-files/lib/ar71xx.sh

index 3203273..3a568d0 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -120,6 +120,9 @@ tplink_board_detect() {
"12"*)
model="MERCURY MAC1200R"
;;
+   "007260"*)
+   model="TellStick ZNet Lite"
+   ;;
"3C0001"*)
model="OOLITE"
;;
@@ -749,6 +752,9 @@ ar71xx_board_detect() {
"Smart Electronics Black Swift board"*)
name="bsb"
;;
+   *"Telldus TellStick ZNet Lite")
+   name="tellstick-znet-lite"
+   ;;
*TEW-632BRP)
name="tew-632brp"
;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh 
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh

index 8a70502..d410819 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -336,6 +336,7 @@ platform_check_image() {
onion-omega | \
oolite | \
smart-300 | \
+   tellstick-znet-lite | \
tl-mr10u | \
tl-mr11u | \
tl-mr12u | \
diff --git a/target/linux/ar71xx/config-4.1 
b/target/linux/ar71xx/config-4.1

index 0ccb278..0570749 100644
--- a/target/linux/ar71xx/config-4.1
+++ b/target/linux/ar71xx/config-4.1
@@ -123,6 +123,7 @@ CONFIG_ATH79_MACH_R6100=y
 # CONFIG_ATH79_MACH_RBSXTLITE is not set
 CONFIG_ATH79_MACH_RW2458N=y
 CONFIG_ATH79_MACH_SMART_300=y
+CONFIG_ATH79_MACH_TELLSTICK_ZNET_LITE=y
 CONFIG_ATH79_MACH_TEW_632BRP=y
 CONFIG_ATH79_MACH_TEW_673GRU=y
 CONFIG_ATH79_MACH_TEW_712BR=y
diff --git a/target/linux/ar71xx/config-4.4 
b/target/linux/ar71xx/config-4.4

index bef1863..c9ee122 100644
--- a/target/linux/ar71xx/config-4.4
+++ b/target/linux/ar71xx/config-4.4
@@ -126,6 +126,7 @@ CONFIG_ATH79_MACH_R6100=y
 # CONFIG_ATH79_MACH_RBSXTLITE is not set