diff options
author | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2019-10-21 15:40:32 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2019-10-22 11:45:50 +0200 |
commit | fd1d03f8536aa232ab1a164cc340791858f3ae89 (patch) | |
tree | 8266e09519a0fdb1b848e1274c3e6a6eb2caf85b /target/linux/ramips/base-files | |
parent | 940844e077d7d41bc94728f42b39a65854d38b87 (diff) | |
download | upstream-fd1d03f8536aa232ab1a164cc340791858f3ae89.tar.gz upstream-fd1d03f8536aa232ab1a164cc340791858f3ae89.tar.bz2 upstream-fd1d03f8536aa232ab1a164cc340791858f3ae89.zip |
ramips: fix LAN/WAN MAC addresses of Xiaomi MiWiFi Mini board
Based on stock firmware tests, both LAN and WAN ports use the
MAC address from 0x28 on factory partition.
In OpenWrt, this one is already set in DTS. This patch removes the
local bit set in 02_network previously, and adjusts LAN/WAN
addresses as on stock firmware.
Note that in tests we found a MAC address in 0x2e that is the one
in 0x28 plus 1. Since stock firmware does not use it though, we
do not use it either.
Thanks to Chih-Wei Chen for testing this on his device.
ref: https://github.com/openwrt/openwrt/pull/2497
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/ramips/base-files')
-rwxr-xr-x | target/linux/ramips/base-files/etc/board.d/02_network | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index ded416ae98..b6c3ae42cb 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -587,6 +587,7 @@ ramips_setup_macs() buffalo,whr-g300n|\ buffalo,wsr-600dhp|\ glinet,gl-mt300n-v2|\ + xiaomi,miwifi-mini|\ zyxel,keenetic-start) # This empty case has to be kept for devices without any MAC address adjustments ;; @@ -721,9 +722,6 @@ ramips_setup_macs() lan_mac=$(mtd_get_mac_binary factory 0xe006) label_mac=$lan_mac ;; - xiaomi,miwifi-mini) - lan_mac=$(macaddr_setbit_la "$(cat /sys/class/net/eth0/address)") - ;; zbtlink,zbt-we1326) wan_mac=$(mtd_get_mac_binary factory 0xe006) label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) |