diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-09-09 02:31:07 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-09-09 02:31:07 -0300 |
commit | 27ae543e6f116df66e2b19ff0a3aa1053e4784d8 (patch) | |
tree | e7507e0367df7f95eaeefc3c6787dbaeda56529e | |
parent | 507d37cf269ebbd1b32bcc435fe577e411f73151 (diff) | |
download | linux-27ae543e6f116df66e2b19ff0a3aa1053e4784d8.tar.gz linux-27ae543e6f116df66e2b19ff0a3aa1053e4784d8.tar.bz2 linux-27ae543e6f116df66e2b19ff0a3aa1053e4784d8.zip |
[CCID3] Calculate ccid3hcrx_x_recv using usecs_div
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
-rw-r--r-- | net/dccp/ccids/ccid3.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index 37fd9eb8daaf..63f897394a1e 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c @@ -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: |