ramips: fix 5g mac for TOTOLINK X5000R
authorChuanhong Guo <gch981213@gmail.com>
Sun, 26 Mar 2023 15:50:43 +0000 (23:50 +0800)
committerChuanhong Guo <gch981213@gmail.com>
Sun, 26 Mar 2023 16:07:34 +0000 (00:07 +0800)
There's no valid mac address for the second band in the eeprom.
The vendor fw uses 2.4G mac + 4 as the mac for 5G radio.
Do the same in our firmware.

Fixes: 23be410b3d ("ramips: add support for TOTOLINK X5000R")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
(cherry picked from commit 212632540043cc9b911c2efb86156479f2710836)

target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac

index 07cfd9c51a7527113938dfdf761509eaeddb9f7a..78c5d248f96dd74b391eec3673514b39fafd5cb1 100644 (file)
@@ -103,6 +103,10 @@ case "$board" in
                hw_mac_addr="$(mtd_get_mac_binary factory 0x4)"
                [ "$PHYNBR" = "1" ] &&  macaddr_add $hw_mac_addr "0x100000" > /sys${DEVPATH}/macaddress
                ;;
+       totolink,x5000r)
+               hw_mac_addr="$(mtd_get_mac_binary factory 0x4)"
+               [ "$PHYNBR" = "1" ] &&  macaddr_add $hw_mac_addr 4 > /sys${DEVPATH}/macaddress
+               ;;
        tplink,eap615-wall-v1)
                hw_mac_addr="$(mtd_get_mac_binary product-info 0x8)"
                macaddr_add "$hw_mac_addr" "$PHYNBR" > "/sys${DEVPATH}/macaddress"