Commit b8210a9e authored by Miroslav Lichvar's avatar Miroslav Lichvar Committed by David S. Miller

net: define receive timestamp filter for NTP

Add HWTSTAMP_FILTER_NTP_ALL to the hwtstamp_rx_filters enum for
timestamping of NTP packets. There is currently only one driver
(phyter) that could support it directly.

CC: Richard Cochran <richardcochran@gmail.com>
CC: Willem de Bruijn <willemb@google.com>
Signed-off-by: default avatarMiroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2061ec3f
...@@ -125,6 +125,9 @@ enum hwtstamp_rx_filters { ...@@ -125,6 +125,9 @@ enum hwtstamp_rx_filters {
HWTSTAMP_FILTER_PTP_V2_SYNC, HWTSTAMP_FILTER_PTP_V2_SYNC,
/* PTP v2/802.AS1, any layer, Delay_req packet */ /* PTP v2/802.AS1, any layer, Delay_req packet */
HWTSTAMP_FILTER_PTP_V2_DELAY_REQ, HWTSTAMP_FILTER_PTP_V2_DELAY_REQ,
/* NTP, UDP, all versions and packet modes */
HWTSTAMP_FILTER_NTP_ALL,
}; };
#endif /* _NET_TIMESTAMPING_H */ #endif /* _NET_TIMESTAMPING_H */
...@@ -227,6 +227,8 @@ static int net_hwtstamp_validate(struct ifreq *ifr) ...@@ -227,6 +227,8 @@ static int net_hwtstamp_validate(struct ifreq *ifr)
case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ: case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ:
rx_filter_valid = 1; rx_filter_valid = 1;
break; break;
case HWTSTAMP_FILTER_NTP_ALL:
break;
} }
if (!tx_type_valid || !rx_filter_valid) if (!tx_type_valid || !rx_filter_valid)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment