On Fri, Jun 3, 2011 at 2:15 PM, Layne Edwards <[email protected]>wrote:

>  On Fri, 3 Jun 2011 13:50:17 +0800, HP Teoh wrote:
>
>
> On Fri, Jun 3, 2011 at 12:42 PM, Layne Edwards <[email protected]>wrote:
>
>>  On Fri, 3 Jun 2011 12:01:55 +0800, HP Teoh wrote:
>>
>> Hi Lanyne,
>>
>> Thanks for the wifi led configuration.  Any idea about the reset button
>> not working and method to insert 2nd mac for vlan?
>>
>> Thanks and Regards.
>> -Vincent
>>
>>  Vincent,
>>
>> For your MAC issue:
>> The current ethernet and switch drivers for the ramips target still need
>> some work.  The VLAN is hardcoded and the MAC address is not pulled from
>> flash or eeprom, but hard-coded to 00:11:22:33:44:55.  See the
>> ramips_eth_data struct in
>> linux/ramips/files/arch/mips/ralink/rt305x/devices.c.  The ethernet driver
>> (linux/ramips/files/driver/net/ramips.c needs to be updated to pull in the
>> ethernet MAC instead of using the default hard-coded value.
>>
> Hi Layne,
>
> I added some code to read and pull the MACs out of mtdblock3 (factory) and
> write both addresses to
>
> static inline void
> ramips_hw_set_macaddr(unsigned char *mac)
> {
>     ramips_fe_wr((mac[0] << 8) | mac[1], RAMIPS_GDMA1_MAC_ADRH);
>     ramips_fe_wr((mac[2] << 24) | (mac[3] << 16) | (mac[4] << 8) | mac[5],
>              RAMIPS_GDMA1_MAC_ADRL);
> }
>
> static inline void
> ramips_hw_set_mac2addr(unsigned char *mac)
> {
>     ramips_fe_wr((mac[0] << 8) | mac[1], RAMIPS_GDMA2_MAC_ADRH);
>     ramips_fe_wr((mac[2] << 24) | (mac[3] << 16) | (mac[4] << 8) | mac[5],
>              RAMIPS_GDMA2_MAC_ADRL);
> }
>
> However, the system only sees and takes the first one.
>
> Vincent,
>
> If you're talking about WAN and LAN having different MACs... just remember
> that the WAN and LAN are on a VLAN and share the same interface (eth0), so
> they will have the same MAC (same as eth0).  I think you can set the MACs
> for WAN and LAN independently in the configuration though.  Something like:
>
> config 'interface' 'wan'
>         option 'ifname' 'eth0.2'
>         option 'proto' 'dhcp'
>         option 'macaddr' '1234567890'
>
> See http://wiki.openwrt.org/doc/uci/network.
>

Hi Layne,

Yes.  This is the method I'm currently using for the second MAC.  I thought
the mac address can be somehow programmed to a vlan driver.

As for the Reset button GPIO settings, I don't see GPIO PIN 10 for Reset
button been assigned.  Have I missed anything?

GPIOs 0-23, RT305X-GPIO0:
 gpio-1   (reserved            ) in  lo
 gpio-2   (reserved            ) in  lo
 gpio-3   (reserved            ) in  lo
 gpio-4   (reserved            ) in  lo
 gpio-7   (wiwi-300n:green:wifi) out hi
 gpio-15  (reserved            ) in  lo
 gpio-16  (reserved            ) in  lo
 gpio-17  (reserved            ) in  lo
 gpio-18  (reserved            ) in  lo
 gpio-22  (reserved            ) in  lo
 gpio-23  (reserved            ) in  lo

GPIOs 24-39, RT305X-GPIO1:
 gpio-24  (reserved            ) in  lo
 gpio-25  (reserved            ) in  lo
 gpio-26  (reserved            ) in  lo
 gpio-27  (reserved            ) in  lo
 gpio-28  (reserved            ) in  lo
 gpio-29  (reserved            ) in  lo
 gpio-30  (reserved            ) in  lo
 gpio-31  (reserved            ) in  lo
 gpio-32  (reserved            ) in  lo
 gpio-33  (reserved            ) in  lo
 gpio-34  (reserved            ) in  lo
 gpio-35  (reserved            ) in  lo
 gpio-36  (reserved            ) in  lo
 gpio-37  (reserved            ) in  lo
 gpio-38  (reserved            ) in  lo
 gpio-39  (reserved            ) in  lo

GPIOs 40-51, RT305X-GPIO2:
 gpio-40  (reserved            ) in  lo
 gpio-41  (reserved            ) in  lo
 gpio-42  (reserved            ) in  lo
 gpio-43  (reserved            ) in  lo
 gpio-44  (reserved            ) in  lo
 gpio-45  (reserved            ) in  lo
 gpio-46  (reserved            ) in  lo
 gpio-47  (reserved            ) in  lo
 gpio-48  (reserved            ) in  lo
 gpio-49  (reserved            ) in  lo
 gpio-50  (reserved            ) in  lo
 gpio-51  (reserved            ) in  lo


Thanks and Regards.
Vincent



> Hope this helps.
>
> Layne
>
> _______________________________________________
> openwrt-devel mailing list
> [email protected]
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
>
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to