aredn/patches/001-add_support_for_TP-Link...

120 lines
4.7 KiB
Diff

Index: openwrt/target/linux/ar71xx/base-files/etc/board.d/01_leds
===================================================================
--- openwrt.orig/target/linux/ar71xx/base-files/etc/board.d/01_leds
+++ openwrt/target/linux/ar71xx/base-files/etc/board.d/01_leds
@@ -250,6 +250,7 @@ cf-e530n)
cpe210|\
cpe210-v2|\
cpe210-v3|\
+cpe220-v2|\
cpe220-v3|\
cpe510-v2|\
cpe510-v3|\
Index: openwrt/target/linux/ar71xx/base-files/etc/board.d/02_network
===================================================================
--- openwrt.orig/target/linux/ar71xx/base-files/etc/board.d/02_network
+++ openwrt/target/linux/ar71xx/base-files/etc/board.d/02_network
@@ -292,6 +292,7 @@ ar71xx_setup_interfaces()
"0@eth0" "2:lan" "1:wan" "6@eth1"
;;
cpe210|\
+ cpe220-v2|\
cpe220-v3|\
cpe510|\
wbs210|\
Index: openwrt/target/linux/ar71xx/base-files/lib/ar71xx.sh
===================================================================
--- openwrt.orig/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ openwrt/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -587,6 +587,10 @@ ar71xx_board_detect() {
name="cpe210-v3"
tplink_pharos_board_detect "$(tplink_pharos_v2_get_model_string)"
;;
+ *"CPE220 v2")
+ name="cpe220-v2"
+ tplink_pharos_board_detect "$(tplink_pharos_v2_get_model_string)"
+ ;;
*"CPE220 v3")
name="cpe220-v3"
tplink_pharos_board_detect "$(tplink_pharos_v2_get_model_string)"
Index: openwrt/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
===================================================================
--- openwrt.orig/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ openwrt/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -593,6 +593,7 @@ platform_check_image() {
tplink_pharos_check_image "$1" "01000000" "$(tplink_pharos_v2_get_model_string)" '\0\xff\r' && return 0
return 1
;;
+ cpe220-v2|\
cpe610|\
cpe510-v2|\
cpe510-v3)
Index: openwrt/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
===================================================================
--- openwrt.orig/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
+++ openwrt/target/linux/ar71xx/files/arch/mips/ath79/mach-cpe510.c
@@ -336,6 +336,9 @@ MIPS_MACHINE(ATH79_MACH_CPE210_V2, "CPE2
MIPS_MACHINE(ATH79_MACH_CPE210_V3, "CPE210V3", "TP-LINK CPE210 v3",
cpe210_v2_setup);
+MIPS_MACHINE(ATH79_MACH_CPE220_V2, "CPE220V2", "TP-LINK CPE220 v2",
+ cpe210_setup);
+
MIPS_MACHINE(ATH79_MACH_CPE220_V3, "CPE220V3", "TP-LINK CPE220 v3",
cpe220_v3_setup);
Index: openwrt/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
===================================================================
--- openwrt.orig/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
+++ openwrt/target/linux/ar71xx/files/arch/mips/ath79/machtypes.h
@@ -76,6 +76,7 @@ enum ath79_mach_type {
ATH79_MACH_CPE210, /* TP-LINK CPE210 v1 */
ATH79_MACH_CPE210_V2, /* TP-LINK CPE210 v2 */
ATH79_MACH_CPE210_V3, /* TP-LINK CPE210 v3 */
+ ATH79_MACH_CPE220_V2, /* TP-LINK CPE220 v2 */
ATH79_MACH_CPE220_V3, /* TP-LINK CPE220 v3 */
ATH79_MACH_CPE510_V2, /* TP-LINK CPE510 v2 */
ATH79_MACH_CPE510_V3, /* TP-LINK CPE510 v3 */
Index: openwrt/target/linux/ar71xx/image/generic-tp-link.mk
===================================================================
--- openwrt.orig/target/linux/ar71xx/image/generic-tp-link.mk
+++ openwrt/target/linux/ar71xx/image/generic-tp-link.mk
@@ -216,6 +216,14 @@ define Device/cpe210-v3
endef
TARGET_DEVICES += cpe210-v3
+define Device/cpe220-v2
+ $(Device/cpe510-520-v1)
+ DEVICE_TITLE := TP-LINK CPE220 v2
+ BOARDNAME := CPE220V2
+ TPLINK_BOARD_ID := CPE210
+endef
+TARGET_DEVICES += cpe220-v2
+
define Device/cpe220-v3
$(Device/cpe210-v2)
DEVICE_TITLE := TP-LINK CPE220 v3
Index: openwrt/tools/firmware-utils/src/tplink-safeloader.c
===================================================================
--- openwrt.orig/tools/firmware-utils/src/tplink-safeloader.c
+++ openwrt/tools/firmware-utils/src/tplink-safeloader.c
@@ -131,7 +131,17 @@ static struct device_info boards[] = {
"CPE210(TP-LINK|EU|N300-2):1.1\r\n"
"CPE220(TP-LINK|UN|N300-2):1.1\r\n"
"CPE220(TP-LINK|US|N300-2):1.1\r\n"
- "CPE220(TP-LINK|EU|N300-2):1.1\r\n",
+ "CPE220(TP-LINK|EU|N300-2):1.1\r\n"
+ "CPE220(TP-LINK|EU|N300-2|00000000):2.0\r\n"
+ "CPE220(TP-LINK|EU|N300-2|45550000):2.0\r\n"
+ "CPE220(TP-LINK|EU|N300-2|55530000):2.0\r\n"
+ "CPE220(TP-LINK|UN|N300-2|00000000):2.0\r\n"
+ "CPE220(TP-LINK|UN|N300-2|45550000):2.0\r\n"
+ "CPE220(TP-LINK|UN|N300-2|55530000):2.0\r\n"
+ "CPE220(TP-LINK|US|N300-2|55530000):2.0\r\n"
+ "CPE220(TP-LINK|UN|N300-2):2.0\r\n"
+ "CPE220(TP-LINK|EU|N300-2):2.0\r\n"
+ "CPE220(TP-LINK|US|N300-2):2.0\r\n",
.support_trail = '\xff',
.soft_ver = NULL,