[openwrt/openwrt] qualcommax: use ath11k_patch_mac for MR7350

LEDE Commits lede-commits at lists.infradead.org
Wed Dec 11 08:02:20 PST 2024


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8108967e27feeacbf5ea08462358bff7516f96ac

commit 8108967e27feeacbf5ea08462358bff7516f96ac
Author: Chukun Pan <amadeus at jmu.edu.cn>
AuthorDate: Sun Dec 8 23:26:01 2024 +0800

    qualcommax: use ath11k_patch_mac for MR7350
    
    Use ath11k_patch_mac and ath11k_set_macflag functions
    instead of fix_wifi_mac script.
    
    Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
    Link: https://github.com/openwrt/openwrt/pull/17230
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../etc/hotplug.d/firmware/11-ath11k-caldata           |  8 +++++++-
 .../base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac | 18 ------------------
 2 files changed, 7 insertions(+), 19 deletions(-)

diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
index a5e843ee7b..3380cc8653 100644
--- a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
+++ b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
@@ -15,7 +15,13 @@ case "$FIRMWARE" in
 	cambiumnetworks,xe3-4)
 		caldata_extract "0:ART" 0x1000 0x10000
 		;;
-	linksys,mr7350|\
+	linksys,mr7350)
+		caldata_extract "0:art" 0x1000 0x10000
+		addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
+		ath11k_patch_mac $(macaddr_add $addr 2) 0
+		ath11k_patch_mac $(macaddr_add $addr 1) 1
+		ath11k_set_macflag
+		;;
 	netgear,wax214)
 		caldata_extract "0:art" 0x1000 0x10000
 		;;
diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
deleted file mode 100644
index a67cc7262b..0000000000
--- a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
+++ /dev/null
@@ -1,18 +0,0 @@
-[ "$ACTION" == "add" ] || exit 0
-
-PHYNBR=${DEVPATH##*/phy}
-
-[ -n $PHYNBR ] || exit 0
-
-. /lib/functions.sh
-. /lib/functions/system.sh
-
-board=$(board_name)
-
-case "$board" in
-	linksys,mr7350)
-		addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
-		[ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress
-		[ "$PHYNBR" = "1" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress
-		;;
-esac




More information about the lede-commits mailing list