diff options
author | Steve French <sfrench@us.ibm.com> | 2006-03-07 21:47:30 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-03-07 21:47:30 +0000 |
commit | f6e77c94796edad172602234826a022d463d910e (patch) | |
tree | f5cb0848c9e848499b0f0676fafe7ff207538ae8 /net/dccp | |
parent | beb84dc8186662b17d5ea510fabb85cb7e266d33 (diff) | |
parent | d0b004840bd3b5ff2f2a0ad14fa0bd43349f5175 (diff) | |
download | kernel_replicant_linux-f6e77c94796edad172602234826a022d463d910e.tar.gz kernel_replicant_linux-f6e77c94796edad172602234826a022d463d910e.tar.bz2 kernel_replicant_linux-f6e77c94796edad172602234826a022d463d910e.zip |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/ccids/ccid3.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index aa68e0ab274d..35d1d347541c 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c @@ -2,7 +2,7 @@ * net/dccp/ccids/ccid3.c * * Copyright (c) 2005 The University of Waikato, Hamilton, New Zealand. - * Copyright (c) 2005 Ian McDonald <iam4@cs.waikato.ac.nz> + * Copyright (c) 2005-6 Ian McDonald <imcdnzl@gmail.com> * * An implementation of the DCCP protocol * @@ -1033,9 +1033,13 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb) p_prev = hcrx->ccid3hcrx_p; /* Calculate loss event rate */ - if (!list_empty(&hcrx->ccid3hcrx_li_hist)) + if (!list_empty(&hcrx->ccid3hcrx_li_hist)) { + u32 i_mean = dccp_li_hist_calc_i_mean(&hcrx->ccid3hcrx_li_hist); + /* Scaling up by 1000000 as fixed decimal */ - hcrx->ccid3hcrx_p = 1000000 / dccp_li_hist_calc_i_mean(&hcrx->ccid3hcrx_li_hist); + if (i_mean != 0) + hcrx->ccid3hcrx_p = 1000000 / i_mean; + } if (hcrx->ccid3hcrx_p > p_prev) { ccid3_hc_rx_send_feedback(sk); |