summaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_htcp.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2009-02-28 04:44:36 +0000
committerDavid S. Miller <davem@davemloft.net>2009-03-02 03:00:14 -0800
commit571a5dd8d01f2a7e279c502fa220a69262d73694 (patch)
tree1e4ab48f03f789c7afdd08acd81eaa77686274c8 /net/ipv4/tcp_htcp.c
parente6c7d0857905f1d642cb8dbadae6794bfa1dff30 (diff)
downloadlinux-571a5dd8d01f2a7e279c502fa220a69262d73694.tar.gz
linux-571a5dd8d01f2a7e279c502fa220a69262d73694.tar.bz2
linux-571a5dd8d01f2a7e279c502fa220a69262d73694.zip
htcp: merge icsk_ca_state compare
Similar to what is done elsewhere in TCP code when double state checks are being done. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_htcp.c')
-rw-r--r--net/ipv4/tcp_htcp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/tcp_htcp.c b/net/ipv4/tcp_htcp.c
index 937549b8a921..26d5c7fc7de5 100644
--- a/net/ipv4/tcp_htcp.c
+++ b/net/ipv4/tcp_htcp.c
@@ -115,8 +115,7 @@ static void measure_achieved_throughput(struct sock *sk, u32 pkts_acked, s32 rtt
return;
/* achieved throughput calculations */
- if (icsk->icsk_ca_state != TCP_CA_Open &&
- icsk->icsk_ca_state != TCP_CA_Disorder) {
+ if (!((1 << icsk->icsk_ca_state) & (TCPF_CA_Open | TCPF_CA_Disorder))) {
ca->packetcount = 0;
ca->lasttime = now;
return;