[openwrt/openwrt] qualcommax: IPQ807x: ZyXEL NBG7815: Fix random Wifi MAC For this particualar device we get random MAC's for Wifi on each (re-)boot. This is because art partition/pre caldata do not contain valid MAC addresses.

LEDE Commits lede-commits at lists.infradead.org
Sat Apr 27 03:01:11 PDT 2024


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7cb161ae840fdf5e702171ce9ba2f944fa81621c

commit 7cb161ae840fdf5e702171ce9ba2f944fa81621c
Author: Ulrich Stark <pwned-pixel at posteo.de>
AuthorDate: Thu Apr 25 13:17:53 2024 +0200

    qualcommax: IPQ807x: ZyXEL NBG7815: Fix random Wifi MAC
    For this particualar device we get random MAC's for Wifi on each (re-)boot.
    This is because art partition/pre caldata do not contain valid MAC addresses.
    
    As we have now a new/better approach with ath11k_patch_mac we can use it for
    this device too.
    
    I'm using this approach for like two weeks and its working flawlessly.
    
    Signed-off-by: Ulrich Stark <pwned-pixel at posteo.de>
    
    qualcommax: IPQ807x: ZyXEL NBG7815: Fix random Wifi MAC
    Changing order to 3/phy0/5G-1, 2/phy1/2G, 4/phy2/5G-2.
    
    Signed-off-by: Ulrich Stark <pwned-pixel at posteo.de>
---
 .../base-files/etc/hotplug.d/firmware/11-ath11k-caldata       | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

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 8f207a38b0..c40d9bc5f9 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
@@ -26,8 +26,7 @@ case "$FIRMWARE" in
 	xiaomi,ax9000|\
 	yuncore,ax880|\
 	zbtlink,zbt-z800ax|\
-	zte,mf269|\
-	zyxel,nbg7815)
+	zte,mf269)
 		caldata_extract "0:art" 0x1000 0x20000
 		;;
 	linksys,mx4200v1)
@@ -54,6 +53,14 @@ case "$FIRMWARE" in
 	spectrum,sax1v1k)
 		caldata_extract_mmc "0:ART" 0x1000 0x20000
 		;;
+	zyxel,nbg7815)
+		caldata_extract "0:art" 0x1000 0x20000
+		label_mac=$(get_mac_label)
+		ath11k_patch_mac $(macaddr_add $label_mac 3) 0
+		ath11k_patch_mac $(macaddr_add $label_mac 2) 1
+		ath11k_patch_mac $(macaddr_add $label_mac 4) 2
+		ath11k_set_macflag
+		;;
 	esac
 	;;
 "ath11k/QCN9074/hw1.0/cal-pci-0000:01:00.0.bin"|\




More information about the lede-commits mailing list