-
-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ramips: fix Xiaomi MiWiFi Mini board switch port define #2497
Conversation
Hi, please shorten your commit title and add a commit description. Despite, since you own this device, can you check whether it has a valid MAC address in factory 0x2e?
(Using 0x28 instead of 0x2e will return the MAC address currently used for ethernet). |
047dfae
to
3ddcddd
Compare
Hi @adrianschmutzler , I bought my device in Taiwan, not sure same setting in all markets. |
Hi, thanks for the update. I had another look at the content: This will label internal port 0 with "2" and internal port 1 with "1" in GUI. You did not explicitly comment about it, so I just want to make sure you do this on intention. Concerning the MAC addresses: At the moment, the address at 0x28 is set to eth0, and is inherited for WAN. |
I will check when back home. @changeway You have mac on label on case e.g: |
In my case (xiaomi mini) the correct address is on 0x28:
and this addess is assign to eth0 |
@kofec I just think that this local bit is uncommon, so I was curious whether a wan MAC address was there. |
@kofec Thanks for confirming the label MAC address. It's already in the DTS, as I originally took it from Gluon's list, but a real check is always better. @changeway Thanks for checking the address and for allowing me to hijack this PR for the discussion. |
Based on OpenWRT Table of Hardware > Xiaomi > Xiaomi Mi WiFi Mini Switch Ports Defaults: 0, 1: LAN 4: WAN 6: CPU Port in Web GUI (word printed on bottom of case) WAN(Internet) map to switch port 4 LAN1(.) map to switch port 1 LAN2(..) map to switch port 0 CPU map to switch port 6 current setting is 1 WAN/ 4 LAN port, fix it. Signed-off-by: Chih-Wei Chen <changeway@gmail.com>
3ddcddd
to
c8ede40
Compare
Hi @adrianschmutzler commit description updated, review it please. I connected the MiWiFi Mini from home to office remotely. The br-lan MAC address is match the MAC address show on the label. For the MAC address, I use hexdump to check on "Factory" partition. I had another old board with stock firmware : root@XiaoQiang:/# cat /proc/mtd root@XiaoQiang:/# hexdump -C /dev/mtd3ro 00008000 62 76 00 00 10 48 b1 e5 bb a0 62 76 c3 14 00 00 |bv...H....bv....| root@XiaoQiang:/# ifconfig wl0 Link encap:Ethernet HWaddr 10:48:B1:E5:BB:A0 wl1 Link encap:Ethernet HWaddr 10:48:B1:09:B6:F0 I think the MAC address is saved in the factory partition MAC address on label is MT7620 setting at address 0x0028 wl0 interface MAC address, WiFi 5G by MT7612 at address 0x8004 |
Thanks for clarifying the commit message. From your hexdump, I actually find a valid-looking address also in 0x2e: So, can you check which address is actually used for the WAN on the stock firmware? |
I setup a switch with mirror port function. The WAN use the same MAC address : 00 d0 59 60 00 03 In the Web-UI only show one MAC address Xiaomi MiWiFi Mini use the same MAC address for WAN and LAN on the stock firmware. |
@changeway For reviewer: |
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: #2497 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
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: openwrt/openwrt#2497 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Thanks. Pulled into my staging tree, will merge this to master in the next days. |
Fix Xiaomi MiWiFi Mini LAN port define :
LAN speed: 100M
LAN ports: 2
WAN speed: 100M
WAN ports: 1
current setting is 1 WAN/ 4 LAN port, so fix it.