From e93ac532aca2c699f19c43a080f2d8243e562a9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Kr=C3=B3lczyk?= Date: Fri, 1 Nov 2024 11:51:11 +0100 Subject: [PATCH] feat/stm32: disable multicast filtering on eth v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Initially, this was feature-gated, but has been requested to be changed to be unconditional, see PR 3488 for reasons. When filtering is enabled, it intercepts and drops silently ipv6 packets, possibly somewhere around smoltcp::iface::interface::ipv6 lines 36, 44 in current head sha e9b66eadaeacef758ebc4a12378f8d2162144cf4 With filtering disabled (this patch), packets are received and communication over ipv6 is possible, neighbor discovery works. related: #2496 Signed-off-by: Krzysztof Królczyk --- embassy-stm32/src/eth/v2/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/embassy-stm32/src/eth/v2/mod.rs b/embassy-stm32/src/eth/v2/mod.rs index b26f08cd9..9dd7f7d95 100644 --- a/embassy-stm32/src/eth/v2/mod.rs +++ b/embassy-stm32/src/eth/v2/mod.rs @@ -192,6 +192,9 @@ impl<'d, T: Instance, P: PHY> Ethernet<'d, T, P> { // TODO: Carrier sense ? ECRSFD }); + // Disable multicast filter + mac.macpfr().modify(|w| w.set_pm(true)); + // Note: Writing to LR triggers synchronisation of both LR and HR into the MAC core, // so the LR write must happen after the HR write. mac.maca0hr()