My suggestion was for the ifxmips.c ethernet driver in Linux, not
U-boot. A dirty hack to remove the filter upon initialization.
/target/linux/ifxmips/files/arch/mips/include/asm/mach-ifxmips/ifxmips.h
seems to lack the ENETS_CFG register, so I suggested that #define.
Then have a look at how other set_mac_address is made. adm5120 switch
driver calls eth_set_mac and then it's own function.. so you can set
the ndo_set_mac_address to ifxmips_set_macaddress and define something
like theirs. first tho define them in the ifxmips.h (ensure i'm right
about these, compare to linux and u-boot includes)
#define ENETS_CFG ((volatile u32
*)(IFXMIPS_PPE32_MEM_MAP + 0x1850))
#define ENET_MAC_DA0 ((volatile u32 *)(IFXMIPS_PPE32_MEM_MAP
+ (0x061B * 4)))
#define ENET_MAC_DA1 ((volatile u32 *)(IFXMIPS_PPE32_MEM_MAP
+ (0x061C * 4)))
static int ifxmips_set_mac_address(struct net_device *dev, void *p)
{
int ret;
struct sockaddr *addr = p;
ret = eth_mac_addr(dev, p);
if (ret)
return ret;
memcpy(ENET_MAC_DA0, addr->sa_data, ETH_ALEN);
return 0;
}
maybe?
R,
Scott.
On Fri, Nov 5, 2010 at 4:21 AM, Luca Olivetti <[email protected]> wrote:
> En/na Scott Nicholas ha escrit:
>>
>> Correct thing would be to initalize the values better in
>> ifxmips_mii_chip_init, so that filtering is not on, or to change
>> filter in set_mac?
>
> I don't think that the u-boot initialization should be touched, it's ok as
> it is.
> I think that the correct thing to do would be to amend the ifxmips.c
> ethernet driver to properly set promiscuous mode and the mac address, e.g.
> to define functions for ndo_set_mac_address and ndo_change_rx_flags, but
> that's the part I don't know how to do: I don't think I can simply access
> memory mapped register like uboot does, can I?
>
> Bye
> --
> Luca
> _______________________________________________
> 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