mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
[CCID3] Calculate ccid3hcrx_x_recv using usecs_div
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
This commit is contained in:
parent
507d37cf26
commit
27ae543e6f
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user