[OpenWrt-Devel] [PATCH] ath79: speed up ath9k-eeprom extraction

Dmitry Tunin hanipouspilot at gmail.com
Fri Feb 22 07:30:39 EST 2019


This is a simple copy of ipq40xx: speed up ath10k-caldata extraction commit /a69e101ed1169f562fc030a783cd997d3f066b16

Tested on DIR-825-B1

3768+0 records in
3768+0 records out
real	0m 11.90s
user	0m 0.03s
sys	0m 9.94s

1+0 records in
1+0 records out
real	0m 0.03s
user	0m 0.00s
sys	0m 0.03s

With this change eeprom extraction is fast enough to get working Wi-Fi after initial install.

Signed-off-by: Dmitry Tunin <hanipouspilot at gmail.com>
---
 target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 8b217d1..84e4d07 100644
--- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -20,7 +20,7 @@ ath9k_eeprom_extract() {
 	[ -n "$mtd" ] || \
 		ath9k_eeprom_die "no mtd device found for partition $part"
 
-	dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \
+	dd if=$mtd of=/lib/firmware/$FIRMWARE iflag=skip_bytes bs=$count skip=$offset count=1 2>/dev/null || \
 		ath9k_eeprom_die "failed to extract from $mtd"
 }
 
-- 
2.7.4


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list