diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-23 12:23:45 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-23 12:23:45 -0700 |
commit | b0d19a378a409373244088511e889957645f2a44 (patch) | |
tree | 25275409eeea845f2e7617f12c8f28801ee4198f /net/ipv4 | |
parent | 0093cb1199ec551f179562ca9fbd6f64fb750645 (diff) | |
parent | d7d313000ba2fc94a5383511a17ff38a39bab928 (diff) | |
download | op-kernel-dev-b0d19a378a409373244088511e889957645f2a44.zip op-kernel-dev-b0d19a378a409373244088511e889957645f2a44.tar.gz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
iwlwifi: Fix built-in compilation of iwlcore
net: Unexport move_addr_to_{kernel,user}
rt2x00: Select LEDS_CLASS.
iwlwifi: Select LEDS_CLASS.
leds: Do not guard NEW_LEDS with HAS_IOMEM
[IPSEC]: Fix catch-22 with algorithm IDs above 31
time: Export set_normalized_timespec.
tcp: Make use of before macro in tcp_input.c
hamradio: Remove unneeded and deprecated cli()/sti() calls in dmascc.c
[NETNS]: Remove empty ->init callback.
[DCCP]: Convert do_gettimeofday() to getnstimeofday().
[NETNS]: Don't initialize err variable twice.
[NETNS]: The ip6_fib_timer can work with garbage on net namespace stop.
[IPV4]: Convert do_gettimeofday() to getnstimeofday().
[IPV4]: Make icmp_sk_init() static.
[IPV6]: Make struct ip6_prohibit_entry_template static.
tcp: Trivial fix to correct function name in a comment in net/ipv4/tcp.c
[NET]: Expose netdevice dev_id through sysfs
skbuff: fix missing kernel-doc notation
[ROSE]: Fix soft lockup wrt. rose_node_list_lock
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/icmp.c | 10 | ||||
-rw-r--r-- | net/ipv4/ip_options.c | 12 | ||||
-rw-r--r-- | net/ipv4/tcp.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 2 |
4 files changed, 13 insertions, 13 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index f064031..c67d00e 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -847,7 +847,7 @@ static void icmp_echo(struct sk_buff *skb) */ static void icmp_timestamp(struct sk_buff *skb) { - struct timeval tv; + struct timespec tv; struct icmp_bxm icmp_param; /* * Too short. @@ -858,9 +858,9 @@ static void icmp_timestamp(struct sk_buff *skb) /* * Fill in the current time as ms since midnight UT: */ - do_gettimeofday(&tv); - icmp_param.data.times[1] = htonl((tv.tv_sec % 86400) * 1000 + - tv.tv_usec / 1000); + getnstimeofday(&tv); + icmp_param.data.times[1] = htonl((tv.tv_sec % 86400) * MSEC_PER_SEC + + tv.tv_nsec / NSEC_PER_MSEC); icmp_param.data.times[2] = icmp_param.data.times[1]; if (skb_copy_bits(skb, 0, &icmp_param.data.times[0], 4)) BUG(); @@ -1144,7 +1144,7 @@ static void __net_exit icmp_sk_exit(struct net *net) net->ipv4.icmp_sk = NULL; } -int __net_init icmp_sk_init(struct net *net) +static int __net_init icmp_sk_init(struct net *net) { int i, err; diff --git a/net/ipv4/ip_options.c b/net/ipv4/ip_options.c index d107543d..33126ad 100644 --- a/net/ipv4/ip_options.c +++ b/net/ipv4/ip_options.c @@ -55,10 +55,10 @@ void ip_options_build(struct sk_buff * skb, struct ip_options * opt, if (opt->ts_needaddr) ip_rt_get_source(iph+opt->ts+iph[opt->ts+2]-9, rt); if (opt->ts_needtime) { - struct timeval tv; + struct timespec tv; __be32 midtime; - do_gettimeofday(&tv); - midtime = htonl((tv.tv_sec % 86400) * 1000 + tv.tv_usec / 1000); + getnstimeofday(&tv); + midtime = htonl((tv.tv_sec % 86400) * MSEC_PER_SEC + tv.tv_nsec / NSEC_PER_MSEC); memcpy(iph+opt->ts+iph[opt->ts+2]-5, &midtime, 4); } return; @@ -406,10 +406,10 @@ int ip_options_compile(struct net *net, break; } if (timeptr) { - struct timeval tv; + struct timespec tv; __be32 midtime; - do_gettimeofday(&tv); - midtime = htonl((tv.tv_sec % 86400) * 1000 + tv.tv_usec / 1000); + getnstimeofday(&tv); + midtime = htonl((tv.tv_sec % 86400) * MSEC_PER_SEC + tv.tv_nsec / NSEC_PER_MSEC); memcpy(timeptr, &midtime, sizeof(__be32)); opt->is_changed = 1; } diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 58ac838..f886531 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -1722,7 +1722,7 @@ static int tcp_close_state(struct sock *sk) /* * Shutdown the sending side of a connection. Much like close except - * that we don't receive shut down or set_sock_flag(sk, SOCK_DEAD). + * that we don't receive shut down or sock_set_flag(sk, SOCK_DEAD). */ void tcp_shutdown(struct sock *sk, int how) diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index cdc051b..ac9b848 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -2298,7 +2298,7 @@ static inline int tcp_packet_delayed(struct tcp_sock *tp) { return !tp->retrans_stamp || (tp->rx_opt.saw_tstamp && tp->rx_opt.rcv_tsecr && - (__s32)(tp->rx_opt.rcv_tsecr - tp->retrans_stamp) < 0); + before(tp->rx_opt.rcv_tsecr, tp->retrans_stamp)); } /* Undo procedures. */ |