
From: Chris Packham chris.packham@alliedtelesis.co.nz
For IPv6 neighbor discovery to operate correctly we need to register for various multicast groups (because some neighbor discovery packets are sent to various multicast addresses).
Signed-off-by: Chris Packham chris.packham@alliedtelesis.co.nz --- Currently the multicast support in the tsec driver is conditional on CONFIG_MCAST_TFTP and tsec_mcast_addr, eth_mcast_join and eth_device->mcast all disagree on what the prototype for the function to add a multicast address should be. Instead of tackling this I've taken the cowards way out and just enabled promiscuous mode which means the device sees any packet regardless of the destination address. At some point we may need to decide to properly support registering for multicast groups or just always run in promiscuous mode.
Changes in v3: None Changes in v2: None
drivers/net/tsec.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c index f5e314b..005413b 100644 --- a/drivers/net/tsec.c +++ b/drivers/net/tsec.c @@ -361,6 +361,10 @@ static void startup_tsec(struct eth_device *dev) if ((SVR_MAJ(svr) == 1) || IS_SVR_REV(svr, 2, 0)) redundant_init(dev); #endif +#ifdef CONFIG_CMD_NET6 + /* Enable promiscuous mode */ + setbits_be32(®s->rctrl, 0x8); +#endif /* Enable Transmit and Receive */ setbits_be32(®s->maccfg1, MACCFG1_RX_EN | MACCFG1_TX_EN);