qualcommax: ipq807x: use ath11k_patch_mac and ath11k_remove_regdomain for MX4200

Use ath11k_patch_mac, ath11k_remove_regdomain and ath11k_set_macflag functions for MX4200
(only v2 variant requires MAC patching)

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
This commit is contained in:
Paweł Owoc 2024-01-30 00:39:55 +01:00 committed by Robert Marko
parent 652a6677d5
commit 682393cd1a
3 changed files with 13 additions and 10 deletions

View File

@ -69,7 +69,6 @@ ipq807x_setup_macs()
local label_mac=""
case "$board" in
linksys,mx4200v1|\
linksys,mx4200v2)
label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
for i in $(seq 3 5); do

View File

@ -16,8 +16,6 @@ case "$FIRMWARE" in
dynalink,dl-wrx36|\
edgecore,eap102|\
edimax,cax1800|\
linksys,mx4200v1|\
linksys,mx4200v2|\
linksys,mx5300|\
netgear,rax120v2|\
netgear,wax218|\
@ -33,6 +31,19 @@ case "$FIRMWARE" in
zyxel,nbg7815)
caldata_extract "0:art" 0x1000 0x20000
;;
linksys,mx4200v1)
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
;;
prpl,haze|\
spectrum,sax1v1k)
caldata_extract_mmc "0:ART" 0x1000 0x20000

View File

@ -23,13 +23,6 @@ case "$board" in
[ "$PHYNBR" = "0" ] && macaddr_add $(get_mac_label) 2 > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_add $(get_mac_label) 3 > /sys${DEVPATH}/macaddress
;;
linksys,mx4200v1|\
linksys,mx4200v2)
label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
[ "$PHYNBR" = "0" ] && macaddr_add $label_mac 2 > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_add $label_mac 1 > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "2" ] && macaddr_add $label_mac 3 > /sys${DEVPATH}/macaddress
;;
zbtlink,zbt-z800ax)
[ "$PHYNBR" = "0" ] && macaddr_add $(get_mac_label) -1 > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_add $(get_mac_label) -2 > /sys${DEVPATH}/macaddress