diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/net/socket.c b/net/socket.c index abf56b2a14f9..d8222c025061 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -725,14 +725,10 @@ void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk, | |||
725 | if (sock_flag(sk, SOCK_TIMESTAMPING_SOFTWARE) && | 725 | if (sock_flag(sk, SOCK_TIMESTAMPING_SOFTWARE) && |
726 | ktime_to_timespec_cond(skb->tstamp, ts + 0)) | 726 | ktime_to_timespec_cond(skb->tstamp, ts + 0)) |
727 | empty = 0; | 727 | empty = 0; |
728 | if (shhwtstamps) { | 728 | if (shhwtstamps && |
729 | if (sock_flag(sk, SOCK_TIMESTAMPING_SYS_HARDWARE) && | 729 | sock_flag(sk, SOCK_TIMESTAMPING_RAW_HARDWARE) && |
730 | ktime_to_timespec_cond(shhwtstamps->syststamp, ts + 1)) | 730 | ktime_to_timespec_cond(shhwtstamps->hwtstamp, ts + 2)) |
731 | empty = 0; | 731 | empty = 0; |
732 | if (sock_flag(sk, SOCK_TIMESTAMPING_RAW_HARDWARE) && | ||
733 | ktime_to_timespec_cond(shhwtstamps->hwtstamp, ts + 2)) | ||
734 | empty = 0; | ||
735 | } | ||
736 | if (!empty) | 732 | if (!empty) |
737 | put_cmsg(msg, SOL_SOCKET, | 733 | put_cmsg(msg, SOL_SOCKET, |
738 | SCM_TIMESTAMPING, sizeof(ts), &ts); | 734 | SCM_TIMESTAMPING, sizeof(ts), &ts); |