[OpenWrt-Devel] [PATCH] ramips:Fix mt7612 support for Xiaomi Mini.
Roger Pueyo Centelles
rogerpueyo at rogerpueyo.com
Wed Feb 4 14:18:17 EST 2015
Hi,
I tried with 0x8004 and I also got a random IP address. Actually, I changed
this block in in eeprom.c (line 571) [1]:
if (!is_valid_ether_addr(dev->macaddr)) {
eth_random_addr(dev->macaddr);
dev_printk(KERN_INFO, dev->dev,
"Invalid MAC address, using random address %pM\n",
dev->macaddr);
}
to:
if (!is_valid_ether_addr(dev->macaddr)) {
dev_printk(KERN_INFO, dev->dev,
"Invalid MAC address %pM\n",
dev->macaddr);
eth_random_addr(dev->macaddr);
dev_printk(KERN_INFO, dev->dev,
"Using random address %pM\n",
dev->macaddr);
}
and I see this message:
[ 15.000000] ASIC revision: 76120044
[ 15.000000] mt76pci 0000:01:00.0: Invalid MAC address ff:ff:ff:ff:ff:ff
[ 15.000000] mt76pci 0000:01:00.0: Using random address ca:a8:87:d8:65:45
[ 15.320000] ROM patch already applied
[ 15.330000] Firmware Version: 0.0.00
[ 15.330000] Build: 1
[ 15.330000] Build Time: 201406241830____
[ 15.360000] Firmware running!
[ 15.370000] pci device driver attached
[1] https://github.com/openwrt/mt76/blob/master/eeprom.c
2015-02-04 17:56 GMT+01:00 John Crispin <blogic at openwrt.org>:
>
>
> On 04/02/2015 17:08, Roger Pueyo Centelles wrote:
> > Hi,
> >
> >
> >
> > 2015-02-04 12:44 GMT+01:00 Chuanhong Guo <gch981213 at gmail.com
> > <mailto:gch981213 at gmail.com>>:
> >
> > From: 郭传鈜 <gch981213 at gmail.com <mailto:gch981213 at gmail.com>>
> >
> > 2ghz should be disabled on this router.
> >
> >
> > You're right. This should be patched.
> >
> >
> > And I think 'mediatek,mtd-eeprom' should be defined as<&factory
> > 32768> instead of <&factory 0x8000> according to WHR-1166D.dts
> > Actually I didn't have this router.But I think this is the reason
> > that the MT7612E radio always gets a random MAC address on this
> router.
> >
> >
> > Both definitions are the same, since 0x8000 hex == 32768 dec.
> >
>
> try 0x8004 as 0x8000 holds the chip id and right after that is where the
> mac is located
>
>
>
>
> >
> >
> > BTW,Roger,could you please test if this patch can fix the MAC
> > address problem you told in your mail?
> >
> >
> > I tried both, with equal results.
> >
> >
> >
> >
> > _______________________________________________
> > openwrt-devel mailing list
> > openwrt-devel at lists.openwrt.org
> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
> >
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150204/a8bf0545/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list