mirror of
https://github.com/apache/nuttx.git
synced 2026-10-10 07:40:27 +00:00
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 <danieloak@gmail.com>
This commit is contained in:
parent
a4b6b8b8bf
commit
c341f6855b
1 changed files with 7 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue