diff options
Diffstat (limited to 'net/dccp/ccids/ccid3.c')
-rw-r--r-- | net/dccp/ccids/ccid3.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index 4c422fb2189f..206204551f4d 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c | |||
@@ -410,10 +410,10 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) | |||
410 | 410 | ||
411 | /* Update loss event rate (which is scaled by 1e6) */ | 411 | /* Update loss event rate (which is scaled by 1e6) */ |
412 | pinv = opt_recv->ccid3or_loss_event_rate; | 412 | pinv = opt_recv->ccid3or_loss_event_rate; |
413 | if (pinv == ~0U || pinv == 0) /* see RFC 4342, 8.5 */ | 413 | if (pinv == 0) |
414 | hctx->p = 0; | 414 | hctx->p = 0; |
415 | else /* can not exceed 100% */ | 415 | else |
416 | hctx->p = scaled_div(1, pinv); | 416 | hctx->p = tfrc_invert_loss_event_rate(pinv); |
417 | 417 | ||
418 | /* | 418 | /* |
419 | * Update allowed sending rate X as per draft rfc3448bis-00, 4.2/3 | 419 | * Update allowed sending rate X as per draft rfc3448bis-00, 4.2/3 |
@@ -854,8 +854,7 @@ static int ccid3_hc_rx_getsockopt(struct sock *sk, const int optname, int len, | |||
854 | return -EINVAL; | 854 | return -EINVAL; |
855 | rx_info.tfrcrx_x_recv = hcrx->x_recv; | 855 | rx_info.tfrcrx_x_recv = hcrx->x_recv; |
856 | rx_info.tfrcrx_rtt = hcrx->rtt; | 856 | rx_info.tfrcrx_rtt = hcrx->rtt; |
857 | rx_info.tfrcrx_p = hcrx->p_inverse == 0 ? ~0U : | 857 | rx_info.tfrcrx_p = tfrc_invert_loss_event_rate(hcrx->p_inverse); |
858 | scaled_div(1, hcrx->p_inverse); | ||
859 | len = sizeof(rx_info); | 858 | len = sizeof(rx_info); |
860 | val = &rx_info; | 859 | val = &rx_info; |
861 | break; | 860 | break; |