aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/base-files/lib
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-09-15 10:19:38 +0000
committerJohn Crispin <john@openwrt.org>2014-09-15 10:19:38 +0000
commit7dbbdfb61f99a765ff02d40daa1d63c769df41ef (patch)
tree2d02c4580ff00b8f32bcb252edae867b296133d7 /target/linux/ar71xx/base-files/lib
parentb520e9b8d441b85e17e29b854306179f1bdb4787 (diff)
downloadupstream-7dbbdfb61f99a765ff02d40daa1d63c769df41ef.tar.gz
upstream-7dbbdfb61f99a765ff02d40daa1d63c769df41ef.tar.bz2
upstream-7dbbdfb61f99a765ff02d40daa1d63c769df41ef.zip
ar71xx: add qihoo 360 c301 router support
Qihoo 360 C301 is a dual band wireless router supports 802.11n and 802.11ac. Its chipset is AR9344 + AR9882 with two 16MB flashes. This patch adds its initial support. v2: * use mtd_get_mac_ascii to fetch MAC address for ath10k. * use ath79_register_pci to initialize AR9882. Signed-off-by: Weijie Gao <hackpascal@gmail.com> SVN-Revision: 42552
Diffstat (limited to 'target/linux/ar71xx/base-files/lib')
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/ar71xx.sh3
-rw-r--r--target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin17
-rwxr-xr-xtarget/linux/ar71xx/base-files/lib/upgrade/platform.sh1
3 files changed, 21 insertions, 0 deletions
diff --git a/target/linux/ar71xx/base-files/lib/ar71xx.sh b/target/linux/ar71xx/base-files/lib/ar71xx.sh
index a7cbb80946..78d67fae4d 100755
--- a/target/linux/ar71xx/base-files/lib/ar71xx.sh
+++ b/target/linux/ar71xx/base-files/lib/ar71xx.sh
@@ -433,6 +433,9 @@ ar71xx_board_detect() {
*PB92)
name="pb92"
;;
+ *"Qihoo 360 C301")
+ name="qihoo-c301"
+ ;;
*"RouterBOARD 411/A/AH")
name="rb-411"
;;
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 a28932f824..2c06d7f1a1 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
@@ -24,6 +24,23 @@ do_load_ath10k_board_bin() {
bs=1 skip=20492 count=2104 >> /tmp/ath10k-board.bin
;;
+ qihoo-c301)
+ local mac
+
+ mac=$(mtd_get_mac_ascii devdata wlan5mac)
+
+ if [ -z "$mac" ]; then
+ mac=$(macaddr_add $(cat /sys/class/net/eth0/address) -2)
+ fi
+
+ dd if=/dev/mtdblock10 \
+ bs=1 skip=20480 count=6 \
+ of=/tmp/ath10k-board.bin
+ macaddr_2bin $mac >> /tmp/ath10k-board.bin
+ dd if=/dev/mtdblock10 \
+ bs=1 skip=20492 count=2104 >> /tmp/ath10k-board.bin
+
+ ;;
esac
[ -f /tmp/ath10k-board.bin ] || {
return
diff --git a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
index d1617bfb44..b8b2fa9980 100755
--- a/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ar71xx/base-files/lib/upgrade/platform.sh
@@ -226,6 +226,7 @@ platform_check_image() {
return 1
;;
+ qihoo-c301 | \
mynet-n600 | \
mynet-n750)
[ "$magic_long" != "5ea3a417" ] && {