aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 2aa19c89a94a..704cf2105795 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -86,8 +86,7 @@ int sysctl_tcp_low_latency;
86/* Socket used for sending RSTs */ 86/* Socket used for sending RSTs */
87static struct socket *tcp_socket; 87static struct socket *tcp_socket;
88 88
89void tcp_v4_send_check(struct sock *sk, struct tcphdr *th, int len, 89void tcp_v4_send_check(struct sock *sk, int len, struct sk_buff *skb);
90 struct sk_buff *skb);
91 90
92struct inet_hashinfo __cacheline_aligned tcp_hashinfo = { 91struct inet_hashinfo __cacheline_aligned tcp_hashinfo = {
93 .lhash_lock = RW_LOCK_UNLOCKED, 92 .lhash_lock = RW_LOCK_UNLOCKED,
@@ -645,10 +644,10 @@ out:
645} 644}
646 645
647/* This routine computes an IPv4 TCP checksum. */ 646/* This routine computes an IPv4 TCP checksum. */
648void tcp_v4_send_check(struct sock *sk, struct tcphdr *th, int len, 647void tcp_v4_send_check(struct sock *sk, int len, struct sk_buff *skb)
649 struct sk_buff *skb)
650{ 648{
651 struct inet_sock *inet = inet_sk(sk); 649 struct inet_sock *inet = inet_sk(sk);
650 struct tcphdr *th = skb->h.th;
652 651
653 if (skb->ip_summed == CHECKSUM_HW) { 652 if (skb->ip_summed == CHECKSUM_HW) {
654 th->check = ~tcp_v4_check(th, len, inet->saddr, inet->daddr, 0); 653 th->check = ~tcp_v4_check(th, len, inet->saddr, inet->daddr, 0);
@@ -1383,7 +1382,7 @@ int tcp_v4_tw_remember_stamp(struct inet_timewait_sock *tw)
1383 return 0; 1382 return 0;
1384} 1383}
1385 1384
1386struct tcp_func ipv4_specific = { 1385struct inet_connection_sock_af_ops ipv4_specific = {
1387 .queue_xmit = ip_queue_xmit, 1386 .queue_xmit = ip_queue_xmit,
1388 .send_check = tcp_v4_send_check, 1387 .send_check = tcp_v4_send_check,
1389 .rebuild_header = inet_sk_rebuild_header, 1388 .rebuild_header = inet_sk_rebuild_header,
@@ -1434,7 +1433,7 @@ static int tcp_v4_init_sock(struct sock *sk)
1434 sk->sk_write_space = sk_stream_write_space; 1433 sk->sk_write_space = sk_stream_write_space;
1435 sock_set_flag(sk, SOCK_USE_WRITE_QUEUE); 1434 sock_set_flag(sk, SOCK_USE_WRITE_QUEUE);
1436 1435
1437 tp->af_specific = &ipv4_specific; 1436 icsk->icsk_af_ops = &ipv4_specific;
1438 1437
1439 sk->sk_sndbuf = sysctl_tcp_wmem[1]; 1438 sk->sk_sndbuf = sysctl_tcp_wmem[1];
1440 sk->sk_rcvbuf = sysctl_tcp_rmem[1]; 1439 sk->sk_rcvbuf = sysctl_tcp_rmem[1];