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 <theadib@gmail.com>
This commit is contained in:
Adib Taraben 2024-12-27 01:25:54 +01:00 committed by Benjamin Cabé
parent 5c886faa05
commit 7e2d020df5

View File

@ -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,