[OpenWrt-Devel] [PATCH] ar71xx: add support for TP-LINK TL-WA701ND v2

2015-01-16 Thread Luigi Tarenga
Signed-off-by: Luigi Tarenga luigi.tare...@gmail.com
---
I send the patch again, maybe it was not formatted correctly.
please let me know if there is any problem in how i send it.

regards
Luigi
---
 package/libs/openssl/Makefile |  6 +++---
 package/libs/openssl/patches/150-no_engines.patch | 18 +-
 package/libs/openssl/patches/200-parallel_build.patch |  8 
 package/network/ipv6/map/Makefile |  7 ---
 package/network/ipv6/map/files/map.sh |  3 +++
 package/network/ipv6/map/src/mapcalc.c|  6 --
 6 files changed, 27 insertions(+), 21 deletions(-)

diff --git a/target/linux/ar71xx/base-files/etc/diag.sh
b/target/linux/ar71xx/base-files/etc/diag.sh
index fa07f39..eb96338 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -195,6 +195,7 @@ get_status_led() {
 tl-mr3220-v2 | \
 tl-mr3420 | \
 tl-mr3420-v2 | \
+tl-wa701nd-v2 | \
 tl-wa801nd-v2 | \
 tl-wa901nd | \
 tl-wa901nd-v2 | \
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
index 5b9dbe7..51c2bca 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
@@ -275,7 +275,11 @@ tl-wa850re)
 ucidef_set_led_rssi rssihigh RSSIHIGH tp-link:blue:signal5
wlan0 80 100 -79 13
 ;;

-tl-wa860re)
+tl-wa701nd-v2 | \
+tl-wa830re-v2 | \
+tl-wa860re | \
+tl-wa801nd-v2 | \
+tl-wa901nd-v3)
 ucidef_set_led_netdev lan LAN tp-link:green:lan eth0
 ucidef_set_led_wlan wlan WLAN tp-link:green:wlan phy0tpt
 ;;
@@ -333,11 +337,6 @@ tl-wr841n-v8)
 ucidef_set_led_wlan wlan WLAN tp-link:green:wlan phy0tpt
 ;;

-tl-wa830re-v2)
-ucidef_set_led_netdev lan LAN tp-link:green:lan eth0
-ucidef_set_led_wlan wlan WLAN tp-link:green:wlan phy0tpt
-;;
-
 tl-wr841n-v9)
 ucidef_set_led_netdev wan WAN tp-link:green:wan eth1
 ucidef_set_led_switch lan1 LAN1 tp-link:green:lan1 switch0 0x10
@@ -357,12 +356,6 @@ tl-wr842n-v2)
 ucidef_set_led_usbdev usb USB tp-link:green:3g 1-1
 ;;

-tl-wa801nd-v2 | \
-tl-wa901nd-v3)
-ucidef_set_led_netdev lan LAN tp-link:green:lan eth0
-ucidef_set_led_wlan wlan WLAN tp-link:green:wlan phy0tpt
-;;
-
 tl-wr941nd | \
 tl-wr1041n-v2)
 ucidef_set_led_wlan wlan WLAN tp-link:green:wlan phy0tpt
diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
index c5cfd67..4be30b8 100755
--- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
+++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
@@ -301,6 +301,7 @@ tl-mr13u |\
 tl-mr3020 |\
 tl-mr3040 |\
 tl-mr3040-v2 |\
+tl-wa701nd-v2 |\
 tl-wa750re |\
 tl-wa850re |\
 tl-wa830re-v2 |\
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index 1e96b6d..df35775 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -571,6 +571,9 @@ ar71xx_board_detect() {
 *TL-MR3420 v2)
 name=tl-mr3420-v2
 ;;
