[openwrt/openwrt] qualcommax: ipq807x: use ath11k_patch_mac and ath11k_remove_regdomain for MX4200
LEDE Commits
lede-commits at lists.infradead.org
Tue Apr 23 13:36:04 PDT 2024
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/682393cd1a1ecfd90178b33b0fb1adb75fad4e5d
commit 682393cd1a1ecfd90178b33b0fb1adb75fad4e5d
Author: Paweł Owoc <frut3k7 at gmail.com>
AuthorDate: Tue Jan 30 00:39:55 2024 +0100
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 at gmail.com>
---
.../qualcommax/ipq807x/base-files/etc/board.d/02_network | 1 -
.../base-files/etc/hotplug.d/firmware/11-ath11k-caldata | 15 +++++++++++++--
.../base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac | 7 -------
3 files changed, 13 insertions(+), 10 deletions(-)
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
More information about the lede-commits
mailing list