diff options
-rw-r--r-- | net/dccp/ccids/ccid3.c | 11 | ||||
-rw-r--r-- | net/dccp/ccids/ccid3.h | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index fb21f2d9ffc6..d7b688e9f983 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c | |||
@@ -298,13 +298,14 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, | |||
298 | hctx->ccid3hctx_last_win_count = 0; | 298 | hctx->ccid3hctx_last_win_count = 0; |
299 | hctx->ccid3hctx_t_last_win_count = now; | 299 | hctx->ccid3hctx_t_last_win_count = now; |
300 | ccid3_hc_tx_set_state(sk, TFRC_SSTATE_NO_FBACK); | 300 | ccid3_hc_tx_set_state(sk, TFRC_SSTATE_NO_FBACK); |
301 | hctx->ccid3hctx_t_ipi = TFRC_INITIAL_IPI; | ||
302 | 301 | ||
303 | /* Set nominal send time for initial packet */ | 302 | /* First timeout, according to [RFC 3448, 4.2], is 1 second */ |
303 | hctx->ccid3hctx_t_ipi = USEC_PER_SEC; | ||
304 | /* Initial delta: minimum of 0.5 sec and t_gran/2 */ | ||
305 | hctx->ccid3hctx_delta = TFRC_OPSYS_HALF_TIME_GRAN; | ||
306 | |||
307 | /* Set t_0 for initial packet */ | ||
304 | hctx->ccid3hctx_t_nom = now; | 308 | hctx->ccid3hctx_t_nom = now; |
305 | timeval_add_usecs(&hctx->ccid3hctx_t_nom, | ||
306 | hctx->ccid3hctx_t_ipi); | ||
307 | ccid3_calc_new_delta(hctx); | ||
308 | rc = 0; | 309 | rc = 0; |
309 | break; | 310 | break; |
310 | case TFRC_SSTATE_NO_FBACK: | 311 | case TFRC_SSTATE_NO_FBACK: |
diff --git a/net/dccp/ccids/ccid3.h b/net/dccp/ccids/ccid3.h index e2e43c1a4726..462165234ff6 100644 --- a/net/dccp/ccids/ccid3.h +++ b/net/dccp/ccids/ccid3.h | |||
@@ -49,8 +49,6 @@ | |||
49 | /* Two seconds as per CCID3 spec */ | 49 | /* Two seconds as per CCID3 spec */ |
50 | #define TFRC_INITIAL_TIMEOUT (2 * USEC_PER_SEC) | 50 | #define TFRC_INITIAL_TIMEOUT (2 * USEC_PER_SEC) |
51 | 51 | ||
52 | #define TFRC_INITIAL_IPI (USEC_PER_SEC / 4) | ||
53 | |||
54 | /* In usecs - half the scheduling granularity as per RFC3448 4.6 */ | 52 | /* In usecs - half the scheduling granularity as per RFC3448 4.6 */ |
55 | #define TFRC_OPSYS_HALF_TIME_GRAN (USEC_PER_SEC / (2 * HZ)) | 53 | #define TFRC_OPSYS_HALF_TIME_GRAN (USEC_PER_SEC / (2 * HZ)) |
56 | 54 | ||