On Fri, Jun 3, 2011 at 12:42 PM, Layne Edwards <ledwa...@astrumtech.net>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. > For your reset button issue: > Have you checked to make sure your GPIOs are toggled when the respective > button is pressed... just to make sure the GPIOs are configured properly for > your device? See /sys/kernel/debug/gpio. > > Regards, > Layne > > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel > >
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel