aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/apm821xx/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/apm821xx/base-files')
-rwxr-xr-xtarget/linux/apm821xx/base-files/etc/board.d/01_leds16
-rwxr-xr-xtarget/linux/apm821xx/base-files/etc/board.d/02_network7
-rw-r--r--target/linux/apm821xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac21
-rwxr-xr-xtarget/linux/apm821xx/base-files/lib/upgrade/platform.sh2
4 files changed, 45 insertions, 1 deletions
diff --git a/target/linux/apm821xx/base-files/etc/board.d/01_leds b/target/linux/apm821xx/base-files/etc/board.d/01_leds
index 632d22a470..dd529b528d 100755
--- a/target/linux/apm821xx/base-files/etc/board.d/01_leds
+++ b/target/linux/apm821xx/base-files/etc/board.d/01_leds
@@ -23,6 +23,22 @@ meraki,mx60)
ucidef_set_led_switch "lan4" "LAN4" "mx60:green:lan4" "switch0" "0x02"
;;
+netgear,wndap620)
+ ucidef_set_led_switch "lan_act" "LAN (Activity)" "wndap6x0:green:activity" "switch0" "0x04" "0x0f" "rx tx"
+ ucidef_set_led_switch "lan_100" "LAN 100Mbps" "wndap620:amber:link100" "switch0" "0x04" "0x04" "link"
+ ucidef_set_led_switch "lan_1000" "LAN 1000Mbps" "wndap620:green:link1000" "switch0" "0x04" "0x08" "link"
+ ;;
+
+netgear,wndap660)
+ ucidef_set_led_netdev "lan_act" "LAN (Activity)" "wndap6x0:green:activity" "eth0"
+ ucidef_set_led_switch "lan1_100" "LAN 100Mbps" "wndap660:amber:lan1-link100" "switch0" "0x04" "0x04" "link"
+ ucidef_set_led_switch "lan1_1000" "LAN 1000Mbps" "wndap660:green:lan1-link1000" "switch0" "0x04" "0x08" "link"
+ ucidef_set_led_switch "lan2_100" "LAN 100Mbps" "wndap660:amber:lan2-link100" "switch0" "0x02" "0x04" "link"
+ ucidef_set_led_switch "lan2_1000" "LAN 1000Mbps" "wndap660:green:lan2-link1000" "switch0" "0x02" "0x08" "link"
+ ucidef_set_led_wlan "wlan2g" "WLAN2G" "wndap6x0:green:wlan2g" "phy0tpt"
+ ucidef_set_led_wlan "wlan5g" "WLAN5G" "wndap6x0:green:wlan5g" "phy1tpt"
+ ;;
+
netgear,wndr4700)
ucidef_set_led_switch "wan_green" "WAN (green)" "wndr4700:green:wan" "switch0" "0x20"
ucidef_set_led_netdev "wan_yellow" "WAN (yellow)" "wndr4700:yellow:wan" "eth0.2" "tx rx"
diff --git a/target/linux/apm821xx/base-files/etc/board.d/02_network b/target/linux/apm821xx/base-files/etc/board.d/02_network
index 6f4456e8a1..69bc038bd4 100755
--- a/target/linux/apm821xx/base-files/etc/board.d/02_network
+++ b/target/linux/apm821xx/base-files/etc/board.d/02_network
@@ -13,7 +13,12 @@ wd,mybooklive|\
wd,mybooklive-duo)
ucidef_set_interface_lan "eth0"
;;
-
+netgear,wndap620)
+ ucidef_add_switch "switch0" "2:lan" "5@eth0"
+ ;;
+netgear,wndap660)
+ ucidef_add_switch "switch0" "1:lan:2" "2:lan:1" "5@eth0"
+ ;;
meraki,mx60|\
netgear,wndr4700)
ucidef_add_switch "switch0" \
diff --git a/target/linux/apm821xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/apm821xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
new file mode 100644
index 0000000000..597b5dcca6
--- /dev/null
+++ b/target/linux/apm821xx/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -0,0 +1,21 @@
+#!/bin/ash
+
+[ "$ACTION" == "add" ] || exit 0
+
+PHYNBR=${DEVPATH##*/phy}
+
+[ -n $PHYNBR ] || exit 0
+
+. /lib/functions.sh
+. /lib/functions/system.sh
+
+board=$(board_name)
+
+case "$board" in
+netgear,wndap620|\
+netgear,wndap660)
+ echo $(macaddr_add $(mtd_get_mac_ascii u-boot-env baseMAC) $(($PHYNBR + 1)) ) > /sys${DEVPATH}/macaddress
+ ;;
+*)
+ ;;
+esac
diff --git a/target/linux/apm821xx/base-files/lib/upgrade/platform.sh b/target/linux/apm821xx/base-files/lib/upgrade/platform.sh
index fa0aa38014..02c750130c 100755
--- a/target/linux/apm821xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/apm821xx/base-files/lib/upgrade/platform.sh
@@ -26,6 +26,8 @@ platform_do_upgrade() {
;;
meraki,mr24|\
meraki,mx60|\
+ netgear,wndap620|\
+ netgear,wndap660|\
netgear,wndr4700)
nand_do_upgrade "$1"
;;