From: Adrian Schmutzler Date: Mon, 7 Oct 2019 15:08:52 +0000 (+0200) Subject: ramips: fix WiFi MAC addresses for D-Link DIR-810L X-Git-Tag: v19.07.0-rc1~12 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8f0deedc11f1036c88d9fdd23cdedc2ebc8c7942;p=oweals%2Fopenwrt.git ramips: fix WiFi MAC addresses for D-Link DIR-810L So far, WiFi MAC addresses for this device have been set up from caldata. However, this returns values which do not look like MAC addresses. They also do not match stock firmware: wlan0 (5.0): 00:11:22:00:17:D0 from 0x8004 wlan1 (2.4): 00:11:22:00:17:CD from 0x4 (and 0x2e) It looks like the only valid MAC address on this device is at 0x28. So, this patch changes setup to calculate addresses based on the value at 0x28: lan: *:0A (flash, label) wan: *:0B (flash + 1) wifi2: *:0A (flash) wifi5: *:0C (flash + 2) Thanks to Roger Pueyo Centelles for investigating this on his devices. Signed-off-by: Adrian Schmutzler (cherry picked from commit d1072096f49823eb39357f9555d7854a9c91bcfb) --- diff --git a/target/linux/ramips/dts/DIR-810L.dts b/target/linux/ramips/dts/DIR-810L.dts index d728449a48..0887620053 100644 --- a/target/linux/ramips/dts/DIR-810L.dts +++ b/target/linux/ramips/dts/DIR-810L.dts @@ -142,7 +142,8 @@ }; &wmac { - ralink,mtd-eeprom = <&factory 0>; + ralink,mtd-eeprom = <&factory 0x0>; + mtd-mac-address = <&factory 0x28>; }; &pcie0 { @@ -150,5 +151,7 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x8000>; ieee80211-freq-limit = <5000000 6000000>; + mtd-mac-address = <&factory 0x28>; + mtd-mac-address-increment = <2>; }; };