From: Chris Packham Date: Wed, 25 Jan 2017 22:56:22 +1300 Subject: [U-Boot] [RFC PATCH v3 11/11] net: tsec: enable promiscuous mode In-Reply-To: <20170125095622.20326-1-judge.packham@gmail.com> References: <20170125095622.20326-1-judge.packham@gmail.com> Message-ID: <20170125095622.20326-12-judge.packham@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 Signed-off-by: Chris Packham --- 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)) redundant_init(priv); #endif +#ifdef CONFIG_NET6 + /* Enable promiscuous mode */ + setbits_be32(®s->rctrl, 0x8); +#endif /* Enable Transmit and Receive */ setbits_be32(®s->maccfg1, MACCFG1_RX_EN | MACCFG1_TX_EN); -- 2.11.0.24.ge6920cf