mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 01:11:14 +00:00
2db9dded0a
The out-of-tree qcom-smem patches traditionally displayed mtd partition names in upper case, starting with the new mainline qcom-smem support in kernel v5.10, it switches to normalizing the partition names to lower case. Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
116 lines
2.9 KiB
Bash
116 lines
2.9 KiB
Bash
#!/bin/sh
|
|
|
|
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
|
|
|
. /lib/functions/caldata.sh
|
|
|
|
board=$(board_name)
|
|
|
|
case "$FIRMWARE" in
|
|
"ath10k/pre-cal-pci-0000:01:00.0.bin")
|
|
case $board in
|
|
asrock,g10)
|
|
caldata_extract "0:ART" 0x1000 0x2f20
|
|
;;
|
|
buffalo,wxr-2533dhp)
|
|
caldata_extract "ART" 0x1000 0x2f20
|
|
ath10k_patch_mac $(mtd_get_mac_binary ART 0x1e)
|
|
;;
|
|
edgecore,ecw5410)
|
|
caldata_extract "0:ART" 0x1000 0x2f20
|
|
;;
|
|
linksys,ea7500-v1 |\
|
|
linksys,ea8500)
|
|
caldata_extract "art" 0x1000 0x2f20
|
|
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) +1)
|
|
;;
|
|
nec,wg2600hp |\
|
|
nec,wg2600hp3)
|
|
caldata_extract "ART" 0x1000 0x2f20
|
|
ath10k_patch_mac $(mtd_get_mac_binary PRODUCTDATA 0x12)
|
|
;;
|
|
netgear,d7800 |\
|
|
netgear,r7500v2 |\
|
|
netgear,r7800)
|
|
caldata_extract "art" 0x1000 0x2f20
|
|
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x6) +1)
|
|
;;
|
|
tplink,ad7200 |\
|
|
tplink,c2600)
|
|
caldata_extract "radio" 0x1000 0x2f20
|
|
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary default-mac 0x8) -1)
|
|
;;
|
|
tplink,vr2600v)
|
|
caldata_extract "ART" 0x1000 0x2f20
|
|
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary default-mac 0x0) -1)
|
|
;;
|
|
zyxel,nbg6817)
|
|
if [ -b "$(find_mtd_part 0:art)" ]; then
|
|
caldata_extract "0:art" 0x1000 0x2f20
|
|
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:appsblenv ethaddr) +1)
|
|
else
|
|
# XXX: drop upper case after kernel v5.4 is gone (qcom-smem)
|
|
caldata_extract "0:ART" 0x1000 0x2f20
|
|
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii 0:APPSBLENV ethaddr) +1)
|
|
fi
|
|
;;
|
|
esac
|
|
;;
|
|
"ath10k/pre-cal-pci-0001:01:00.0.bin")
|
|
case $board in
|
|
asrock,g10)
|
|
caldata_extract "0:ART" 0x5000 0x2f20
|
|
;;
|
|
buffalo,wxr-2533dhp)
|
|
caldata_extract "ART" 0x5000 0x2f20
|
|
ath10k_patch_mac $(mtd_get_mac_binary ART 0x18)
|
|
;;
|
|
linksys,ea7500-v1 |\
|
|
linksys,ea8500)
|
|
caldata_extract "art" 0x5000 0x2f20
|
|
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii devinfo hw_mac_addr) +2)
|
|
;;
|
|
nec,wg2600hp |\
|
|
nec,wg2600hp3)
|
|
caldata_extract "ART" 0x5000 0x2f20
|
|
ath10k_patch_mac $(mtd_get_mac_binary PRODUCTDATA 0xc)
|
|
;;
|
|
netgear,d7800 |\
|
|
netgear,r7500v2 |\
|
|
netgear,r7800)
|
|
caldata_extract "art" 0x5000 0x2f20
|
|
ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary art 0x6) +2)
|
|
;;
|
|
tplink,ad7200 |\
|
|
tplink,c2600)
|
|
caldata_extract "radio" 0x5000 0x2f20
|
|
ath10k_patch_mac $(mtd_get_mac_binary default-mac 0x8)
|
|
;;
|
|
tplink,vr2600v)
|
|
caldata_extract "ART" 0x5000 0x2f20
|
|
ath10k_patch_mac $(mtd_get_mac_binary default-mac 0x0)
|
|
;;
|
|
zyxel,nbg6817)
|
|
if [ -b "$(find_mtd_part 0:art)" ]; then
|
|
caldata_extract "0:art" 0x5000 0x2f20
|
|
ath10k_patch_mac $(mtd_get_mac_ascii 0:appsblenv ethaddr)
|
|
else
|
|
# XXX: drop upper case after kernel v5.4 is gone (qcom-smem)
|
|
caldata_extract "0:ART" 0x5000 0x2f20
|
|
ath10k_patch_mac $(mtd_get_mac_ascii 0:APPSBLENV ethaddr)
|
|
fi
|
|
;;
|
|
esac
|
|
;;
|
|
"ath10k/pre-cal-pci-0002:01:00.0.bin")
|
|
case $board in
|
|
edgecore,ecw5410)
|
|
caldata_extract "0:ART" 0x5000 0x2f20
|
|
;;
|
|
esac
|
|
;;
|
|
*)
|
|
exit 1
|
|
;;
|
|
esac
|