X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=blobdiff_plain;f=target%2Flinux%2Far71xx%2Fbase-files%2Fetc%2Fhotplug.d%2Ffirmware%2F11-ath10k-caldata;h=718fd7555c73c247cb662c0a8638895e2da38b84;hp=e08df23df6fc00555111d5e142b9b09e61e40ff4;hb=8a21bc36229d3eabad213ae47fddb4d86d76ac7f;hpb=4caab808300ad75575d778bae6e184caa26aeabc diff --git a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index e08df23df6..718fd7555c 100644 --- a/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ar71xx/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -10,7 +10,7 @@ ath10kcal_from_file() { local offset=$2 local count=$3 - dd if=$source of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \ + dd if=$source of=/lib/firmware/$FIRMWARE iflag=skip_bytes bs=$count skip=$offset count=1 2>/dev/null || \ ath10kcal_die "failed to extract calibration data from $source" } @@ -30,7 +30,7 @@ ath10kcal_extract() { [ "$count" = "$cal_size" ] || \ ath10kcal_die "no calibration data found in $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 || \ ath10kcal_die "failed to extract calibration data from $mtd" } @@ -39,7 +39,7 @@ ath10kcal_patch_mac() { [ -z "$mac" ] && return - macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc bs=1 seek=6 count=6 + macaddr_2bin $mac | dd of=/lib/firmware/$FIRMWARE conv=notrunc oflag=seek_bytes bs=6 seek=6 count=1 } [ -e /lib/firmware/$FIRMWARE ] && exit 0 @@ -76,6 +76,7 @@ case "$FIRMWARE" in dlan-pro-1200-ac|\ e1700ac-v2|\ e600gac-v2|\ + minibox-v3.2|\ oolite-v5.2|\ oolite-v5.2-dev|\ sr3200|\ @@ -142,7 +143,7 @@ case "$FIRMWARE" in archer-c5|\ archer-c7) ath10kcal_extract "art" 20480 2116 - ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -2) + ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -1) ;; nbg6616|\ nbg6716) @@ -155,6 +156,7 @@ case "$FIRMWARE" in ;; rb-911g-5hpacd|\ rb-921gs-5hpacd-r2|\ + rb-922uags-5hpacd|\ rb-962uigs-5hact2hnt) ath10kcal_from_file "/sys/firmware/routerboot/ext_wlan_data" 20480 2116 ;; @@ -170,13 +172,18 @@ case "$FIRMWARE" in archer-c59-v1|\ archer-c59-v2|\ archer-c60-v1|\ - archer-c60-v2|\ cf-e355ac-v2|\ cf-e375ac) ath10kcal_extract "art" 20480 12064 ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ /lib/firmware/ath10k/QCA9888/hw2.0/board.bin ;; + archer-c60-v2) + ath10kcal_extract "art" 20480 12064 + ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \ + /lib/firmware/ath10k/QCA9888/hw2.0/board.bin + ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -1) + ;; cf-e385ac) ath10kcal_extract "art" 20480 12064 ;;