+*TL-WA701ND v2)
+name=tl-wa701nd-v2
+;;
 *TL-WA750RE)
 name=tl-wa750re
 ;;
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index 846954c..eeaac6a 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -269,6 +269,7 @@ platform_check_image() {
 tl-mr3220-v2 | \
 tl-mr3420 | \
 tl-mr3420-v2 | \
+tl-wa701nd-v2 | \
 tl-wa7510n | \
 tl-wa750re | \
 tl-wa850re | \
diff --git a/target/linux/ar71xx/config-3.10 b/target/linux/ar71xx/config-3.10
index 9a8378a..482914a 100644
--- a/target/linux/ar71xx/config-3.10
+++ b/target/linux/ar71xx/config-3.10
@@ -88,6 +88,7 @@ CONFIG_ATH79_MACH_TL_MR11U=y
 CONFIG_ATH79_MACH_TL_MR13U=y
 CONFIG_ATH79_MACH_TL_MR3020=y
 CONFIG_ATH79_MACH_TL_MR3X20=y
+CONFIG_ATH79_MACH_TL_WA701ND_V2=y
 CONFIG_ATH79_MACH_TL_WA830RE_V2=y
 CONFIG_ATH79_MACH_TL_WA901ND=y
 CONFIG_ATH79_MACH_TL_WA901ND_V2=y
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
new file mode 100644
index 000..aab92b3
--- /dev/null
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
@@ -0,0 +1,116 @@
+/*
+ *  TP-LINK TL-WA701ND v2 board support
+ *
+ *  Copyright (C) 2015 Luigi Tarenga luigi.tare...@gmail.com
+ *
+ *  This program is free software; you can redistribute it and/or modify it
+ *  under the terms of the GNU General Public License version 2 as published
+ *  by the Free Software Foundation.
+ */
+
+#include linux/gpio.h
+
+#include asm/mach-ath79/ath79.h
+
+#include dev-eth.h
+#include 

Re: [OpenWrt-Devel] [PATCH] ar71xx: add support for TP-LINK TL-WA701ND v2

2015-01-16 Thread John Crispin


On 16/01/2015 13:04, Luigi Tarenga wrote:
 Signed-off-by: Luigi Tarenga luigi.tare...@gmail.com
 ---
 I send the patch again, maybe it was not formatted correctly.
 please let me know if there is any problem in how i send it.
 
 regards
 Luigi
 ---
  package/libs/openssl/Makefile |  6 +++---
  package/libs/openssl/patches/150-no_engines.patch | 18 +-
  package/libs/openssl/patches/200-parallel_build.patch |  8 
  package/network/ipv6/map/Makefile |  7 ---
  package/network/ipv6/map/files/map.sh |  3 +++
  package/network/ipv6/map/src/mapcalc.c|  6 --
  6 files changed, 27 insertions(+), 21 deletions(-)
 


the diffstat is from a different patch



 diff --git a/target/linux/ar71xx/base-files/etc/diag.sh
 b/target/linux/ar71xx/base-files/etc/diag.sh
 index fa07f39..eb96338 100755
 --- a/target/linux/ar71xx/base-files/etc/diag.sh
 +++ b/target/linux/ar71xx/base-files/etc/diag.sh
 @@ -195,6 +195,7 @@ get_status_led() {
  tl-mr3220-v2 | \
  tl-mr3420 | \
  tl-mr3420-v2 | \
 +tl-wa701nd-v2 | \
  tl-wa801nd-v2 | \
  tl-wa901nd | \
  tl-wa901nd-v2 | \
 diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
 b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
 index 5b9dbe7..51c2bca 100755
 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
 +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds
 @@ -275,7 +275,11 @@ tl-wa850re)
  ucidef_set_led_rssi rssihigh RSSIHIGH tp-link:blue:signal5
 wlan0 80 100 -79 13
  ;;
 
 -tl-wa860re)
 +tl-wa701nd-v2 | \
 +tl-wa830re-v2 | \
 +tl-wa860re | \
 +tl-wa801nd-v2 | \
 +tl-wa901nd-v3)
  ucidef_set_led_netdev lan LAN tp-link:green:lan eth0
  ucidef_set_led_wlan wlan WLAN tp-link:green:wlan phy0tpt
  ;;
 @@ -333,11 +337,6 @@ tl-wr841n-v8)
  ucidef_set_led_wlan wlan WLAN tp-link:green:wlan phy0tpt
  ;;
 
 -tl-wa830re-v2)
 -ucidef_set_led_netdev lan LAN tp-link:green:lan eth0
 -ucidef_set_led_wlan wlan WLAN tp-link:green:wlan phy0tpt
 -;;
 -
  tl-wr841n-v9)
  ucidef_set_led_netdev wan WAN tp-link:green:wan eth1
  ucidef_set_led_switch lan1 LAN1 tp-link:green:lan1 switch0 0x10
 @@ -357,12 +356,6 @@ tl-wr842n-v2)
  ucidef_set_led_usbdev usb USB tp-link:green:3g 1-1
  ;;
 
 -tl-wa801nd-v2 | \
 -tl-wa901nd-v3)
 -ucidef_set_led_netdev lan LAN tp-link:green:lan eth0
 -ucidef_set_led_wlan wlan WLAN tp-link:green:wlan phy0tpt
 -;;
 -


