[OpenWrt-Devel] [PATCH] ramips:Fix mt7612 support for Xiaomi Mini.

郭传鈜 gch981213 at gmail.com
Thu Feb 5 09:43:42 EST 2015


Actually, you only need to run "make target/linux/clean" :D

2015-02-05 22:40 GMT+08:00 Roger Pueyo Centelles <rogerpueyo at rogerpueyo.com>
:

> Hi 郭传鈜,
>
> I did a make clean and then recompiled. Let me try with a completely new
> build, I will tell you in an hour or so.
>
> Thanks!
>
> 2015-02-05 13:56 GMT+01:00 郭传鈜 <gch981213 at gmail.com>:
>
>> I've asked someone to test this patch and he told me that the mt7612 got
>> a correct MAC address.......
>>
>> Why not try to print the EEPROM partition name and offest in eeprom.c?
>> Line 72:   part = of_get_property(np, "label", NULL);
>> Line 83:   offset = be32_to_cpup(list);
>> I'm not sure if 0x8000 could be passed correctly here.
>> BTW, have you recompiled the dts file after modifying it?
>>
>> 2015-02-05 3:18 GMT+08:00 Roger Pueyo Centelles <
>> rogerpueyo at rogerpueyo.com>:
>>
>>> 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
>>>>
>>>
>>>
>>> _______________________________________________
>>> 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/20150205/065b5c27/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