diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2023-04-10 11:54:02 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2023-04-18 19:45:04 +0200 |
commit | db4f158c0330658e2c8528c28575e82f3dc6ca99 (patch) | |
tree | 5f5a29b1a950fb841058abdfb3dbd23eb3206e33 /target/linux/bmips/bcm6358 | |
parent | 36150ff6ffb252ccd4147ffb140d682f58fc19e8 (diff) | |
download | upstream-db4f158c0330658e2c8528c28575e82f3dc6ca99.tar.gz upstream-db4f158c0330658e2c8528c28575e82f3dc6ca99.tar.bz2 upstream-db4f158c0330658e2c8528c28575e82f3dc6ca99.zip |
bmips: hg556a: switch to kmod-owl-loader
Stop using custom ath9k fixup and switch to standard kmod-owl-loader
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bmips/bcm6358')
-rw-r--r-- | target/linux/bmips/bcm6358/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/target/linux/bmips/bcm6358/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/bmips/bcm6358/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom new file mode 100644 index 0000000000..b12d89f29d --- /dev/null +++ b/target/linux/bmips/bcm6358/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -0,0 +1,34 @@ +#!/bin/sh + +[ -e /lib/firmware/$FIRMWARE ] && exit 0 + +. /lib/functions/caldata.sh + +caldata_extract_swap() { + local part=$1 + local offset=$2 + local count=$3 + local mtd + + mtd=$(find_mtd_chardev $part) + [ -n "$mtd" ] || caldata_die "no mtd device found for partition $part" + + offset=$(($offset / 2)) + count=$(($count / 2)) + + dd if=$mtd of=/lib/firmware/$FIRMWARE bs=2 skip=$offset count=$count conv=swab 2>/dev/null || \ + caldata_die "failed to extract calibration data from $mtd" +} + +case "$FIRMWARE" in + "ath9k-eeprom-pci-0000:00:01.0.bin") + case "$(board_name)" in + huawei,hg556a-b) + caldata_extract_swap "cal_data" 0x1e000 0xeb8 + ;; + *) + caldata_die "board $board is not supported yet" + ;; + esac + ;; +esac |