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
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:
@@ -0,0 +1,118 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -e /lib/firmware/$FIRMWARE ] && exit 0
|
||||
|
||||
. /lib/functions/caldata.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$FIRMWARE" in
|
||||
"ath11k/IPQ8074/hw2.0/cal-ahb-c000000.wifi.bin")
|
||||
case "$board" in
|
||||
asus,rt-ax89x)
|
||||
CI_UBIPART="UBI_DEV"
|
||||
caldata_extract_ubi "Factory" 0x1000 0x20000
|
||||
;;
|
||||
arcadyan,aw1000|\
|
||||
buffalo,wxr-5950ax12|\
|
||||
cmcc,rm2-6|\
|
||||
compex,wpq873|\
|
||||
dynalink,dl-wrx36|\
|
||||
edgecore,eap102|\
|
||||
edimax,cax1800|\
|
||||
linksys,mx5300|\
|
||||
netgear,wax218|\
|
||||
qnap,301w|\
|
||||
redmi,ax6|\
|
||||
xiaomi,ax3600|\
|
||||
xiaomi,ax9000|\
|
||||
yuncore,ax880|\
|
||||
zte,mf269)
|
||||
caldata_extract "0:art" 0x1000 0x20000
|
||||
;;
|
||||
linksys,mx4200v1|\
|
||||
linksys,mx8500)
|
||||
caldata_extract "0:art" 0x1000 0x20000
|
||||
ath11k_remove_regdomain
|
||||
;;
|
||||
linksys,mx4200v2)
|
||||
caldata_extract "0:art" 0x1000 0x20000
|
||||
label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
|
||||
ath11k_patch_mac $(macaddr_add $label_mac 2) 0
|
||||
ath11k_patch_mac $(macaddr_add $label_mac 1) 1
|
||||
ath11k_patch_mac $(macaddr_add $label_mac 3) 2
|
||||
ath11k_remove_regdomain
|
||||
ath11k_set_macflag
|
||||
;;
|
||||
netgear,rax120v2)
|
||||
caldata_extract "0:art" 0x1000 0x20000
|
||||
ath11k_patch_mac $(mtd_get_mac_binary boarddata1 0xc) 0
|
||||
ath11k_patch_mac $(mtd_get_mac_binary boarddata1 0x0) 1
|
||||
ath11k_patch_mac $(mtd_get_mac_binary boarddata1 0x6) 2
|
||||
ath11k_set_macflag
|
||||
;;
|
||||
netgear,sxr80|\
|
||||
netgear,sxs80)
|
||||
caldata_extract "0:art" 0x1000 0x20000
|
||||
label_mac=$(get_mac_label)
|
||||
ath11k_patch_mac $(mtd_get_mac_binary boarddata1 0x0c) 0
|
||||
#boarddata1 doesn't have a MAC for the 2G interface
|
||||
ath11k_patch_mac $(macaddr_setbit_la $label_mac) 1
|
||||
ath11k_patch_mac $(mtd_get_mac_binary boarddata1 0x12) 2
|
||||
ath11k_set_macflag
|
||||
;;
|
||||
netgear,wax620)
|
||||
caldata_extract "0:art" 0x1000 0x20000
|
||||
label_mac=$(get_mac_label)
|
||||
ath11k_patch_mac $(macaddr_add $label_mac -31) 1
|
||||
ath11k_patch_mac $(macaddr_add $label_mac 1) 0
|
||||
ath11k_set_macflag
|
||||
;;
|
||||
netgear,wax630)
|
||||
caldata_extract "0:art" 0x1000 0x20000
|
||||
label_mac=$(get_mac_label)
|
||||
ath11k_patch_mac $(macaddr_add $label_mac -31) 1
|
||||
ath11k_patch_mac $(macaddr_add $label_mac 1) 0
|
||||
ath11k_patch_mac $(macaddr_add $label_mac 33) 2
|
||||
ath11k_set_macflag
|
||||
;;
|
||||
prpl,haze|\
|
||||
spectrum,sax1v1k)
|
||||
caldata_extract_mmc "0:ART" 0x1000 0x20000
|
||||
;;
|
||||
zbtlink,zbt-z800ax)
|
||||
caldata_extract "0:art" 0x1000 0x20000
|
||||
label_mac=$(get_mac_label)
|
||||
ath11k_patch_mac $(macaddr_add $label_mac -1) 0
|
||||
ath11k_patch_mac $(macaddr_add $label_mac -2) 1
|
||||
ath11k_set_macflag
|
||||
;;
|
||||
zyxel,nbg7815)
|
||||
caldata_extract "0:art" 0x1000 0x20000
|
||||
label_mac=$(get_mac_label)
|
||||
ath11k_patch_mac $(macaddr_add $label_mac 3) 0
|
||||
ath11k_patch_mac $(macaddr_add $label_mac 2) 1
|
||||
ath11k_patch_mac $(macaddr_add $label_mac 4) 2
|
||||
ath11k_set_macflag
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"ath11k/QCN9074/hw1.0/cal-pci-0000:01:00.0.bin"|\
|
||||
"ath11k/QCN9074/hw1.0/cal-pci-0001:01:00.0.bin")
|
||||
case "$board" in
|
||||
linksys,mx8500)
|
||||
caldata_extract "0:art" 0x26800 0x20000
|
||||
ath11k_remove_regdomain
|
||||
;;
|
||||
prpl,haze)
|
||||
caldata_extract_mmc "0:ART" 0x26800 0x20000
|
||||
;;
|
||||
xiaomi,ax9000)
|
||||
caldata_extract "0:art" 0x26800 0x20000
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -0,0 +1,68 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This must run before 10-wifi-detect
|
||||
|
||||
[ "${ACTION}" = "add" ] || return
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
check_kernel()
|
||||
{
|
||||
local kernel_current=$(uname -r)
|
||||
if [ ${kernel_current//./} -lt "6600" ]; then
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
do_migrate_radio()
|
||||
{
|
||||
local cfg="$1" from="$2" to="$3"
|
||||
|
||||
config_get path "$cfg" path
|
||||
|
||||
[ "$path" = "$from" ] || return
|
||||
|
||||
uci set "wireless.${cfg}.path=${to}"
|
||||
WIRELESS_CHANGED=true
|
||||
|
||||
logger -t wifi-migrate "Updated path of wireless.${cfg} from '${from}' to '${to}'"
|
||||
}
|
||||
|
||||
check_path()
|
||||
{
|
||||
local config
|
||||
config="$1"
|
||||
|
||||
config_get path "$config" path
|
||||
|
||||
to=${path/soc\//soc@0\/}
|
||||
|
||||
# Checks if kernel version is less than 6.6.0, if it is and the path is using the new format,
|
||||
# then path should be migrated to the old format. This would allow users on platforms with two partitions,
|
||||
# to test 6.1 and 6.6.
|
||||
check_kernel || to=${path/soc@0\//soc\/}
|
||||
|
||||
[ "$path" = "$to" ] || do_migrate_radio "$config" "$path" "$to"
|
||||
}
|
||||
|
||||
migrate_radio()
|
||||
{
|
||||
config_load wireless
|
||||
|
||||
# Check if there is already a section with the target path: In this case, the system
|
||||
# was already upgraded to a version without this migration script before; better bail out,
|
||||
# as we can't be sure we don't break more than we fix.
|
||||
config_foreach check_path wifi-device
|
||||
}
|
||||
|
||||
WIRELESS_CHANGED=false
|
||||
|
||||
case "$(board_name)" in
|
||||
*)
|
||||
migrate_radio
|
||||
;;
|
||||
esac
|
||||
|
||||
$WIRELESS_CHANGED && uci commit wireless
|
||||
|
||||
exit 0
|
||||
@@ -0,0 +1,26 @@
|
||||
[ "$ACTION" == "add" ] || exit 0
|
||||
|
||||
PHYNBR=${DEVPATH##*/phy}
|
||||
|
||||
[ -n $PHYNBR ] || exit 0
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/system.sh
|
||||
|
||||
board=$(board_name)
|
||||
|
||||
case "$board" in
|
||||
arcadyan,aw1000)
|
||||
[ "$PHYNBR" = "0" ] && macaddr_add $(get_mac_label) 1 > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" = "1" ] && macaddr_add $(get_mac_label) 2 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
buffalo,wxr-5950ax12)
|
||||
[ "$PHYNBR" = "0" ] && macaddr_add $(get_mac_label) 8 > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" = "1" ] && macaddr_add $(get_mac_label) 16 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
cmcc,rm2-6|\
|
||||
zte,mf269)
|
||||
[ "$PHYNBR" = "0" ] && macaddr_add $(get_mac_label) 2 > /sys${DEVPATH}/macaddress
|
||||
[ "$PHYNBR" = "1" ] && macaddr_add $(get_mac_label) 3 > /sys${DEVPATH}/macaddress
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user