[U-Boot] [RFC PATCH v3 11/11] net: tsec: enable promiscuous mode

Chris Packham judge.packham at gmail.com
Wed Jan 25 10:56:22 CET 2017

IPv6 neighbor discovery uses various multicast addresses to send the
request and receive the response. For neighbor discovery to work
properly in U-boot the Ethernet device needs to support joining/leaving
various multicast groups or it needs to support multicast/promiscuous
mode. For the sake of simplicity the latter approach has been taken.

Signed-off-by: Chris Packham <chris.packham at alliedtelesis.co.nz>

Signed-off-by: Chris Packham <judge.packham at gmail.com>
Drivers that support multicast reception have it enabled/disabled with
CONFIG_MCAST_TFTP. It wouldn't be too hard to create a separate
CONFIG_MCAST that is selected by enabling CONFIG_MCAST_TFTP or
CONFIG_NET6 but for now I want to concentrate on getting the rest of the
IPv6 code in good shape.

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 7df4c63acfd7..d97bafec1eb2 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -515,6 +515,10 @@ static void startup_tsec(struct tsec_private *priv)
 	if ((SVR_MAJ(svr) == 1) || IS_SVR_REV(svr, 2, 0))
+#ifdef CONFIG_NET6
+	/* Enable promiscuous mode */
+	setbits_be32(&regs->rctrl, 0x8);
 	/* Enable Transmit and Receive */
 	setbits_be32(&regs->maccfg1, MACCFG1_RX_EN | MACCFG1_TX_EN);

More information about the U-Boot mailing list