checkpatch: make --strict the default for drivers/staging files and patches
[firefly-linux-kernel-4.4.55.git] / net / ipv4 / tcp_output.c
index 444ab5beecbd0a35355f312152ef6349d9fa9cf0..1188e4fcf23bf87d40fb73f6e1483ee004fd74b1 100644 (file)
@@ -137,12 +137,12 @@ static __u16 tcp_advertise_mss(struct sock *sk)
 }
 
 /* RFC2861. Reset CWND after idle period longer RTO to "restart window".
- * This is the first part of cwnd validation mechanism. */
-static void tcp_cwnd_restart(struct sock *sk, const struct dst_entry *dst)
+ * This is the first part of cwnd validation mechanism.
+ */
+void tcp_cwnd_restart(struct sock *sk, s32 delta)
 {
        struct tcp_sock *tp = tcp_sk(sk);
-       s32 delta = tcp_time_stamp - tp->lsndtime;
-       u32 restart_cwnd = tcp_init_cwnd(tp, dst);
+       u32 restart_cwnd = tcp_init_cwnd(tp, __sk_dst_get(sk));
        u32 cwnd = tp->snd_cwnd;
 
        tcp_ca_event(sk, CA_EVENT_CWND_RESTART);
@@ -164,10 +164,6 @@ static void tcp_event_data_sent(struct tcp_sock *tp,
        struct inet_connection_sock *icsk = inet_csk(sk);
        const u32 now = tcp_time_stamp;
 
-       if (sysctl_tcp_slow_start_after_idle &&
-           (!tp->packets_out && (s32)(now - tp->lsndtime) > icsk->icsk_rto))
-               tcp_cwnd_restart(sk, __sk_dst_get(sk));
-
        tp->lsndtime = now;
 
        /* If it is a reply for ato after last received