ath79/mikrotik: don't use mtd-mac-address in DTS
authorThibaut VARÈNE <hacks@slashdirt.org>
Sun, 19 Apr 2020 10:09:20 +0000 (12:09 +0200)
committerKoen Vandeputte <koen.vandeputte@ncentric.com>
Fri, 8 May 2020 13:17:17 +0000 (15:17 +0200)
commit301bc3290df394bd39373ffc081818b56092b05f
tree64cc3a6d8071d2c664b9f1774b8ac3c7752f97da
parent31e99fe3daea9c402571c0bfa42e5d0d17d06809
ath79/mikrotik: don't use mtd-mac-address in DTS

As evidenced here[1] the device MAC address can be stored at a random
offset in the hard_config partition. Rely on sysfs to update the MAC
address correctly.

To match sticker and vendor OS behavior, WAN MAC is set to the device
base MAC and LAN MAC is incremented from that.

Note: this will trigger a harmless kernel message during boot:
ag71xx 19000000.eth: invalid MAC address, using random address

There is no clean workaround to prevent this message from being emitted.

[1] https://github.com/openwrt/openwrt/pull/2850#issuecomment-610809021

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
target/linux/ath79/dts/qca9556_mikrotik_routerboard-wap-g-5hact2hnd.dts
target/linux/ath79/dts/qca9558_mikrotik_routerboard-922uags-5hpacd.dts
target/linux/ath79/mikrotik/base-files/etc/board.d/02_network