diff options
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 9ac7a4f46bd8..00aa80e93243 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -1413,7 +1413,7 @@ recv_urg: | |||
1413 | * closed. | 1413 | * closed. |
1414 | */ | 1414 | */ |
1415 | 1415 | ||
1416 | static unsigned char new_state[16] = { | 1416 | static const unsigned char new_state[16] = { |
1417 | /* current state: new state: action: */ | 1417 | /* current state: new state: action: */ |
1418 | /* (Invalid) */ TCP_CLOSE, | 1418 | /* (Invalid) */ TCP_CLOSE, |
1419 | /* TCP_ESTABLISHED */ TCP_FIN_WAIT1 | TCP_ACTION_FIN, | 1419 | /* TCP_ESTABLISHED */ TCP_FIN_WAIT1 | TCP_ACTION_FIN, |
@@ -1696,8 +1696,8 @@ int tcp_setsockopt(struct sock *sk, int level, int optname, char __user *optval, | |||
1696 | int err = 0; | 1696 | int err = 0; |
1697 | 1697 | ||
1698 | if (level != SOL_TCP) | 1698 | if (level != SOL_TCP) |
1699 | return tp->af_specific->setsockopt(sk, level, optname, | 1699 | return icsk->icsk_af_ops->setsockopt(sk, level, optname, |
1700 | optval, optlen); | 1700 | optval, optlen); |
1701 | 1701 | ||
1702 | /* This is a string value all the others are int's */ | 1702 | /* This is a string value all the others are int's */ |
1703 | if (optname == TCP_CONGESTION) { | 1703 | if (optname == TCP_CONGESTION) { |
@@ -1914,7 +1914,7 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info) | |||
1914 | info->tcpi_last_data_recv = jiffies_to_msecs(now - icsk->icsk_ack.lrcvtime); | 1914 | info->tcpi_last_data_recv = jiffies_to_msecs(now - icsk->icsk_ack.lrcvtime); |
1915 | info->tcpi_last_ack_recv = jiffies_to_msecs(now - tp->rcv_tstamp); | 1915 | info->tcpi_last_ack_recv = jiffies_to_msecs(now - tp->rcv_tstamp); |
1916 | 1916 | ||
1917 | info->tcpi_pmtu = tp->pmtu_cookie; | 1917 | info->tcpi_pmtu = icsk->icsk_pmtu_cookie; |
1918 | info->tcpi_rcv_ssthresh = tp->rcv_ssthresh; | 1918 | info->tcpi_rcv_ssthresh = tp->rcv_ssthresh; |
1919 | info->tcpi_rtt = jiffies_to_usecs(tp->srtt)>>3; | 1919 | info->tcpi_rtt = jiffies_to_usecs(tp->srtt)>>3; |
1920 | info->tcpi_rttvar = jiffies_to_usecs(tp->mdev)>>2; | 1920 | info->tcpi_rttvar = jiffies_to_usecs(tp->mdev)>>2; |
@@ -1939,8 +1939,8 @@ int tcp_getsockopt(struct sock *sk, int level, int optname, char __user *optval, | |||
1939 | int val, len; | 1939 | int val, len; |
1940 | 1940 | ||
1941 | if (level != SOL_TCP) | 1941 | if (level != SOL_TCP) |
1942 | return tp->af_specific->getsockopt(sk, level, optname, | 1942 | return icsk->icsk_af_ops->getsockopt(sk, level, optname, |
1943 | optval, optlen); | 1943 | optval, optlen); |
1944 | 1944 | ||
1945 | if (get_user(len, optlen)) | 1945 | if (get_user(len, optlen)) |
1946 | return -EFAULT; | 1946 | return -EFAULT; |
@@ -2065,8 +2065,7 @@ void __init tcp_init(void) | |||
2065 | sizeof(struct inet_ehash_bucket), | 2065 | sizeof(struct inet_ehash_bucket), |
2066 | thash_entries, | 2066 | thash_entries, |
2067 | (num_physpages >= 128 * 1024) ? | 2067 | (num_physpages >= 128 * 1024) ? |
2068 | (25 - PAGE_SHIFT) : | 2068 | 13 : 15, |
2069 | (27 - PAGE_SHIFT), | ||
2070 | HASH_HIGHMEM, | 2069 | HASH_HIGHMEM, |
2071 | &tcp_hashinfo.ehash_size, | 2070 | &tcp_hashinfo.ehash_size, |
2072 | NULL, | 2071 | NULL, |
@@ -2082,8 +2081,7 @@ void __init tcp_init(void) | |||
2082 | sizeof(struct inet_bind_hashbucket), | 2081 | sizeof(struct inet_bind_hashbucket), |
2083 | tcp_hashinfo.ehash_size, | 2082 | tcp_hashinfo.ehash_size, |
2084 | (num_physpages >= 128 * 1024) ? | 2083 | (num_physpages >= 128 * 1024) ? |
2085 | (25 - PAGE_SHIFT) : | 2084 | 13 : 15, |
2086 | (27 - PAGE_SHIFT), | ||
2087 | HASH_HIGHMEM, | 2085 | HASH_HIGHMEM, |
2088 | &tcp_hashinfo.bhash_size, | 2086 | &tcp_hashinfo.bhash_size, |
2089 | NULL, | 2087 | NULL, |