]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/ipv4/tcp_westwood.c
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
[mv-sheeva.git] / net / ipv4 / tcp_westwood.c
index e61e09dd513ed55c618ce5e7582ead8c9b99a4e1..a534dda5456e4bbf0a4dfca5b0731dc660985ec8 100644 (file)
@@ -80,7 +80,7 @@ static void tcp_westwood_init(struct sock *sk)
  */
 static inline u32 westwood_do_filter(u32 a, u32 b)
 {
-       return (((7 * a) + b) >> 3);
+       return ((7 * a) + b) >> 3;
 }
 
 static void westwood_filter(struct westwood *w, u32 delta)
@@ -100,11 +100,12 @@ static void westwood_filter(struct westwood *w, u32 delta)
  * Called after processing group of packets.
  * but all westwood needs is the last sample of srtt.
  */
-static void tcp_westwood_pkts_acked(struct sock *sk, u32 cnt, ktime_t last)
+static void tcp_westwood_pkts_acked(struct sock *sk, u32 cnt, s32 rtt)
 {
        struct westwood *w = inet_csk_ca(sk);
-       if (cnt > 0)
-               w->rtt = tcp_sk(sk)->srtt >> 3;
+
+       if (rtt > 0)
+               w->rtt = usecs_to_jiffies(rtt);
 }
 
 /*