From e915dcad138e97e83128c14bc7aaa99a95cc9ef0 Mon Sep 17 00:00:00 2001 From: Nicolas Pitre Date: Mon, 22 Nov 2021 10:52:38 -0500 Subject: [PATCH] ethernet: dwmac: fix promiscuous mode The dedicated PR (Promiscuous Mode) bit should be used instead of the RA (Receive All) bit. Signed-off-by: Nicolas Pitre --- drivers/ethernet/eth_dwmac.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/ethernet/eth_dwmac.c b/drivers/ethernet/eth_dwmac.c index 229cde973a8..2b4a04e7a56 100644 --- a/drivers/ethernet/eth_dwmac.c +++ b/drivers/ethernet/eth_dwmac.c @@ -487,13 +487,13 @@ static int dwmac_set_config(const struct device *dev, case ETHERNET_CONFIG_TYPE_PROMISC_MODE: reg_val = REG_READ(MAC_PKT_FILTER); if (config->promisc_mode && - !(reg_val & MAC_PKT_FILTER_RA)) { + !(reg_val & MAC_PKT_FILTER_PR)) { REG_WRITE(MAC_PKT_FILTER, - reg_val | MAC_PKT_FILTER_RA); + reg_val | MAC_PKT_FILTER_PR); } else if (!config->promisc_mode && - (reg_val & MAC_PKT_FILTER_RA)) { + (reg_val & MAC_PKT_FILTER_PR)) { REG_WRITE(MAC_PKT_FILTER, - reg_val & ~MAC_PKT_FILTER_RA); + reg_val & ~MAC_PKT_FILTER_PR); } else { ret = -EALREADY; }