tcp: whitespace fixes
[linux-2.6-block.git] / net / ipv4 / tcp_vegas.c
index 9a5e05f27f4f7cce16cb285698cb0fc73ef49a91..a6afde666ab1284ea53c24ce80b2c287ff42073b 100644 (file)
@@ -51,7 +51,6 @@ MODULE_PARM_DESC(beta, "upper bound of packets in network");
 module_param(gamma, int, 0644);
 MODULE_PARM_DESC(gamma, "limit on increase (scale by 2)");
 
-
 /* There are several situations when we must "re-start" Vegas:
  *
  *  o when a connection is established
@@ -133,7 +132,6 @@ EXPORT_SYMBOL_GPL(tcp_vegas_pkts_acked);
 
 void tcp_vegas_state(struct sock *sk, u8 ca_state)
 {
-
        if (ca_state == TCP_CA_Open)
                vegas_enable(sk);
        else
@@ -218,7 +216,8 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 acked)
                         * This is:
                         *     (actual rate in segments) * baseRTT
                         */
-                       target_cwnd = tp->snd_cwnd * vegas->baseRTT / rtt;
+                       target_cwnd = (u64)tp->snd_cwnd * vegas->baseRTT;
+                       do_div(target_cwnd, rtt);
 
                        /* Calculate the difference between the window we had,
                         * and the window we would like to have. This quantity
@@ -284,7 +283,6 @@ static void tcp_vegas_cong_avoid(struct sock *sk, u32 ack, u32 acked)
        /* Use normal slow start */
        else if (tp->snd_cwnd <= tp->snd_ssthresh)
                tcp_slow_start(tp, acked);
-
 }
 
 /* Extract info for Tcp socket info provided via netlink. */