Skip to content

Commit c49a35e

Browse files
vladimirolteankuba-moo
authored andcommitted
net: mscc: ocelot: correctly report the timestamping RX filters in ethtool
The driver doesn't support RX timestamping for non-PTP packets, but it declares that it does. Restrict the reported RX filters to PTP v2 over L2 and over L4. Fixes: 4e3b046 ("net: mscc: PTP Hardware Clock (PHC) support") Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 96ca08c commit c49a35e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/net/ethernet/mscc/ocelot.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1677,7 +1677,10 @@ int ocelot_get_ts_info(struct ocelot *ocelot, int port,
16771677
SOF_TIMESTAMPING_RAW_HARDWARE;
16781678
info->tx_types = BIT(HWTSTAMP_TX_OFF) | BIT(HWTSTAMP_TX_ON) |
16791679
BIT(HWTSTAMP_TX_ONESTEP_SYNC);
1680-
info->rx_filters = BIT(HWTSTAMP_FILTER_NONE) | BIT(HWTSTAMP_FILTER_ALL);
1680+
info->rx_filters = BIT(HWTSTAMP_FILTER_NONE) |
1681+
BIT(HWTSTAMP_FILTER_PTP_V2_EVENT) |
1682+
BIT(HWTSTAMP_FILTER_PTP_V2_L2_EVENT) |
1683+
BIT(HWTSTAMP_FILTER_PTP_V2_L4_EVENT);
16811684

16821685
return 0;
16831686
}

0 commit comments

Comments
 (0)