mediatek: bpi-r3-mini: persist WiFi and WAN MAC addresses
authorDaniel Golle <daniel@makrotopia.org>
Sun, 28 Apr 2024 02:00:50 +0000 (03:00 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Sun, 28 Apr 2024 20:46:51 +0000 (21:46 +0100)
Derive WAN and WiFi MAC addresses from the (random) MAC address stored
in the U-Boot environment.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
target/linux/mediatek/filogic/base-files/etc/board.d/02_network
target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac

index 51e02efb39f853e184aae3dc82ac736d25ec886a..597754da7bb8fbcbf056cca7f4467b63f03f44d8 100644 (file)
@@ -119,7 +119,8 @@ mediatek_setup_macs()
        local label_mac=""
 
        case $board in
-       bananapi,bpi-r3)
+       bananapi,bpi-r3|\
+       bananapi,bpi-r3-mini)
                wan_mac=$(macaddr_add $(cat /sys/class/net/eth0/address) 1)
                ;;
        cmcc,rax3000m)
index bd6e7759630ca0f7fd36c40f27d6e44df243e650..53c9b7f259e3fdaca80d465fda36f60634eecb0b 100644 (file)
@@ -36,7 +36,8 @@ case "$board" in
                [ "$PHYNBR" = "0" ] && macaddr_setbit_la $(macaddr_add $addr 1) > /sys${DEVPATH}/macaddress
                [ "$PHYNBR" = "1" ] && echo "$addr" > /sys${DEVPATH}/macaddress
                ;;
-       bananapi,bpi-r3)
+       bananapi,bpi-r3|\
+       bananapi,bpi-r3-mini)
                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