diff mbox

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

Message ID 20170125095622.20326-12-judge.packham@gmail.com
State RFC
Delegated to: Joe Hershberger
Headers show

Commit Message

Chris Packham Jan. 25, 2017, 9:56 a.m. UTC
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@alliedtelesis.co.nz>

Signed-off-by: Chris Packham <judge.packham@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 mbox

Patch

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))
 		redundant_init(priv);
 #endif
+#ifdef CONFIG_NET6
+	/* Enable promiscuous mode */
+	setbits_be32(&regs->rctrl, 0x8);
+#endif
 	/* Enable Transmit and Receive */
 	setbits_be32(&regs->maccfg1, MACCFG1_RX_EN | MACCFG1_TX_EN);