[DCCP] options: convert dccp_insert_option_timestamp to ktime_t
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>
Mon, 20 Aug 2007 00:18:55 +0000 (17:18 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:48:16 +0000 (16:48 -0700)
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/options.c

index 95b75d8..439e25d 100644 (file)
@@ -388,11 +388,7 @@ EXPORT_SYMBOL_GPL(dccp_timestamp);
 
 int dccp_insert_option_timestamp(struct sock *sk, struct sk_buff *skb)
 {
-       struct timeval tv;
-       __be32 now;
-
-       dccp_timestamp(sk, &tv);
-       now = htonl(timeval_usecs(&tv) / 10);
+       __be32 now = htonl(((suseconds_t)ktime_to_us(ktime_get_real())) / 10);
        /* yes this will overflow but that is the point as we want a
         * 10 usec 32 bit timer which mean it wraps every 11.9 hours */