From 15f6f67d18bea6174d026d6af944f4553bcc3c98 Mon Sep 17 00:00:00 2001 From: Imre Kaloz Date: Wed, 26 Nov 2014 08:28:22 +0000 Subject: Netgear R6100 support Signed-off-by: Imre Kaloz SVN-Revision: 43382 --- target/linux/ar71xx/base-files/etc/diag.sh | 1 + .../ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom | 1 + target/linux/ar71xx/base-files/etc/uci-defaults/01_leds | 6 ++++++ target/linux/ar71xx/base-files/etc/uci-defaults/02_network | 3 ++- target/linux/ar71xx/base-files/lib/ar71xx.sh | 3 +++ .../ar71xx/base-files/lib/preinit/05_set_iface_mac_ar71xx | 6 ++++++ .../ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin | 10 ++++++++++ target/linux/ar71xx/base-files/lib/upgrade/platform.sh | 1 + 8 files changed, 30 insertions(+), 1 deletion(-) (limited to 'target/linux/ar71xx/base-files') diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 39a54cb796..5c1d92f4aa 100755 --- a/target/linux/ar71xx/base-files/etc/diag.sh +++ b/target/linux/ar71xx/base-files/etc/diag.sh @@ -263,6 +263,7 @@ get_status_led() { wzr-hp-g300nh2) status_led="buffalo:red:diag" ;; + r6100 | \ wndap360 | \ wndr3700 | \ wndr3700v4 | \ diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index eef7ee1bcd..b5f0588863 100644 --- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -38,6 +38,7 @@ board=$(ar71xx_board_name) case "$FIRMWARE" in "soc_wmac.eeprom") case $board in + r6100 | \ wndr3700v4 | \ wndr4300) ath9k_eeprom_extract "caldata" 4096 2048 diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds index 2678e5510a..4216071349 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/01_leds @@ -421,6 +421,12 @@ wndr3700) ucidef_set_led_usbdev "usb" "USB" "netgear:green:usb" "1-1" ;; +r6100) + ucidef_set_led_netdev "wan" "WAN (green)" "netgear:green:wan" "eth0.2" + ucidef_set_led_usbdev "usb" "USB" "netgear:blue:usb" "1-1" + ucidef_set_led_wlan "wlan" "WLAN" "netgear:blue:wlan" "phy1tpt" + ;; + wndr3700v4 | \ wndr4300) ucidef_set_led_netdev "wan" "WAN (green)" "netgear:green:wan" "eth0.2" diff --git a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network index 1b0bea0ef8..872db67d9a 100755 --- a/target/linux/ar71xx/base-files/etc/uci-defaults/02_network +++ b/target/linux/ar71xx/base-files/etc/uci-defaults/02_network @@ -201,7 +201,8 @@ tl-wr941nd) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" ;; -smart-300 | \ +r6100 |\ +smart-300 |\ tl-mr3420-v2 |\ tl-wr841n-v8 |\ tl-wr842n-v2 |\ diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh index 30163fb21b..8dde6ef707 100755 --- a/target/linux/ar71xx/base-files/lib/ar71xx.sh +++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh @@ -701,6 +701,9 @@ ar71xx_board_detect() { *"WNDR3700/WNDR3800/WNDRMAC") wndr3700_board_detect "$machine" ;; + *"R6100") + name="r6100" + ;; *"WNDR3700v4") name="wndr3700v4" ;; diff --git a/target/linux/ar71xx/base-files/lib/preinit/05_set_iface_mac_ar71xx b/target/linux/ar71xx/base-files/lib/preinit/05_set_iface_mac_ar71xx index f8bb7b76c6..b40dff5d18 100644 --- a/target/linux/ar71xx/base-files/lib/preinit/05_set_iface_mac_ar71xx +++ b/target/linux/ar71xx/base-files/lib/preinit/05_set_iface_mac_ar71xx @@ -29,6 +29,12 @@ preinit_set_mac_address() { fetch_mac_from_mtd config lan_mac wan_mac echo 1 > /sys/class/leds/dir-615-c1:green:wancpu/brightness ;; + r6100) + mac_lan=$(mtd_get_mac_binary caldata 0) + [ -n "$mac_lan" ] && ifconfig eth1 hw ether "$mac_lan" + mac_wan=$(mtd_get_mac_binary caldata 6) + [ -n "$mac_wan" ] && ifconfig eth0 hw ether "$mac_wan" + ;; wrt160nl) fetch_mac_from_mtd nvram lan_hwaddr wan_hwaddr ;; diff --git a/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin b/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin index 2c06d7f1a1..719082084b 100644 --- a/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin +++ b/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin @@ -22,7 +22,17 @@ do_load_ath10k_board_bin() { macaddr_2bin $mac >> /tmp/ath10k-board.bin dd if=/dev/mtdblock4 \ bs=1 skip=20492 count=2104 >> /tmp/ath10k-board.bin + ;; + r6100) + local mac + mac=$(macaddr_add $(cat /sys/class/net/eth1/address) +2) + dd if=/dev/mtdblock2 \ + bs=1 skip=20480 count=6 \ + of=/tmp/ath10k-board.bin + macaddr_2bin $mac >> /tmp/ath10k-board.bin + dd if=/dev/mtdblock2 \ + bs=1 skip=20492 count=2104 >> /tmp/ath10k-board.bin ;; qihoo-c301) local mac diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh index 1db72d8c4a..598b33e79e 100755 --- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh @@ -354,6 +354,7 @@ platform_check_image() { return 0 ;; nbg6716 | \ + r6100 | \ wndr3700v4 | \ wndr4300 ) nand_do_platform_check $board $1 -- cgit v1.2.3