Skip to content

Commit

Permalink
eth_nxp_enet_qos_mac: enable pass through of multicasts
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
theadib authored and kartben committed Jan 7, 2025
1 parent 5c886fa commit 7e2d020
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/ethernet/eth_nxp_enet_qos/eth_nxp_enet_qos_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 7e2d020

Please sign in to comment.