From c341f6855b30670dbc1dc3c623a94280aedc3ce7 Mon Sep 17 00:00:00 2001 From: "Daniel P. Carvalho" Date: Thu, 8 Oct 2026 10:12:19 -0300 Subject: [PATCH] arch/mips/pic32mz: support promiscuous mode in the Ethernet driver. With CONFIG_NET_PROMISCUOUS, also enable the multicast and "not me" unicast receive filters (ETHRXFC MCEN and NOTMEEN), so that the MAC accepts every frame on the link, as the option's help text describes. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Daniel P. Carvalho --- arch/mips/src/pic32mz/pic32mz_ethernet.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/mips/src/pic32mz/pic32mz_ethernet.c b/arch/mips/src/pic32mz/pic32mz_ethernet.c index 77fd4c741ab..c5988db4d96 100644 --- a/arch/mips/src/pic32mz/pic32mz_ethernet.c +++ b/arch/mips/src/pic32mz/pic32mz_ethernet.c @@ -2356,11 +2356,17 @@ static int pic32mz_ifup(struct net_driver_s *dev) * multicast addresses (if so configured). NOTE: There is a selection * CONFIG_NET_BROADCAST, but this enables receipt of UDP broadcast packets * inside of the stack. + * + * In promiscuous mode, also accept multicast frames and unicast frames + * sent to other stations (NOTMEEN). */ regval = ETH_RXFC_BCEN | ETH_RXFC_UCEN | ETH_RXFC_PMMODE_DISABLED; -#ifdef CONFIG_PIC32MZ_MULTICAST +#if defined(CONFIG_PIC32MZ_MULTICAST) || defined(CONFIG_NET_PROMISCUOUS) regval |= ETH_RXFC_MCEN; +#endif +#ifdef CONFIG_NET_PROMISCUOUS + regval |= ETH_RXFC_NOTMEEN; #endif pic32mz_putreg(regval, PIC32MZ_ETH_RXFC);