this refactoring should be in a separate patch.


  tl-wr941nd | \
  tl-wr1041n-v2)
  ucidef_set_led_wlan wlan WLAN tp-link:green:wlan phy0tpt
 diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
 b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
 index c5cfd67..4be30b8 100755
 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
 +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network
 @@ -301,6 +301,7 @@ tl-mr13u |\
  tl-mr3020 |\
  tl-mr3040 |\
  tl-mr3040-v2 |\
 +tl-wa701nd-v2 |\
  tl-wa750re |\
  tl-wa850re |\
  tl-wa830re-v2 |\
 diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh
 b/target/linux/ar71xx/base-files/lib/ar71xx.sh
 index 1e96b6d..df35775 100755
 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
 +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
 @@ -571,6 +571,9 @@ ar71xx_board_detect() {
  *TL-MR3420 v2)
  name=tl-mr3420-v2
  ;;
 +*TL-WA701ND v2)
 +name=tl-wa701nd-v2
 +;;
  *TL-WA750RE)
  name=tl-wa750re
  ;;
 diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
 b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
 index 846954c..eeaac6a 100755
 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
 +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
 @@ -269,6 +269,7 @@ platform_check_image() {
  tl-mr3220-v2 | \
  tl-mr3420 | \
  tl-mr3420-v2 | \
 +tl-wa701nd-v2 | \
  tl-wa7510n | \
  tl-wa750re | \
  tl-wa850re | \
 diff --git a/target/linux/ar71xx/config-3.10 b/target/linux/ar71xx/config-3.10
 index 9a8378a..482914a 100644
 --- a/target/linux/ar71xx/config-3.10
 +++ b/target/linux/ar71xx/config-3.10
 @@ -88,6 +88,7 @@ CONFIG_ATH79_MACH_TL_MR11U=y
  CONFIG_ATH79_MACH_TL_MR13U=y
  CONFIG_ATH79_MACH_TL_MR3020=y
  CONFIG_ATH79_MACH_TL_MR3X20=y
 +CONFIG_ATH79_MACH_TL_WA701ND_V2=y
  CONFIG_ATH79_MACH_TL_WA830RE_V2=y
  CONFIG_ATH79_MACH_TL_WA901ND=y
  CONFIG_ATH79_MACH_TL_WA901ND_V2=y
 diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
 b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
 new file mode 100644
 index 000..aab92b3
 --- /dev/null
 +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wa701nd-v2.c
 @@ -0,0 +1,116 @@
 +/*
 + *  TP-LINK TL-WA701ND v2 board support
 + *
 + *  Copyright (C) 2015 Luigi Tarenga luigi.tare...@gmail.com
 + *
 + *  This program is