difos/target/linux/qualcommax/ipq50xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
Shubham Vishwakarma 6fa9cff052 qualcommax: ipq50xx: update qcn6122 caldata offset of yuncore ax830
The current offset used for extracting QCN6122 calibration data
is incorrect on the Yuncore AX830. This patch corrects the
offset to ensure proper WiFi initialization.

Tested on: Yuncore AX830

Signed-off-by: Shubham Vishwakarma <shubhamvis98@fossfrog.in>
Link: https://github.com/openwrt/openwrt/pull/19416
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-07-16 00:06:30 +02:00

95 lines
2.3 KiB
Bash

#!/bin/sh
[ -e /lib/firmware/$FIRMWARE ] && exit 0
. /lib/functions/caldata.sh
board=$(board_name)
case "$FIRMWARE" in
"ath11k/IPQ5018/hw1.0/cal-ahb-c000000.wifi.bin")
case "$board" in
elecom,wrc-x3000gs2|\
iodata,wn-dax3000gr)
caldata_extract "0:art" 0x1000 0x20000
wlan_mac=$(mtd_get_mac_ascii 0:appsblenv wifi0)
ath11k_patch_mac $wlan_mac 0
ath11k_set_macflag
;;
glinet,gl-b3000)
caldata_extract "0:art" 0x1000 0x20000
ath11k_patch_mac $(macaddr_add $(get_mac_label_dt) 3) 0
ath11k_set_macflag
;;
linksys,mr5500|\
linksys,mx2000|\
linksys,mx5500|\
linksys,spnmx56)
caldata_extract "0:ART" 0x1000 0x20000
label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
ath11k_patch_mac $(macaddr_add $label_mac 1) 0
ath11k_remove_regdomain
ath11k_set_macflag
;;
xiaomi,ax6000)
caldata_extract "0:art" 0x1000 0x20000
;;
yuncore,ax830)
caldata_extract "0:ART" 0x1000 0x20000
label_mac=$(mtd_get_mac_binary 0:ART 0)
ath11k_patch_mac $(macaddr_add $label_mac 2) 0
ath11k_remove_regdomain
ath11k_set_macflag
;;
esac
;;
"ath11k/QCN6122/hw1.0/cal-ahb-b00a040.wifi1.bin")
case "$board" in
elecom,wrc-x3000gs2|\
iodata,wn-dax3000gr)
caldata_extract "0:art" 0x26800 0x20000
wlan_mac=$(mtd_get_mac_ascii 0:appsblenv wifi1)
ath11k_patch_mac $wlan_mac 0
ath11k_set_macflag
;;
glinet,gl-b3000)
caldata_extract "0:art" 0x26800 0x20000
ath11k_patch_mac $(macaddr_add $(get_mac_label_dt) 4) 0
ath11k_set_macflag
;;
linksys,mx2000)
caldata_extract "0:ART" 0x26800 0x20000
label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
ath11k_patch_mac $(macaddr_add $label_mac 2) 0
ath11k_remove_regdomain
ath11k_set_macflag
;;
yuncore,ax830)
caldata_extract "0:ART" 0x4c000 0x20000
label_mac=$(mtd_get_mac_binary 0:ART 0)
ath11k_patch_mac $(macaddr_add $label_mac 3) 0
ath11k_remove_regdomain
ath11k_set_macflag
;;
esac
;;
"ath11k/QCN9074/hw1.0/cal-pci-0000:01:00.0.bin")
case "$board" in
linksys,mr5500|\
linksys,mx5500|\
linksys,spnmx56)
caldata_extract "0:ART" 0x26800 0x20000
label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
ath11k_patch_mac $(macaddr_add $label_mac 2) 0
ath11k_remove_regdomain
ath11k_set_macflag
;;
xiaomi,ax6000)
caldata_extract "0:art" 0x26800 0x20000
;;
esac
;;
*)
exit 1
;;
esac