Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled

This commit is contained in:
domenico
2025-06-24 12:51:15 +02:00
commit 27c9d80f51
10493 changed files with 1885777 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
#!/bin/sh
[ -e /lib/firmware/$FIRMWARE ] && exit 0
. /lib/functions/caldata.sh
caldata_mikrotik_ath9k() {
local offset=$(($1))
local count=$(($2))
local macaddr=$3
local wlan_data="/sys/firmware/mikrotik/hard_config/wlan_data"
caldata_from_file $wlan_data $offset $count /tmp/$FIRMWARE
ath9k_patch_mac "$macaddr" /tmp/$FIRMWARE
caldata_sysfsload_from_file /tmp/$FIRMWARE 0x0 $count
rm -f /tmp/$FIRMWARE
}
board=$(board_name)
case "$FIRMWARE" in
"ath9k-eeprom-pci-0000:01:00.0.bin")
case $board in
mikrotik,ltap-2hnd)
mac_base="$(cat /sys/firmware/mikrotik/hard_config/mac_base)"
caldata_mikrotik_ath9k 0x5000 0x440 $(macaddr_add "$mac_base" 1)
;;
*)
caldata_die "board $board is not supported yet"
;;
esac
;;
esac