aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/generic/base-files/etc
diff options
context:
space:
mode:
authorSebastian Schaper <openwrt@sebastianschaper.net>2020-06-03 21:15:09 +0200
committerPetr Štetiar <ynezz@true.cz>2020-07-09 10:28:40 +0200
commit361c670a468cac8def368ed95487c72cfdb4a3fa (patch)
treef05ae51c43ebd9bafe7c7db0e8d3d6f3ba2fe276 /target/linux/ath79/generic/base-files/etc
parent358aec77756d6bf850a533272f2685a45220dc0c (diff)
downloadupstream-361c670a468cac8def368ed95487c72cfdb4a3fa.tar.gz
upstream-361c670a468cac8def368ed95487c72cfdb4a3fa.tar.bz2
upstream-361c670a468cac8def368ed95487c72cfdb4a3fa.zip
ath79: add support for D-Link DAP-1330/DAP-1365 A1
Port device support for DAP-1330 from the ar71xx target to ath79. Additionally, images are generated for the European through-socket case variant DAP-1365. Both devices run the same vendor firmware, the only difference being the DAP_SIGNATURE field in the factory header. The vendor's Web UI will display a model string stored in the flash. Specifications: * QCA9533, 8 MiB Flash, 64 MiB RAM * One Ethernet Port (10/100) * Wall-plug style case (DAP-1365 with additional socket) * LED bargraph RSSI indicator Installation: * Web UI: http://192.168.0.50 (or different address obtained via DHCP) There is no password set by default * Recovery Web UI: Keep reset button pressed during power-on until LED starts flashing red, upgrade via http://192.168.0.50 * Some modern browsers may have problems flashing via the Web UI, if this occurs consider booting to recovery mode and flashing via: curl -F \ files=@openwrt-ath79-generic-dlink_dap-1330-a1-squashfs-factory.bin \ http://192.168.0.50/cgi/index The device will use the same MAC address for both wired and wireless interfaces, however it is stored at two different locations in the flash. Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
Diffstat (limited to 'target/linux/ath79/generic/base-files/etc')
-rwxr-xr-xtarget/linux/ath79/generic/base-files/etc/board.d/01_leds8
-rwxr-xr-xtarget/linux/ath79/generic/base-files/etc/board.d/02_network10
-rw-r--r--target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac2
-rw-r--r--target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration7
4 files changed, 24 insertions, 3 deletions
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds
index f3e3b758b5..f3f8742560 100755
--- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds
@@ -132,6 +132,14 @@ compex,wpj531-16m)
devolo,magic-2-wifi)
ucidef_set_led_netdev "plcw" "dLAN" "devolo:white:dlan" "eth0.1" "rx"
;;
+dlink,dap-1330-a1|\
+dlink,dap-1365-a1)
+ ucidef_set_rssimon "wlan0" "200000" "1"
+ ucidef_set_led_rssi "rssilow" "RSSILOW" "d-link:red:rssilow" "wlan0" "1" "25"
+ ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "d-link:green:rssimediumlow" "wlan0" "1" "100"
+ ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "d-link:green:rssimediumhigh" "wlan0" "51" "100"
+ ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "d-link:green:rssihigh" "wlan0" "76" "100"
+ ;;
dlink,dir-859-a1)
ucidef_set_led_switch "internet" "WAN" "$boardname:green:internet" "switch0" "0x20"
;;
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index eb43788fce..f93d914374 100755
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -23,6 +23,8 @@ ath79_setup_interfaces()
devolo,dvl1750c|\
devolo,dvl1750i|\
devolo,dvl1750x|\
+ dlink,dap-1330-a1|\
+ dlink,dap-1365-a1|\
dlink,dir-505|\
engenius,ecb1750|\
enterasys,ws-ap3705i|\
@@ -386,13 +388,15 @@ ath79_setup_macs()
devolo,magic-2-wifi)
label_mac=$(macaddr_add "$(mtd_get_mac_binary art 0x1002)" 3)
;;
- dlink,dap-2695-a1)
- label_mac=$(mtd_get_mac_ascii bdcfg "wlanmac")
- ;;
+ dlink,dap-1330-a1|\
+ dlink,dap-1365-a1|\
dlink,dch-g020-a1)
lan_mac=$(mtd_get_mac_text "mp" 0x1)
label_mac=$lan_mac
;;
+ dlink,dap-2695-a1)
+ label_mac=$(mtd_get_mac_ascii bdcfg "wlanmac")
+ ;;
dlink,dir-825-b1)
lan_mac=$(mtd_get_mac_text "caldata" 0xffa0)
wan_mac=$(mtd_get_mac_text "caldata" 0xffb4)
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index cf582b8465..8ea23a8ac6 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -17,6 +17,8 @@ case "$board" in
adtran,bsap1840)
macaddr_add "$(mtd_get_mac_binary 'Board data' 2)" $(($PHYNBR * 8 + 1)) > /sys${DEVPATH}/macaddress
;;
+ dlink,dap-1330-a1|\
+ dlink,dap-1365-a1|\
dlink,dch-g020-a1)
mtd_get_mac_text "mp" 0x13 > /sys${DEVPATH}/macaddress
;;
diff --git a/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration b/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration
index 23a9c8282f..0f68209c9b 100644
--- a/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration
+++ b/target/linux/ath79/generic/base-files/etc/uci-defaults/04_led_migration
@@ -8,6 +8,13 @@ case "$board" in
arduino,yun)
migrate_leds "arduino:=yun:"
;;
+dlink,dap-1330-a1)
+ migrate_leds ":red:power=:red:status" \
+ ":red:wifi=:red:rssilow" \
+ ":green:wifi=:green:rssimediumlow" \
+ ":green:signal1=:green:rssimediumhigh" \
+ ":green:signal2=:green:rssihigh"
+ ;;
engenius,epg5000)
migrate_leds ":wlan-2g=:wlan2g" ":wlan-5g=:wlan5g"
;;