From 7e2d020df5dcb6092147565222fd3ee80922a6cd Mon Sep 17 00:00:00 2001 From: Adib Taraben Date: Fri, 27 Dec 2024 01:25:54 +0100 Subject: [PATCH] eth_nxp_enet_qos_mac: enable pass through of multicasts first check if the chip has a hosh module to futher filter MAC addresses if not then enabling the pass through for all multicast protocols Signed-off-by: Adib Taraben --- drivers/ethernet/eth_nxp_enet_qos/eth_nxp_enet_qos_mac.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/ethernet/eth_nxp_enet_qos/eth_nxp_enet_qos_mac.c b/drivers/ethernet/eth_nxp_enet_qos/eth_nxp_enet_qos_mac.c index 7f2d5bf9872..e2a51df0fe4 100644 --- a/drivers/ethernet/eth_nxp_enet_qos/eth_nxp_enet_qos_mac.c +++ b/drivers/ethernet/eth_nxp_enet_qos/eth_nxp_enet_qos_mac.c @@ -156,7 +156,7 @@ static void tx_dma_done(struct k_work *work) static enum ethernet_hw_caps eth_nxp_enet_qos_get_capabilities(const struct device *dev) { - return ETHERNET_LINK_100BASE_T | ETHERNET_LINK_10BASE_T; + return ETHERNET_LINK_100BASE_T | ETHERNET_LINK_10BASE_T | ENET_MAC_PACKET_FILTER_PM_MASK; } static void eth_nxp_enet_qos_rx(struct k_work *work) @@ -375,6 +375,11 @@ static inline void enet_qos_mac_config_init(enet_qos_t *base, data->mac_addr.addr[1] << 8 | data->mac_addr.addr[0]); + /* permit multicast packets if there is no space in hash table for mac addresses */ + if ((base->MAC_HW_FEAT[1] & ENET_MAC_HW_FEAT_HASHTBLSZ_MASK) == 0) { + base->MAC_PACKET_FILTER |= ENET_MAC_PACKET_FILTER_PM_MASK; + } + /* Set the reference for 1 microsecond of ENET QOS CSR clock cycles */ base->MAC_ONEUS_TIC_COUNTER = ENET_QOS_REG_PREP(MAC_ONEUS_TIC_COUNTER, TIC_1US_CNTR,