From: Paweł Owoc Date: Mon, 29 Jan 2024 23:39:55 +0000 (+0100) Subject: qualcommax: ipq807x: use ath11k_patch_mac and ath11k_remove_regdomain for MX4200 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=682393cd1a1ecfd90178b33b0fb1adb75fad4e5d;p=openwrt%2Fstaging%2Fldir.git 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 --- diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network b/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network index a6ec834785..d87e4246e1 100644 --- a/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network +++ b/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network @@ -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 diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata index d0689d0db6..b373e8471d 100644 --- a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata +++ b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata @@ -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 diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac index dd85dcfe98..17284a0d9e 100644 --- a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -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