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 e101d557bd..867fa9d381 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/01_leds +++ b/target/linux/ar71xx/base-files/etc/board.d/01_leds @@ -325,6 +325,10 @@ rb-mapl-2nd) ucidef_set_led_netdev "lan" "LAN" "rb:green:eth" "eth0" ucidef_set_led_wlan "wlan" "WLAN" "rb:green:wlan" "phy0tpt" ;; +rb-wap-2nd) + ucidef_set_led_timer "user" "USER" "rb:green:user" "1000" "1000" + ucidef_set_led_wlan "wlan" "WLAN" "rb:green:wlan" "phy0tpt" + ;; dap-2695-a1) ucidef_set_led_default "power" "POWER" "d-link:green:power" "1" ucidef_set_led_default "diag" "DIAG" "d-link:red:power" "0" 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 f8060f401c..5aef2058c2 100755 --- a/target/linux/ar71xx/base-files/etc/board.d/02_network +++ b/target/linux/ar71xx/base-files/etc/board.d/02_network @@ -101,6 +101,7 @@ ar71xx_setup_interfaces() rb-mapl-2nd|\ rb-sxt2n|\ rb-sxt5n|\ + rb-wap-2nd|\ re450|\ rocket-m-xw|\ sc300m |\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 7c381c00f3..702ed215ca 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -974,6 +974,9 @@ ar71xx_board_detect() { *"RouterBOARD SXT Lite5") name="rb-sxt5n" ;; + *"RouterBOARD wAP 2nD r2") + name="rb-wap-2nd" + ;; *"RouterStation") name="routerstation" ;; diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 210e4a2970..4639ae32cf 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -666,7 +666,8 @@ platform_check_image() { rb-952ui-5ac2nd|\ rb-962uigs-5hact2hnt|\ rb-lhg-5nd|\ - rb-mapl-2nd) + rb-mapl-2nd|\ + rb-wap-2nd) return 0 ;; esac @@ -725,7 +726,8 @@ platform_pre_upgrade() { rb-952ui-5ac2nd|\ rb-962uigs-5hact2hnt|\ rb-lhg-5nd|\ - rb-mapl-2nd) + rb-mapl-2nd|\ + rb-wap-2nd) # erase firmware if booted from initramfs [ -z "$(rootfs_type)" ] && mtd erase firmware ;; diff --git a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt index 0380b09c71..77e523bcc4 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt +++ b/target/linux/ar71xx/files/arch/mips/ath79/Kconfig.openwrt @@ -1035,7 +1035,7 @@ config ATH79_MACH_RBSPI MikroTik RouterBOARD LHG 5 MikroTik RouterBOARD cAP (EXPERIMENTAL) MikroTik RouterBOARD mAP (EXPERIMENTAL) - MikroTik RouterBOARD wAP (EXPERIMENTAL) + MikroTik RouterBOARD wAP config ATH79_MACH_RBSXTLITE bool "MikroTik RouterBOARD SXT Lite" diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c index 1045dfc6e7..2e1ecd0f52 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-rbspi.c @@ -10,9 +10,9 @@ * - MikroTik RouterBOARD 750P-PBr2 * - MikroTik RouterBOARD 750 r2 * - MikroTik RouterBOARD LHG 5nD + * - MikroTik RouterBOARD wAP2nD * * Preliminary support for the following hardware - * - MikroTik RouterBOARD wAP2nD * - MikroTik RouterBOARD cAP2nD * - MikroTik RouterBOARD mAP2nD * Furthermore, the cAP lite (cAPL2nD) appears to feature the exact same @@ -873,7 +873,7 @@ static void __init rblhg_setup(void) } /* - * Init the wAP hardware (EXPERIMENTAL). + * Init the wAP hardware. * The wAP 2nD has a single ethernet port. */ static void __init rbwap_setup(void) @@ -889,6 +889,11 @@ static void __init rbwap_setup(void) rbspi_network_setup(flags, 0, 1, 0); ath79_register_leds_gpio(-1, ARRAY_SIZE(rbwap_leds), rbwap_leds); + + /* wAP has a single reset button as GPIO 16 */ + ath79_register_gpio_keys_polled(-1, RBSPI_KEYS_POLL_INTERVAL, + ARRAY_SIZE(rbspi_gpio_keys_reset16), + rbspi_gpio_keys_reset16); } /* diff --git a/target/linux/ar71xx/image/mikrotik.mk b/target/linux/ar71xx/image/mikrotik.mk index 8f7d7cce98..5ee3eee65e 100644 --- a/target/linux/ar71xx/image/mikrotik.mk +++ b/target/linux/ar71xx/image/mikrotik.mk @@ -30,7 +30,7 @@ define Device/rb-nor-flash-16M LOADER_TYPE := elf KERNEL_INSTALL := 1 KERNEL := kernel-bin | lzma | loader-kernel - SUPPORTED_DEVICES := rb-750-r2 rb-750up-r2 rb-750p-pbr2 rb-941-2nd rb-951ui-2nd rb-952ui-5ac2nd rb-962uigs-5hact2hnt rb-lhg-5nd rb-mapl-2nd + SUPPORTED_DEVICES := rb-750-r2 rb-750up-r2 rb-750p-pbr2 rb-941-2nd rb-951ui-2nd rb-952ui-5ac2nd rb-962uigs-5hact2hnt rb-lhg-5nd rb-mapl-2nd rb-wap-2nd IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 -e | pad-to $$$$(BLOCKSIZE) | \ append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) endef diff --git a/target/linux/ar71xx/patches-4.4/701-MIPS-ath79-add-routerboard-detection.patch b/target/linux/ar71xx/patches-4.4/701-MIPS-ath79-add-routerboard-detection.patch index cd91ac3c02..fc3091ec65 100644 --- a/target/linux/ar71xx/patches-4.4/701-MIPS-ath79-add-routerboard-detection.patch +++ b/target/linux/ar71xx/patches-4.4/701-MIPS-ath79-add-routerboard-detection.patch @@ -1,6 +1,6 @@ --- a/arch/mips/ath79/prom.c +++ b/arch/mips/ath79/prom.c -@@ -136,6 +136,27 @@ void __init prom_init(void) +@@ -136,6 +136,28 @@ void __init prom_init(void) initrd_end = initrd_start + fw_getenvl("initrd_size"); } #endif @@ -20,6 +20,7 @@ + strstr(arcs_cmdline, "board=962") || + strstr(arcs_cmdline, "board=lhg") || + strstr(arcs_cmdline, "board=map-hb") || ++ strstr(arcs_cmdline, "board=wap-hb") || + strstr(arcs_cmdline, "board=2011L") || + strstr(arcs_cmdline, "board=2011r") || + strstr(arcs_cmdline, "board=711Gr100") || diff --git a/target/linux/ar71xx/patches-4.9/701-MIPS-ath79-add-routerboard-detection.patch b/target/linux/ar71xx/patches-4.9/701-MIPS-ath79-add-routerboard-detection.patch index cd91ac3c02..fc3091ec65 100644 --- a/target/linux/ar71xx/patches-4.9/701-MIPS-ath79-add-routerboard-detection.patch +++ b/target/linux/ar71xx/patches-4.9/701-MIPS-ath79-add-routerboard-detection.patch @@ -1,6 +1,6 @@ --- a/arch/mips/ath79/prom.c +++ b/arch/mips/ath79/prom.c -@@ -136,6 +136,27 @@ void __init prom_init(void) +@@ -136,6 +136,28 @@ void __init prom_init(void) initrd_end = initrd_start + fw_getenvl("initrd_size"); } #endif @@ -20,6 +20,7 @@ + strstr(arcs_cmdline, "board=962") || + strstr(arcs_cmdline, "board=lhg") || + strstr(arcs_cmdline, "board=map-hb") || ++ strstr(arcs_cmdline, "board=wap-hb") || + strstr(arcs_cmdline, "board=2011L") || + strstr(arcs_cmdline, "board=2011r") || + strstr(arcs_cmdline, "board=711Gr100") ||