aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/base-files/lib/preinit
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-07-07 13:47:57 +0000
committerJohn Crispin <blogic@openwrt.org>2015-07-07 13:47:57 +0000
commit53434afeed4a4f873eb7d66cc120a5473c289c40 (patch)
treecd38b65a189e3f9fd280d564669132c4a486a2eb /target/linux/ar71xx/base-files/lib/preinit
parent6a6663dc27f27e88bcd345a3d02efa524bdb07bc (diff)
downloadmaster-187ad058-53434afeed4a4f873eb7d66cc120a5473c289c40.tar.gz
master-187ad058-53434afeed4a4f873eb7d66cc120a5473c289c40.tar.bz2
master-187ad058-53434afeed4a4f873eb7d66cc120a5473c289c40.zip
ar71xx: Unify ath10k calibration data loading
Currently one board uses the "proper" way of providing firmware with the name ath10k/cal-pci-<pci address>.bin, whereas other boards patch board.bin template in preinit and rely on a custom ath10k patch to use calibration data from the template. This patch makes all boards use the first method. Signed-off-by: Matti Laakso <malaakso@elisanet.fi> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46244 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/base-files/lib/preinit')
-rw-r--r--target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin75
1 files changed, 0 insertions, 75 deletions
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
deleted file mode 100644
index 9a32dfcd77..0000000000
--- a/target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/sh
-
-. /lib/functions/system.sh
-. /lib/ar71xx.sh
-
-do_load_ath10k_board_bin() {
- # load board.bin
- case $(ar71xx_board_name) in
- nbg6716)
- dd if=/dev/mtdblock2 \
- bs=1 skip=20480 count=2116 \
- of=/tmp/ath10k-board.bin
- ;;
- archer-c5 | \
- archer-c7)
- local mac
- mac=$(macaddr_add $(cat /sys/class/net/eth1/address) -2)
-
- dd if=/dev/mtdblock4 \
- bs=1 skip=20480 count=6 \
- of=/tmp/ath10k-board.bin
- macaddr_2bin $mac >> /tmp/ath10k-board.bin
- dd if=/dev/mtdblock4 \
- bs=1 skip=20492 count=2104 >> /tmp/ath10k-board.bin
- ;;
- mc-mac1200r)
- local mac
- mac=$(macaddr_add $(cat /sys/class/net/eth1/address) -1)
-
- dd if=/dev/mtdblock4 \
- bs=1 skip=20480 count=6 \
- of=/tmp/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
-
- 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
- }
- cmp -s /tmp/ath10k-board.bin /lib/firmware/ath10k/QCA988X/hw2.0/board.bin || {
- cp /tmp/ath10k-board.bin /lib/firmware/ath10k/QCA988X/hw2.0/board.bin
- rm /tmp/ath10k-board.bin
- }
-}
-
-boot_hook_add preinit_main do_load_ath10k_board_bin