aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ccids
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/ccids')
-rw-r--r--net/dccp/ccids/ccid3.c10
-rw-r--r--net/dccp/ccids/ccid3.h2
2 files changed, 1 insertions, 11 deletions
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index 5bf110b28abc..c025236ce49b 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -744,11 +744,6 @@ static void ccid3_hc_rx_send_feedback(struct sock *sk)
744 hcrx->ccid3hcrx_ccval_last_counter = packet->dccphrx_ccval; 744 hcrx->ccid3hcrx_ccval_last_counter = packet->dccphrx_ccval;
745 hcrx->ccid3hcrx_bytes_recv = 0; 745 hcrx->ccid3hcrx_bytes_recv = 0;
746 746
747 /* Elapsed time information [RFC 4340, 13.2] in units of 10 * usecs */
748 delta = ktime_us_delta(now, packet->dccphrx_tstamp);
749 DCCP_BUG_ON(delta < 0);
750 hcrx->ccid3hcrx_elapsed_time = delta / 10;
751
752 if (hcrx->ccid3hcrx_p == 0) 747 if (hcrx->ccid3hcrx_p == 0)
753 hcrx->ccid3hcrx_pinv = ~0U; /* see RFC 4342, 8.5 */ 748 hcrx->ccid3hcrx_pinv = ~0U; /* see RFC 4342, 8.5 */
754 else if (hcrx->ccid3hcrx_p > 1000000) { 749 else if (hcrx->ccid3hcrx_p > 1000000) {
@@ -778,10 +773,7 @@ static int ccid3_hc_rx_insert_options(struct sock *sk, struct sk_buff *skb)
778 x_recv = htonl(hcrx->ccid3hcrx_x_recv); 773 x_recv = htonl(hcrx->ccid3hcrx_x_recv);
779 pinv = htonl(hcrx->ccid3hcrx_pinv); 774 pinv = htonl(hcrx->ccid3hcrx_pinv);
780 775
781 if ((hcrx->ccid3hcrx_elapsed_time != 0 && 776 if (dccp_insert_option_timestamp(sk, skb) ||
782 dccp_insert_option_elapsed_time(sk, skb,
783 hcrx->ccid3hcrx_elapsed_time)) ||
784 dccp_insert_option_timestamp(sk, skb) ||
785 dccp_insert_option(sk, skb, TFRC_OPT_LOSS_EVENT_RATE, 777 dccp_insert_option(sk, skb, TFRC_OPT_LOSS_EVENT_RATE,
786 &pinv, sizeof(pinv)) || 778 &pinv, sizeof(pinv)) ||
787 dccp_insert_option(sk, skb, TFRC_OPT_RECEIVE_RATE, 779 dccp_insert_option(sk, skb, TFRC_OPT_RECEIVE_RATE,
diff --git a/net/dccp/ccids/ccid3.h b/net/dccp/ccids/ccid3.h
index 0cdc982cfe47..83467c34ed2b 100644
--- a/net/dccp/ccids/ccid3.h
+++ b/net/dccp/ccids/ccid3.h
@@ -147,7 +147,6 @@ enum ccid3_hc_rx_states {
147 * @ccid3hcrx_li_hist - Loss Interval History 147 * @ccid3hcrx_li_hist - Loss Interval History
148 * @ccid3hcrx_s - Received packet size in bytes 148 * @ccid3hcrx_s - Received packet size in bytes
149 * @ccid3hcrx_pinv - Inverse of Loss Event Rate (RFC 4342, sec. 8.5) 149 * @ccid3hcrx_pinv - Inverse of Loss Event Rate (RFC 4342, sec. 8.5)
150 * @ccid3hcrx_elapsed_time - Time since packet reception
151 */ 150 */
152struct ccid3_hc_rx_sock { 151struct ccid3_hc_rx_sock {
153 struct tfrc_rx_info ccid3hcrx_tfrc; 152 struct tfrc_rx_info ccid3hcrx_tfrc;
@@ -165,7 +164,6 @@ struct ccid3_hc_rx_sock {
165 struct list_head ccid3hcrx_li_hist; 164 struct list_head ccid3hcrx_li_hist;
166 u16 ccid3hcrx_s; 165 u16 ccid3hcrx_s;
167 u32 ccid3hcrx_pinv; 166 u32 ccid3hcrx_pinv;
168 u32 ccid3hcrx_elapsed_time;
169}; 167};
170 168
171static inline struct ccid3_hc_rx_sock *ccid3_hc_rx_sk(const struct sock *sk) 169static inline struct ccid3_hc_rx_sock *ccid3_hc_rx_sk(const struct sock *sk)