[OpenWrt-Devel] [PATCH] ar71xx: add mc-mac1200r to do_load_ath10k_board_bin()

Roger Pueyo Centelles roger.pueyo at guifi.net
Mon Feb 9 19:18:48 EST 2015


This patch adds the mc-mac1200r target to do_load_ath10k_board_bin() in
target/linux/ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin to load the
ath10k radio MAC address from the EEPROM in MERCURY MAC1200R devices

Signed-off-by: Roger Pueyo Centelles <roger.pueyo at guifi.net>
---
 .../ar71xx/base-files/lib/preinit/81_load_ath10k_board_bin    | 11 +++++++++++
 1 file changed, 11 insertions(+)

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 7190820..9a32dfc 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
@@ -23,6 +23,17 @@ do_load_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)
-- 
2.1.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list