mediatek: fix BPI-R3 wifi mac address
authorFelix Fietkau <nbd@nbd.name>
Tue, 9 Jan 2024 14:15:08 +0000 (15:15 +0100)
committerFelix Fietkau <nbd@nbd.name>
Tue, 9 Jan 2024 14:16:35 +0000 (15:16 +0100)
Setting/clearing bits on the first byte of the mac address causes collisions
when using multiple SSIDs on both PHYs. Change the allocation to alter the
last byte instead.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac

index 7f013732d31217290edb1bc2b6ea1884f04f6589..d9e0335b67f3b94df1b26eb4f34cb6d0445da6a1 100644 (file)
@@ -37,9 +37,9 @@ case "$board" in
                [ "$PHYNBR" = "1" ] && echo "$addr" > /sys${DEVPATH}/macaddress
                ;;
        bananapi,bpi-r3)
-               addr=$(macaddr_add $(cat /sys/class/net/eth0/address) 2)
-               [ "$PHYNBR" = "0" ] && macaddr_unsetbit $addr 6 > /sys${DEVPATH}/macaddress
-               [ "$PHYNBR" = "1" ] && macaddr_setbit $addr 6 > /sys${DEVPATH}/macaddress
+               addr=$(cat /sys/class/net/eth0/address)
+               [ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress
+               [ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress
                ;;
        cetron,ct3003)
                addr=$(mtd_get_mac_binary "art" 0)