tcp: add accessors to read/set tp->snd_cwnd
[platform/kernel/linux-rpi.git] / net / ipv4 / tcp.c
index ef68d55..f79b5a9 100644 (file)
@@ -435,7 +435,7 @@ void tcp_init_sock(struct sock *sk)
         * algorithms that we must have the following bandaid to talk
         * efficiently to them.  -DaveM
         */
-       tp->snd_cwnd = TCP_INIT_CWND;
+       tcp_snd_cwnd_set(tp, TCP_INIT_CWND);
 
        /* There's a bubble in the pipe until at least the first ACK. */
        tp->app_limited = ~0U;
@@ -3021,7 +3021,7 @@ int tcp_disconnect(struct sock *sk, int flags)
        icsk->icsk_rto_min = TCP_RTO_MIN;
        icsk->icsk_delack_max = TCP_DELACK_MAX;
        tp->snd_ssthresh = TCP_INFINITE_SSTHRESH;
-       tp->snd_cwnd = TCP_INIT_CWND;
+       tcp_snd_cwnd_set(tp, TCP_INIT_CWND);
        tp->snd_cwnd_cnt = 0;
        tp->window_clamp = 0;
        tp->delivered = 0;
@@ -3732,7 +3732,7 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info)
        info->tcpi_max_pacing_rate = rate64;
 
        info->tcpi_reordering = tp->reordering;
-       info->tcpi_snd_cwnd = tp->snd_cwnd;
+       info->tcpi_snd_cwnd = tcp_snd_cwnd(tp);
 
        if (info->tcpi_state == TCP_LISTEN) {
                /* listeners aliased fields :
@@ -3901,7 +3901,7 @@ struct sk_buff *tcp_get_timestamping_opt_stats(const struct sock *sk,
        rate64 = tcp_compute_delivery_rate(tp);
        nla_put_u64_64bit(stats, TCP_NLA_DELIVERY_RATE, rate64, TCP_NLA_PAD);
 
-       nla_put_u32(stats, TCP_NLA_SND_CWND, tp->snd_cwnd);
+       nla_put_u32(stats, TCP_NLA_SND_CWND, tcp_snd_cwnd(tp));
        nla_put_u32(stats, TCP_NLA_REORDERING, tp->reordering);
        nla_put_u32(stats, TCP_NLA_MIN_RTT, tcp_min_rtt(tp));