diff options
author | Imre Kaloz <kaloz@openwrt.org> | 2014-11-26 08:28:22 +0000 |
---|---|---|
committer | Imre Kaloz <kaloz@openwrt.org> | 2014-11-26 08:28:22 +0000 |
commit | 15f6f67d18bea6174d026d6af944f4553bcc3c98 (patch) | |
tree | c684fad218e062da2678a7beaa426ff319b68e61 /target/linux/ar71xx/base-files | |
parent | 9f803fca447d570ebab89fa5ed6ccf4e9f31632d (diff) | |
download | mtk-20170518-15f6f67d18bea6174d026d6af944f4553bcc3c98.zip mtk-20170518-15f6f67d18bea6174d026d6af944f4553bcc3c98.tar.gz mtk-20170518-15f6f67d18bea6174d026d6af944f4553bcc3c98.tar.bz2 |
Netgear R6100 support
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
SVN-Revision: 43382
Diffstat (limited to 'target/linux/ar71xx/base-files')
8 files changed, 30 insertions, 1 deletions
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh index 39a54cb..5c1d92f 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 eef7ee1..b5f0588 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 2678e55..4216071 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 1b0bea0..872db67 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 30163fb..8dde6ef 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 f8bb7b7..b40dff5 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 2c06d7f..7190820 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 1db72d8..598b33e 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 |