]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
mediatek: wavlink wl-wn536ax6 rev a: fix WLAN 5GHz MAC address
authorRyan Leung <untilscour@protonmail.com>
Sat, 6 Jun 2026 11:19:24 +0000 (19:19 +0800)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Sun, 14 Jun 2026 10:31:36 +0000 (12:31 +0200)
The second WLAN MAC address in the "Factory" partition at 0x0a is not the same as the
WLAN 5GHz BSSID observed when using the manufacturer's stock firmware, which is derived from
the 2.4GHz/label MAC address by setting bits 26 and 7 (Locally Administered).

While at it, also fix alphabetical ordering of some other device names.

Fixes: 1748ce829537 ("mediatek: add support for WAVLINK WL-WN536AX6 Rev a")
Signed-off-by: Ryan Leung <untilscour@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/23682
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac

index 2221548447cd2326f65f2fb94075895670c31849..8b2b865cb259563e9e8a9ff5fe686675bc8986ac 100644 (file)
@@ -228,6 +228,13 @@ case "$board" in
                [ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress
                [ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress
                ;;
+       routerich,ax3000|\
+       routerich,ax3000-ubootmod|\
+       zbtlink,zbt-z8102ax|\
+       zbtlink,zbt-z8102ax-v2)
+               addr=$(mtd_get_mac_binary "Factory" 0x4)
+               [ "$PHYNBR" = "1" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress
+               ;;
        ruijie,rg-x60-pro)
                addr=$(mtd_get_mac_ascii product_info ethaddr)
                [ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress
@@ -252,12 +259,9 @@ case "$board" in
        tplink,tl-xtr8488)
                [ "$PHYNBR" = "1" ] && get_mac_label > /sys${DEVPATH}/macaddress
                ;;
-       routerich,ax3000|\
-       routerich,ax3000-ubootmod|\
-       zbtlink,zbt-z8102ax|\
-       zbtlink,zbt-z8102ax-v2)
+       wavlink,wl-wn536ax6-a)
                addr=$(mtd_get_mac_binary "Factory" 0x4)
-               [ "$PHYNBR" = "1" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress
+               [ "$PHYNBR" = "1" ] && macaddr_setbit_la $(macaddr_setbit $addr 26) > /sys${DEVPATH}/macaddress
                ;;
        wavlink,wl-wn573hx3)
                addr=$(mtd_get_mac_binary factory 0x04)