ath79: mikrotik: swap RB922UAGS-5HPaCD eth0/1 MACs
authorRoger Pueyo Centelles <roger.pueyo@guifi.net>
Thu, 29 Apr 2021 09:38:16 +0000 (11:38 +0200)
committerKoen Vandeputte <koen.vandeputte@ncentric.com>
Fri, 30 Apr 2021 08:01:00 +0000 (10:01 +0200)
Since support for SFP on the MikroTik RouterBOARD 922UAGS-5HPacD was
added by 4387fe00cb, the MAC addresses for eth0 (Ethernet) and eth1
(SFP) were swapped. This patch fixes the 02_network script to assign MAC
addresses correctly, so they match the label and the vendor's OS.

Tested on a RouterBOARD 922UAGS-5HPacD board.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
target/linux/ath79/mikrotik/base-files/etc/board.d/02_network

index 835e2caf93992122b39c39c5c358feaf0bb2310e..4ffe82588ca66c26b60521e7aa73ddfbd4244beb 100644 (file)
@@ -44,6 +44,11 @@ ath79_setup_macs()
                label_mac="$mac_base"
                lan_mac="$mac_base"
                ;;
+       mikrotik,routerboard-922uags-5hpacd)
+               label_mac="$mac_base"
+               lan_mac="$mac_base"
+               wan_mac=$(macaddr_add $mac_base 1)
+               ;;
        *)
                label_mac="$mac_base"
                wan_mac="$mac_base"