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>
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
dynalink,dl-wrx36|\
edgecore,eap102|\
edimax,cax1800|\
- linksys,mx4200v1|\
- linksys,mx4200v2|\
linksys,mx5300|\
netgear,rax120v2|\
netgear,wax218|\
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
[ "$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