0020-Backport-support-for-TL-WR842N-v2-and-TL-MR3420-v2.patch 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Thu, 1 May 2014 02:26:02 +0200
  3. Subject: Backport support for TL-WR842N v2 and TL-MR3420 v2
  4. diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
  5. index 0bf2dd1..0d01119 100755
  6. --- a/target/linux/ar71xx/base-files/etc/diag.sh
  7. +++ b/target/linux/ar71xx/base-files/etc/diag.sh
  8. @@ -127,6 +127,7 @@ get_status_led() {
  9. ;;
  10. tl-mr3220 | \
  11. tl-mr3420 | \
  12. + tl-mr3420-v2 | \
  13. tl-wa901nd | \
  14. tl-wa901nd-v2 | \
  15. tl-wdr3500 | \
  16. @@ -137,6 +138,7 @@ get_status_led() {
  17. tl-wr841n-v1 | \
  18. tl-wr841n-v7 | \
  19. tl-wr841n-v8 | \
  20. + tl-wr842n-v2 | \
  21. tl-wr941nd)
  22. status_led="tp-link:green:system"
  23. ;;
  24. diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/leds b/target/linux/ar71xx/base-files/etc/uci-defaults/leds
  25. index 43bc24d..f1ac9ec 100755
  26. --- a/target/linux/ar71xx/base-files/etc/uci-defaults/leds
  27. +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/leds
  28. @@ -118,6 +118,16 @@ tl-mr3420 )
  29. ucidef_set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
  30. ;;
  31. +tl-mr3420-v2)
  32. + ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
  33. + ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
  34. + ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
  35. + ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
  36. + ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
  37. + ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  38. + ucidef_set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
  39. + ;;
  40. +
  41. tl-wa901nd)
  42. ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0"
  43. ;;
  44. @@ -172,6 +182,16 @@ tl-wr841n-v9)
  45. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  46. ;;
  47. +tl-wr842n-v2)
  48. + ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
  49. + ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
  50. + ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
  51. + ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10"
  52. + ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
  53. + ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  54. + ucidef_set_led_usbdev "usb" "USB" "tp-link:green:3g" "1-1"
  55. + ;;
  56. +
  57. tl-wr941nd | \
  58. tl-wr1041n-v2)
  59. ucidef_set_led_wlan "wlan" "WLAN" "tp-link:green:wlan" "phy0tpt"
  60. diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/network b/target/linux/ar71xx/base-files/etc/uci-defaults/network
  61. index a1dfda0..e38a9b8 100755
  62. --- a/target/linux/ar71xx/base-files/etc/uci-defaults/network
  63. +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/network
  64. @@ -128,7 +128,9 @@ tl-wr941nd)
  65. ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
  66. ;;
  67. -tl-wr841n-v8)
  68. +tl-mr3420-v2 |\
  69. +tl-wr841n-v8 |\
  70. +tl-wr842n-v2)
  71. ucidef_set_interfaces_lan_wan "eth1" "eth0"
  72. ucidef_add_switch "switch0" "1" "1"
  73. ucidef_add_switch_vlan "switch0" "1" "0 1 2 3 4"
  74. diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
  75. index ca174da..11aa31b 100755
  76. --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
  77. +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
  78. @@ -351,6 +351,9 @@ ar71xx_board_detect() {
  79. *TL-MR3420)
  80. name="tl-mr3420"
  81. ;;
  82. + *"TL-MR3420 v2")
  83. + name="tl-mr3420-v2"
  84. + ;;
  85. *TL-WA7510N)
  86. name="tl-wa7510n"
  87. ;;
  88. @@ -384,6 +387,9 @@ ar71xx_board_detect() {
  89. *"TL-WR841N/ND v9")
  90. name="tl-wr841n-v9"
  91. ;;
  92. + *"TL-WR842N/ND v2")
  93. + name="tl-wr842n-v2"
  94. + ;;
  95. *TL-WR941ND)
  96. name="tl-wr941nd"
  97. ;;
  98. diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  99. index 7168b4e..b25df6c 100755
  100. --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  101. +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
  102. @@ -152,6 +152,7 @@ platform_check_image() {
  103. tl-mr3040 | \
  104. tl-mr3220 | \
  105. tl-mr3420 | \
  106. + tl-mr3420-v2 | \
  107. tl-wa7510n | \
  108. tl-wa901nd | \
  109. tl-wa901nd-v2 | \
  110. @@ -164,6 +165,7 @@ platform_check_image() {
  111. tl-wr841n-v7 | \
  112. tl-wr841n-v8 | \
  113. tl-wr841n-v9 | \
  114. + tl-wr842n-v2 | \
  115. tl-wr941nd | \
  116. tl-wr1041n-v2 | \
  117. tl-wr1043nd | \
  118. diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c
  119. index ffaf8d1..0099b15 100644
  120. --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c
  121. +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-tl-wr841n-v8.c
  122. @@ -1,5 +1,5 @@
  123. /*
  124. - * TP-LINK TL-WR841N/ND v8 board support
  125. + * TP-LINK TL-WR841N/ND v8/TL-MR3420 v2 board support
  126. *
  127. * Copyright (C) 2012 Gabor Juhos <juhosg@openwrt.org>
  128. *
  129. @@ -8,6 +8,7 @@
  130. * by the Free Software Foundation.
  131. */
  132. +#include <linux/gpio.h>
  133. #include <linux/platform_device.h>
  134. #include <asm/mach-ath79/ath79.h>
  135. @@ -18,6 +19,7 @@
  136. #include "dev-gpio-buttons.h"
  137. #include "dev-leds-gpio.h"
  138. #include "dev-m25p80.h"
  139. +#include "dev-usb.h"
  140. #include "dev-wmac.h"
  141. #include "machtypes.h"
  142. @@ -31,7 +33,10 @@
  143. #define TL_WR841NV8_GPIO_LED_SYSTEM 14
  144. #define TL_WR841NV8_GPIO_BTN_RESET 17
  145. -#define TL_WR841NV8_GPIO_SW_RFKILL 16
  146. +#define TL_WR841NV8_GPIO_SW_RFKILL 16 /* WPS for MR3420 v2 */
  147. +
  148. +#define TL_MR3420V2_GPIO_LED_3G 11
  149. +#define TL_MR3420V2_GPIO_USB_POWER 4
  150. #define TL_WR841NV8_KEYS_POLL_INTERVAL 20 /* msecs */
  151. #define TL_WR841NV8_KEYS_DEBOUNCE_INTERVAL (3 * TL_WR841NV8_KEYS_POLL_INTERVAL)
  152. @@ -78,6 +83,11 @@ static struct gpio_led tl_wr841n_v8_leds_gpio[] __initdata = {
  153. .name = "tp-link:green:wlan",
  154. .gpio = TL_WR841NV8_GPIO_LED_WLAN,
  155. .active_low = 1,
  156. + }, {
  157. + /* the 3G LED is only present on the MR3420 v2 */
  158. + .name = "tp-link:green:3g",
  159. + .gpio = TL_MR3420V2_GPIO_LED_3G,
  160. + .active_low = 1,
  161. },
  162. };
  163. @@ -99,17 +109,37 @@ static struct gpio_keys_button tl_wr841n_v8_gpio_keys[] __initdata = {
  164. }
  165. };
  166. -static void __init tl_wr841n_v8_setup(void)
  167. +static struct gpio_keys_button tl_mr3420v2_gpio_keys[] __initdata = {
  168. + {
  169. + .desc = "Reset button",
  170. + .type = EV_KEY,
  171. + .code = KEY_RESTART,
  172. + .debounce_interval = TL_WR841NV8_KEYS_DEBOUNCE_INTERVAL,
  173. + .gpio = TL_WR841NV8_GPIO_BTN_RESET,
  174. + .active_low = 1,
  175. + }, {
  176. + .desc = "WPS",
  177. + .type = EV_KEY,
  178. + .code = KEY_WPS_BUTTON,
  179. + .debounce_interval = TL_WR841NV8_KEYS_DEBOUNCE_INTERVAL,
  180. + .gpio = TL_WR841NV8_GPIO_SW_RFKILL,
  181. + .active_low = 0,
  182. + }
  183. +};
  184. +
  185. +static void __init tl_ap123_setup(void)
  186. {
  187. u8 *mac = (u8 *) KSEG1ADDR(0x1f01fc00);
  188. u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
  189. - ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio),
  190. - tl_wr841n_v8_leds_gpio);
  191. + /* Disable JTAG, enabling GPIOs 0-3 */
  192. + /* Configure OBS4 line, for GPIO 4*/
  193. + ath79_gpio_function_setup(AR934X_GPIO_FUNC_JTAG_DISABLE,
  194. + AR934X_GPIO_FUNC_CLK_OBS4_EN);
  195. - ath79_register_gpio_keys_polled(1, TL_WR841NV8_KEYS_POLL_INTERVAL,
  196. - ARRAY_SIZE(tl_wr841n_v8_gpio_keys),
  197. - tl_wr841n_v8_gpio_keys);
  198. + /* config gpio4 as normal gpio function */
  199. + ath79_gpio_output_select(TL_MR3420V2_GPIO_USB_POWER,
  200. + AR934X_GPIO_OUT_GPIO);
  201. ath79_register_m25p80(&tl_wr841n_v8_flash_data);
  202. @@ -135,5 +165,61 @@ static void __init tl_wr841n_v8_setup(void)
  203. ath79_register_wmac(ee, mac);
  204. }
  205. +static void __init tl_wr841n_v8_setup(void)
  206. +{
  207. + tl_ap123_setup();
  208. +
  209. + ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio) - 1,
  210. + tl_wr841n_v8_leds_gpio);
  211. +
  212. + ath79_register_gpio_keys_polled(1, TL_WR841NV8_KEYS_POLL_INTERVAL,
  213. + ARRAY_SIZE(tl_wr841n_v8_gpio_keys),
  214. + tl_wr841n_v8_gpio_keys);
  215. +}
  216. +
  217. MIPS_MACHINE(ATH79_MACH_TL_WR841N_V8, "TL-WR841N-v8", "TP-LINK TL-WR841N/ND v8",
  218. tl_wr841n_v8_setup);
  219. +
  220. +
  221. +static void __init tl_wr842n_v2_setup(void)
  222. +{
  223. + tl_ap123_setup();
  224. +
  225. + ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio),
  226. + tl_wr841n_v8_leds_gpio);
  227. +
  228. + ath79_register_gpio_keys_polled(1, TL_WR841NV8_KEYS_POLL_INTERVAL,
  229. + ARRAY_SIZE(tl_wr841n_v8_gpio_keys),
  230. + tl_wr841n_v8_gpio_keys);
  231. +
  232. + gpio_request_one(TL_MR3420V2_GPIO_USB_POWER,
  233. + GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
  234. + "USB power");
  235. +
  236. + ath79_register_usb();
  237. +}
  238. +
  239. +MIPS_MACHINE(ATH79_MACH_TL_WR842N_V2, "TL-WR842N-v2", "TP-LINK TL-WR842N/ND v2",
  240. + tl_wr842n_v2_setup);
  241. +
  242. +static void __init tl_mr3420v2_setup(void)
  243. +{
  244. + tl_ap123_setup();
  245. +
  246. + ath79_register_leds_gpio(-1, ARRAY_SIZE(tl_wr841n_v8_leds_gpio),
  247. + tl_wr841n_v8_leds_gpio);
  248. +
  249. + ath79_register_gpio_keys_polled(1, TL_WR841NV8_KEYS_POLL_INTERVAL,
  250. + ARRAY_SIZE(tl_mr3420v2_gpio_keys),
  251. + tl_mr3420v2_gpio_keys);
  252. +
  253. + /* enable power for the USB port */
  254. + gpio_request_one(TL_MR3420V2_GPIO_USB_POWER,
  255. + GPIOF_OUT_INIT_HIGH | GPIOF_EXPORT_DIR_FIXED,
  256. + "USB power");
  257. +
  258. + ath79_register_usb();
  259. +}
  260. +
  261. +MIPS_MACHINE(ATH79_MACH_TL_MR3420_V2, "TL-MR3420-v2", "TP-LINK TL-MR3420 v2",
  262. + tl_mr3420v2_setup);
  263. diff --git a/target/linux/ar71xx/image/Makefile b/target/linux/ar71xx/image/Makefile
  264. index c270f73..a055521 100644
  265. --- a/target/linux/ar71xx/image/Makefile
  266. +++ b/target/linux/ar71xx/image/Makefile
  267. @@ -853,7 +853,7 @@ $(eval $(call SingleProfile,Planex,$(fs_64k),MZKW300NH,mzk-w300nh,MZK-W300NH,tty
  268. $(eval $(call SingleProfile,TPLINKOLD,$(fs_squash),TLWR841NV15,tl-wr841nd-v1.5,TL-WR841N-v1.5,ttyS0,115200,0x08410002,2,4M))
  269. $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLMR3220,tl-mr3220-v1,TL-MR3220,ttyS0,115200,0x32200001,1,4M))
  270. -$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLMR3420,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,4M))
  271. +$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLMR3420V1,tl-mr3420-v1,TL-MR3420,ttyS0,115200,0x34200001,1,4M))
  272. $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWA701,tl-wa701n-v1,TL-WA901ND,ttyS0,115200,0x07010001,1,4M))
  273. $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWA7510NV1,tl-wa7510n,TL-WA7510N,ttyS0,115200,0x75100001,1,4M))
  274. $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWA901NV1,tl-wa901nd-v1,TL-WA901ND,ttyS0,115200,0x09010001,1,4M))
  275. @@ -866,7 +866,7 @@ $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR743,tl-wr743nd-v1,TL-WR741ND
  276. $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR841NV3,tl-wr841nd-v3,TL-WR941ND,ttyS0,115200,0x08410003,3,4M))
  277. $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR841NV5,tl-wr841nd-v5,TL-WR741ND,ttyS0,115200,0x08410005,1,4M))
  278. $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR841NV7,tl-wr841nd-v7,TL-WR841N-v7,ttyS0,115200,0x08410007,1,4M))
  279. -$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR842,tl-wr842n-v1,TL-MR3420,ttyS0,115200,0x08420001,1,8M))
  280. +$(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR842V1,tl-wr842n-v1,TL-MR3420,ttyS0,115200,0x08420001,1,8M))
  281. $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR941NV2,tl-wr941nd-v2,TL-WR941ND,ttyS0,115200,0x09410002,2,4M))
  282. $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR941NV3,tl-wr941nd-v3,TL-WR941ND,ttyS0,115200,0x09410002,2,4M))
  283. $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR941NV4,tl-wr941nd-v4,TL-WR741ND,ttyS0,115200,0x09410004,1,4M))
  284. @@ -875,11 +875,13 @@ $(eval $(call SingleProfile,TPLINK,$(fs_64kraw),TLWR1043,tl-wr1043nd-v1,TL-WR104
  285. $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR11U,tl-mr11u-v1,TL-MR11U,ttyATH0,115200,0x00110101,1,4Mlzma))
  286. $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3020,tl-mr3020-v1,TL-MR3020,ttyATH0,115200,0x30200001,1,4Mlzma))
  287. $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3040,tl-mr3040-v1,TL-MR3040,ttyATH0,115200,0x30400001,1,4Mlzma))
  288. +$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLMR3420V2,tl-mr3420-v2,TL-MR3420-v2,ttyS0,115200,0x34200002,1,4Mlzma))
  289. $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR703,tl-wr703n-v1,TL-WR703N,ttyATH0,115200,0x07030101,1,4Mlzma))
  290. $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR740NV4,tl-wr740n-v4,TL-WR741ND-v4,ttyATH0,115200,0x07400004,1,4Mlzma))
  291. $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR741NV4,tl-wr741nd-v4,TL-WR741ND-v4,ttyATH0,115200,0x07410004,1,4Mlzma))
  292. $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR841NV8,tl-wr841n-v8,TL-WR841N-v8,ttyS0,115200,0x08410008,1,4Mlzma))
  293. $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR841NV9,tl-wr841n-v9,TL-WR841N-v9,ttyS0,115200,0x08410009,1,4Mlzma))
  294. +$(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR842V2,tl-wr842n-v2,TL-WR842N-v2,ttyS0,115200,0x8420002,1,8Mlzma))
  295. $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR1041,tl-wr1041n-v2,TL-WR1041N-v2,ttyS0,115200,0x10410002,1,4Mlzma))
  296. $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWR2543,tl-wr2543-v1,TL-WR2543N,ttyS0,115200,0x25430001,1,8Mlzma,-v 3.13.99))
  297. $(eval $(call SingleProfile,TPLINK-LZMA,$(fs_64kraw),TLWDR3500V1,tl-wdr3500-v1,TL-WDR3500,ttyS0,115200,0x35000001,1,8Mlzma))
  298. @@ -921,11 +923,13 @@ $(eval $(call SingleProfile,ZyXEL,$(fs_64k),NBG_460N_550N_550NH,nbg460n_550n_550
  299. $(eval $(call MultiProfile,AP121,AP121_2M AP121_4M))
  300. $(eval $(call MultiProfile,EWDORIN, EWDORINAP EWDORINRT))
  301. $(eval $(call MultiProfile,TEW652BRP,TEW652BRP_FW TEW652BRP_RECOVERY))
  302. +$(eval $(call MultiProfile,TLMR3420,TLMR3420V1 TLMR3420V2))
  303. $(eval $(call MultiProfile,TLWA901,TLWA901NV1 TLWA901NV2))
  304. $(eval $(call MultiProfile,TLWA7510,TLWA7510NV1))
  305. $(eval $(call MultiProfile,TLWR740,TLWR740NV1 TLWR740NV3 TLWR740NV4))
  306. $(eval $(call MultiProfile,TLWR741,TLWR741NV1 TLWR741NV2 TLWR741NV4))
  307. $(eval $(call MultiProfile,TLWR841,TLWR841NV15 TLWR841NV3 TLWR841NV5 TLWR841NV7 TLWR841NV8 TLWR841NV9))
  308. +$(eval $(call MultiProfile,TLWR842,TLWR842V1 TLWR842V2))
  309. $(eval $(call MultiProfile,TLWR941,TLWR941NV2 TLWR941NV3 TLWR941NV4))
  310. $(eval $(call MultiProfile,TLWDR4300,TLWDR3500V1 TLWDR3600V1 TLWDR4300V1 TLWDR4310V1))
  311. $(eval $(call MultiProfile,UBNT,UBNTAIRROUTER UBNTRS UBNTRSPRO UBNTLSSR71 UBNTBULLETM UBNTROCKETM UBNTNANOM UBNTUNIFI UBNTUNIFIOUTDOOR))
  312. diff --git a/target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch b/target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch
  313. index 0230908..6d67f5f 100644
  314. --- a/target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch
  315. +++ b/target/linux/ar71xx/patches-3.3/610-MIPS-ath79-openwrt-machines.patch
  316. @@ -1,6 +1,6 @@
  317. --- a/arch/mips/ath79/machtypes.h
  318. +++ b/arch/mips/ath79/machtypes.h
  319. -@@ -16,18 +16,102 @@
  320. +@@ -16,18 +16,104 @@
  321. enum ath79_mach_type {
  322. ATH79_MACH_GENERIC = 0,
  323. @@ -61,6 +61,7 @@
  324. + ATH79_MACH_TL_MR3040, /* TP-LINK TL-MR3040 */
  325. + ATH79_MACH_TL_MR3220, /* TP-LINK TL-MR3220 */
  326. + ATH79_MACH_TL_MR3420, /* TP-LINK TL-MR3420 */
  327. ++ ATH79_MACH_TL_MR3420_V2, /* TP-LINK TL-MR3420 v2 */
  328. + ATH79_MACH_TL_WA901ND, /* TP-LINK TL-WA901ND */
  329. + ATH79_MACH_TL_WA901ND_V2, /* TP-LINK TL-WA901ND v2 */
  330. + ATH79_MACH_TL_WDR4300, /* TP-LINK TL-WDR4300 */
  331. @@ -73,6 +74,7 @@
  332. + ATH79_MACH_TL_WR841N_V1, /* TP-LINK TL-WR841N v1 */
  333. + ATH79_MACH_TL_WR841N_V7, /* TP-LINK TL-WR841N/ND v7 */
  334. + ATH79_MACH_TL_WR841N_V8, /* TP-LINK TL-WR841N/ND v8 */
  335. ++ ATH79_MACH_TL_WR842N_V2, /* TP-LINK TL-WR842N/ND v2 */
  336. + ATH79_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */
  337. ATH79_MACH_UBNT_AIRROUTER, /* Ubiquiti AirRouter */
  338. ATH79_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */
  339. diff --git a/target/linux/ar71xx/patches-3.3/612-MIPS-ath79-TL-WA7510N-v1-support.patch b/target/linux/ar71xx/patches-3.3/612-MIPS-ath79-TL-WA7510N-v1-support.patch
  340. index 6bd58b0..dba879e 100644
  341. --- a/target/linux/ar71xx/patches-3.3/612-MIPS-ath79-TL-WA7510N-v1-support.patch
  342. +++ b/target/linux/ar71xx/patches-3.3/612-MIPS-ath79-TL-WA7510N-v1-support.patch
  343. @@ -1,9 +1,9 @@
  344. --- a/arch/mips/ath79/machtypes.h
  345. +++ b/arch/mips/ath79/machtypes.h
  346. -@@ -74,6 +74,7 @@ enum ath79_mach_type {
  347. - ATH79_MACH_TL_MR3040, /* TP-LINK TL-MR3040 */
  348. +@@ -75,6 +75,7 @@ enum ath79_mach_type {
  349. ATH79_MACH_TL_MR3220, /* TP-LINK TL-MR3220 */
  350. ATH79_MACH_TL_MR3420, /* TP-LINK TL-MR3420 */
  351. + ATH79_MACH_TL_MR3420_V2, /* TP-LINK TL-MR3420 v2 */
  352. + ATH79_MACH_TL_WA7510N_V1, /* TP-LINK TL-WA7510N v1*/
  353. ATH79_MACH_TL_WA901ND, /* TP-LINK TL-WA901ND */
  354. ATH79_MACH_TL_WA901ND_V2, /* TP-LINK TL-WA901ND v2 */
  355. diff --git a/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-add-TL-WDR3500-support.patch b/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-add-TL-WDR3500-support.patch
  356. index 0a2c3bd..059089b 100644
  357. --- a/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-add-TL-WDR3500-support.patch
  358. +++ b/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-add-TL-WDR3500-support.patch
  359. @@ -1,6 +1,6 @@
  360. --- a/arch/mips/ath79/machtypes.h
  361. +++ b/arch/mips/ath79/machtypes.h
  362. -@@ -84,6 +84,7 @@ enum ath79_mach_type {
  363. +@@ -78,6 +78,7 @@ enum ath79_mach_type {
  364. ATH79_MACH_TL_WA7510N_V1, /* TP-LINK TL-WA7510N v1*/
  365. ATH79_MACH_TL_WA901ND, /* TP-LINK TL-WA901ND */
  366. ATH79_MACH_TL_WA901ND_V2, /* TP-LINK TL-WA901ND v2 */
  367. @@ -10,7 +10,7 @@
  368. ATH79_MACH_TL_WR1043ND, /* TP-LINK TL-WR1043ND */
  369. --- a/arch/mips/ath79/Kconfig
  370. +++ b/arch/mips/ath79/Kconfig
  371. -@@ -514,6 +514,17 @@ config ATH79_MACH_TL_WA901ND_V2
  372. +@@ -469,6 +469,17 @@ config ATH79_MACH_TL_WA901ND_V2
  373. select ATH79_DEV_M25P80
  374. select ATH79_DEV_WMAC
  375. @@ -30,7 +30,7 @@
  376. select SOC_AR934X
  377. --- a/arch/mips/ath79/Makefile
  378. +++ b/arch/mips/ath79/Makefile
  379. -@@ -81,6 +81,7 @@ obj-$(CONFIG_ATH79_MACH_TL_MR3020) += ma
  380. +@@ -78,6 +78,7 @@ obj-$(CONFIG_ATH79_MACH_TL_MR3020) += ma
  381. obj-$(CONFIG_ATH79_MACH_TL_MR3X20) += mach-tl-mr3x20.o
  382. obj-$(CONFIG_ATH79_MACH_TL_WA901ND) += mach-tl-wa901nd.o
  383. obj-$(CONFIG_ATH79_MACH_TL_WA901ND_V2) += mach-tl-wa901nd-v2.o
  384. diff --git a/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-ubnt-xm-add-unifi-outdoor.patch b/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-ubnt-xm-add-unifi-outdoor.patch
  385. index 8a1c770..9766afe 100644
  386. --- a/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-ubnt-xm-add-unifi-outdoor.patch
  387. +++ b/target/linux/ar71xx/patches-3.3/613-MIPS-ath79-ubnt-xm-add-unifi-outdoor.patch
  388. @@ -56,7 +56,7 @@
  389. + ubnt_unifi_outdoor_setup);
  390. --- a/arch/mips/ath79/machtypes.h
  391. +++ b/arch/mips/ath79/machtypes.h
  392. -@@ -97,6 +97,7 @@ enum ath79_mach_type {
  393. +@@ -100,6 +100,7 @@ enum ath79_mach_type {
  394. ATH79_MACH_UBNT_RSPRO, /* Ubiquiti RouterStation Pro */
  395. ATH79_MACH_UBNT_RS, /* Ubiquiti RouterStation */
  396. ATH79_MACH_UBNT_UNIFI, /* Ubiquiti Unifi */
  397. diff --git a/target/linux/ar71xx/patches-3.3/708-MIPS-ath79-TL-WR841v9-support.patch b/target/linux/ar71xx/patches-3.3/708-MIPS-ath79-TL-WR841v9-support.patch
  398. index 37425a6..612970b 100644
  399. --- a/target/linux/ar71xx/patches-3.3/708-MIPS-ath79-TL-WR841v9-support.patch
  400. +++ b/target/linux/ar71xx/patches-3.3/708-MIPS-ath79-TL-WR841v9-support.patch
  401. @@ -33,6 +33,6 @@
  402. ATH79_MACH_TL_WR841N_V7, /* TP-LINK TL-WR841N/ND v7 */
  403. ATH79_MACH_TL_WR841N_V8, /* TP-LINK TL-WR841N/ND v8 */
  404. + ATH79_MACH_TL_WR841N_V9, /* TP-LINK TL-WR841N/ND v9 */
  405. + ATH79_MACH_TL_WR842N_V2, /* TP-LINK TL-WR842N/ND v2 */
  406. ATH79_MACH_TL_WR941ND, /* TP-LINK TL-WR941ND */
  407. ATH79_MACH_UBNT_AIRROUTER, /* Ubiquiti AirRouter */
  408. - ATH79_MACH_UBNT_BULLET_M, /* Ubiquiti Bullet M */