[PATCH net-next v4 1/5] net: dsa: mv88e6xxx: only time stamp PTPv2 frames
From: Luke Howard
Date: Mon Jul 27 2026 - 00:01:15 EST
Marvell switches only document support for IEEE 1588v2, not for PTPv1
(IEEE 1588-2022). Reject PTPv1 frames in mv88e6xxx_should_tstamp().
Assisted-by: Claude:claude-opus-5
Signed-off-by: Luke Howard <lukeh@xxxxxxxx>
---
drivers/net/dsa/mv88e6xxx/hwtstamp.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/dsa/mv88e6xxx/hwtstamp.c b/drivers/net/dsa/mv88e6xxx/hwtstamp.c
index 6e6472a3b75ad..e4326165e1896 100644
--- a/drivers/net/dsa/mv88e6xxx/hwtstamp.c
+++ b/drivers/net/dsa/mv88e6xxx/hwtstamp.c
@@ -216,6 +216,10 @@ static struct ptp_header *mv88e6xxx_should_tstamp(struct mv88e6xxx_chip *chip,
if (!chip->info->ptp_support)
return NULL;
+ /* Marvell switches do not support IEEE 1588-2002 (PTPv1). */
+ if ((type & PTP_CLASS_VMASK) != PTP_CLASS_V2)
+ return NULL;
+
hdr = ptp_parse_header(skb, type);
if (!hdr)
return NULL;
--
2.43.0