Skip to content

Commit

Permalink
[CCID3] Calculate ccid3hcrx_x_recv using usecs_div
Browse files Browse the repository at this point in the history
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
  • Loading branch information
Arnaldo Carvalho de Melo committed Sep 9, 2005
1 parent 507d37c commit 27ae543
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions net/dccp/ccids/ccid3.c
Original file line number Diff line number Diff line change
Expand Up @@ -779,11 +779,8 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk)
case TFRC_RSTATE_DATA: {
const u32 delta = timeval_delta(&now,
&hcrx->ccid3hcrx_tstamp_last_feedback);

hcrx->ccid3hcrx_x_recv = (hcrx->ccid3hcrx_bytes_recv *
USEC_PER_SEC);
if (likely(delta > 1))
hcrx->ccid3hcrx_x_recv /= delta;
hcrx->ccid3hcrx_x_recv = usecs_div(hcrx->ccid3hcrx_bytes_recv,
delta);
}
break;
default:
Expand Down

0 comments on commit 27ae543

Please sign in to comment.