diff --git a/arch/arm/src/stm32h7/stm32_ethernet.c b/arch/arm/src/stm32h7/stm32_ethernet.c index 1c88e21ad98..db001b991ca 100644 --- a/arch/arm/src/stm32h7/stm32_ethernet.c +++ b/arch/arm/src/stm32h7/stm32_ethernet.c @@ -40,6 +40,7 @@ #include #include +#include #include #include @@ -2392,7 +2393,18 @@ static void stm32_receive(struct stm32_ethmac_s *priv) else #endif { - nwarn("WARNING: DROPPED Unknown type: %04x\n", BUF->type); +#ifdef CONFIG_NET_PKT + /* Frames that packet sockets consume (PTP over Ethernet and + * IPv6) were already given to pkt_input() above, so they are not + * unknown and must not be logged as dropped. + */ + + if (BUF->type != HTONS(ETH_P_1588) && + BUF->type != HTONS(ETHTYPE_IP6)) +#endif + { + nwarn("WARNING: DROPPED Unknown type: %04x\n", BUF->type); + } } /* We are finished with the RX buffer. NOTE: If the buffer is diff --git a/include/netinet/if_ether.h b/include/netinet/if_ether.h index db35a1c43a9..97fed0e4e11 100644 --- a/include/netinet/if_ether.h +++ b/include/netinet/if_ether.h @@ -51,6 +51,7 @@ #define ETH_P_IPV6 ETHERTYPE_IPV6 #define ETH_P_ARP ETHERTYPE_ARP #define ETH_P_TSN 0x22F0 /* TSN (IEEE 1722) packet */ +#define ETH_P_1588 0x88F7 /* PTP (IEEE 1588) over Ethernet packet */ /**************************************************************************** * Public Type Definitions