aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79/nand
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ath79/nand')
-rwxr-xr-xtarget/linux/ath79/nand/base-files/etc/board.d/01_leds3
-rwxr-xr-xtarget/linux/ath79/nand/base-files/etc/board.d/02_network7
-rw-r--r--target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom13
-rw-r--r--target/linux/ath79/nand/base-files/lib/upgrade/platform.sh1
4 files changed, 24 insertions, 0 deletions
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/01_leds b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
index 59c35ed828..f851b3d886 100755
--- a/target/linux/ath79/nand/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/nand/base-files/etc/board.d/01_leds
@@ -11,6 +11,9 @@ case "$board" in
glinet,gl-ar300m-nand)
ucidef_set_led_netdev "lan" "LAN" "gl-ar300m:green:lan" "eth0"
;;
+netgear,wndr4300)
+ ucidef_set_led_switch "wan-amber" "WAN (amber)" "netgear:amber:wan" "switch0" "0x20"
+ ;;
esac
board_config_flush
diff --git a/target/linux/ath79/nand/base-files/etc/board.d/02_network b/target/linux/ath79/nand/base-files/etc/board.d/02_network
index faf70218ac..9d7a19c2eb 100755
--- a/target/linux/ath79/nand/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network
@@ -11,6 +11,10 @@ ath79_setup_interfaces()
aerohive,hiveap-121)
ucidef_set_interface_lan "eth0"
;;
+ netgear,wndr4300)
+ ucidef_add_switch "switch0" \
+ "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
+ ;;
zyxel,nbg6716)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth1"
@@ -26,6 +30,9 @@ ath79_setup_macs()
local board="$1"
case "$board" in
+ netgear,wndr4300)
+ wan_mac=$(mtd_get_mac_binary caldata 0x6)
+ ;;
zyxel,nbg6716)
lan_mac=$(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +2)
wan_mac=$(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) +3)
diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 88a40b5d41..ae1d3572a8 100644
--- a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -9,6 +9,9 @@ board=$(board_name)
case "$FIRMWARE" in
"ath9k-eeprom-ahb-18100000.wmac.bin")
case $board in
+ netgear,wndr4300)
+ caldata_extract "caldata" 0x1000 0x440
+ ;;
zyxel,nbg6716)
caldata_extract "art" 0x1000 0x440
ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env ethaddr)
@@ -18,4 +21,14 @@ case "$FIRMWARE" in
;;
esac
;;
+"ath9k-eeprom-pci-0000:00:00.0.bin")
+ case $board in
+ netgear,wndr4300)
+ caldata_extract "caldata" 0x5000 0x440
+ ;;
+ *)
+ caldata_die "board $board is not supported yet"
+ ;;
+ esac
+ ;;
esac
diff --git a/target/linux/ath79/nand/base-files/lib/upgrade/platform.sh b/target/linux/ath79/nand/base-files/lib/upgrade/platform.sh
index 6f8c7d47ff..1b1ae0391e 100644
--- a/target/linux/ath79/nand/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ath79/nand/base-files/lib/upgrade/platform.sh
@@ -14,6 +14,7 @@ platform_do_upgrade() {
case "$board" in
aerohive,hiveap-121|\
+ netgear,wndr4300|\
zyxel,nbg6716)
nand_do_upgrade "$1"
;;