aboutsummaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
authorGerhard Engleder <[email protected]>2022-05-06 20:01:39 +0000
committerPaolo Abeni <[email protected]>2022-05-10 07:48:08 +0000
commitd58809d854c9ee19e4cd41023e137e65e9dc3f94 (patch)
treef86bb3e845ae311198669bfc90f2f0d4b1a4f3d7 /net/socket.c
parentptp: Request cycles for TX timestamp (diff)
downloadkernel-d58809d854c9ee19e4cd41023e137e65e9dc3f94.tar.gz
kernel-d58809d854c9ee19e4cd41023e137e65e9dc3f94.zip
ptp: Pass hwtstamp to ptp_convert_timestamp()
ptp_convert_timestamp() converts only the timestamp hwtstamp, which is a field of the argument with the type struct skb_shared_hwtstamps *. So a pointer to the hwtstamp field of this structure is sufficient. Rework ptp_convert_timestamp() to use an argument of type ktime_t *. This allows to add additional timestamp manipulation stages before the call of ptp_convert_timestamp(). Signed-off-by: Gerhard Engleder <[email protected]> Acked-by: Richard Cochran <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/socket.c b/net/socket.c
index 5c1c5e6100e1..0f680c7d968a 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -888,7 +888,7 @@ void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk,
(sk->sk_tsflags & SOF_TIMESTAMPING_RAW_HARDWARE) &&
!skb_is_swtx_tstamp(skb, false_tstamp)) {
if (sk->sk_tsflags & SOF_TIMESTAMPING_BIND_PHC)
- hwtstamp = ptp_convert_timestamp(shhwtstamps,
+ hwtstamp = ptp_convert_timestamp(&shhwtstamps->hwtstamp,
sk->sk_bind_phc);
else
hwtstamp = shhwtstamps->hwtstamp;