Merge git://git.infradead.org/mtd-2.6
[sfrench/cifs-2.6.git] / net / ipv4 / tcp_hybla.c
index 77add63623df2a1034a21bfdb6fbaddf82385a71..59e691d26f64e805f282392a3b978804bef719e7 100644 (file)
@@ -10,7 +10,6 @@
  *    root at danielinux.net
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <net/tcp.h>
 
@@ -100,12 +99,12 @@ static void hybla_cong_avoid(struct sock *sk, u32 ack, u32 rtt,
                ca->minrtt = tp->srtt;
        }
 
+       if (!tcp_is_cwnd_limited(sk, in_flight))
+               return;
+
        if (!ca->hybla_en)
                return tcp_reno_cong_avoid(sk, ack, rtt, in_flight, flag);
 
-       if (in_flight < tp->snd_cwnd)
-               return;
-
        if (ca->rho == 0)
                hybla_recalc_param(sk);
 
@@ -171,7 +170,7 @@ static struct tcp_congestion_ops tcp_hybla = {
 
 static int __init hybla_register(void)
 {
-       BUG_ON(sizeof(struct hybla) > ICSK_CA_PRIV_SIZE);
+       BUILD_BUG_ON(sizeof(struct hybla) > ICSK_CA_PRIV_SIZE);
        return tcp_register_congestion_control(&tcp_hybla);
 }