Pull ec into release branch
[pandora-kernel.git] / net / dccp / ccids / ccid3.c
index d23af7b..746f79d 100644 (file)
@@ -123,18 +123,19 @@ static void ccid3_hc_tx_update_x(struct sock *sk, struct timeval *now)
 
        if (hctx->ccid3hctx_p > 0) {
 
-               hctx->ccid3hctx_x = min_t(u64, hctx->ccid3hctx_x_calc << 6,
-                                              hctx->ccid3hctx_x_recv * 2  );
-               hctx->ccid3hctx_x = max_t(u64, hctx->ccid3hctx_x,
-                                         (hctx->ccid3hctx_s << 6)/TFRC_T_MBI);
+               hctx->ccid3hctx_x = min(((__u64)hctx->ccid3hctx_x_calc) << 6,
+                                       hctx->ccid3hctx_x_recv * 2);
+               hctx->ccid3hctx_x = max(hctx->ccid3hctx_x,
+                                       (((__u64)hctx->ccid3hctx_s) << 6) /
+                                                               TFRC_T_MBI);
 
        } else if (timeval_delta(now, &hctx->ccid3hctx_t_ld) -
-                       (suseconds_t)hctx->ccid3hctx_rtt >= 0 ) {
+                       (suseconds_t)hctx->ccid3hctx_rtt >= 0) {
 
-               hctx->ccid3hctx_x = max(2 * min(hctx->ccid3hctx_x,
-                                               hctx->ccid3hctx_x_recv),
-                                       scaled_div(hctx->ccid3hctx_s << 6,
-                                                  hctx->ccid3hctx_rtt    ));
+               hctx->ccid3hctx_x =
+                       max(2 * min(hctx->ccid3hctx_x, hctx->ccid3hctx_x_recv),
+                           scaled_div(((__u64)hctx->ccid3hctx_s) << 6,
+                                      hctx->ccid3hctx_rtt));
                hctx->ccid3hctx_t_ld = *now;
        }
 
@@ -143,8 +144,8 @@ static void ccid3_hc_tx_update_x(struct sock *sk, struct timeval *now)
 }
 
 /*
- *     Track the mean packet size `s' (cf. RFC 4342, 5.3 and  RFC 3448, 4.1)
- *     @len: DCCP packet payload size in bytes
+ *     Track the mean packet size `s' (cf. RFC 4342, 5.3 and  RFC 3448, 4.1)
+ *     @len: DCCP packet payload size in bytes
  */
 static inline void ccid3_hc_tx_update_s(struct ccid3_hc_tx_sock *hctx, int len)
 {
@@ -162,8 +163,8 @@ static inline void ccid3_hc_tx_update_s(struct ccid3_hc_tx_sock *hctx, int len)
 }
 
 /*
- *     Update Window Counter using the algorithm from [RFC 4342, 8.1].
- *     The algorithm is not applicable if RTT < 4 microseconds.
+ *     Update Window Counter using the algorithm from [RFC 4342, 8.1].
+ *     The algorithm is not applicable if RTT < 4 microseconds.
  */
 static inline void ccid3_hc_tx_update_win_count(struct ccid3_hc_tx_sock *hctx,
                                                struct timeval *now)
@@ -207,8 +208,9 @@ static void ccid3_hc_tx_no_feedback_timer(unsigned long data)
        switch (hctx->ccid3hctx_state) {
        case TFRC_SSTATE_NO_FBACK:
                /* RFC 3448, 4.4: Halve send rate directly */
-               hctx->ccid3hctx_x = max_t(u32, hctx->ccid3hctx_x / 2,
-                                         (hctx->ccid3hctx_s << 6)/TFRC_T_MBI);
+               hctx->ccid3hctx_x = max(hctx->ccid3hctx_x / 2,
+                                       (((__u64)hctx->ccid3hctx_s) << 6) /
+                                                                   TFRC_T_MBI);
 
                ccid3_pr_debug("%s(%p, state=%s), updated tx rate to %u "
                               "bytes/s\n", dccp_role(sk), sk,
@@ -226,12 +228,13 @@ static void ccid3_hc_tx_no_feedback_timer(unsigned long data)
                 */
                if (!hctx->ccid3hctx_idle ||
                    (hctx->ccid3hctx_x_recv >= 4 *
-                    scaled_div(hctx->ccid3hctx_s << 6, hctx->ccid3hctx_rtt))) {
+                    scaled_div(((__u64)hctx->ccid3hctx_s) << 6,
+                               hctx->ccid3hctx_rtt))) {
                        struct timeval now;
 
                        ccid3_pr_debug("%s(%p, state=%s), not idle\n",
                                       dccp_role(sk), sk,
-                                      ccid3_tx_state_name(hctx->ccid3hctx_state));
+                                  ccid3_tx_state_name(hctx->ccid3hctx_state));
 
                        /*
                         *  Modify the cached value of X_recv [RFC 3448, 4.4]
@@ -246,18 +249,20 @@ static void ccid3_hc_tx_no_feedback_timer(unsigned long data)
                        BUG_ON(hctx->ccid3hctx_p && !hctx->ccid3hctx_x_calc);
 
                        if (hctx->ccid3hctx_p  == 0 ||
-                           hctx->ccid3hctx_x_calc > (hctx->ccid3hctx_x_recv >> 5))  {
+                           (hctx->ccid3hctx_x_calc >
+                            (hctx->ccid3hctx_x_recv >> 5))) {
 
                                hctx->ccid3hctx_x_recv =
-                                       max_t(u64, hctx->ccid3hctx_x_recv / 2,
-                                                 (hctx->ccid3hctx_s << 6) /
-                                                               (2*TFRC_T_MBI));
+                                       max(hctx->ccid3hctx_x_recv / 2,
+                                           (((__u64)hctx->ccid3hctx_s) << 6) /
+                                                         (2 * TFRC_T_MBI));
 
                                if (hctx->ccid3hctx_p == 0)
                                        dccp_timestamp(sk, &now);
-                       } else
-                               hctx->ccid3hctx_x_recv = hctx->ccid3hctx_x_calc << 4;
-
+                       } else {
+                               hctx->ccid3hctx_x_recv = hctx->ccid3hctx_x_calc;
+                               hctx->ccid3hctx_x_recv <<= 4;
+                       }
                        /* Now recalculate X [RFC 3448, 4.3, step (4)] */
                        ccid3_hc_tx_update_x(sk, &now);
                }
@@ -279,7 +284,7 @@ static void ccid3_hc_tx_no_feedback_timer(unsigned long data)
 
 restart_timer:
        sk_reset_timer(sk, &hctx->ccid3hctx_no_feedback_timer,
-                          jiffies + usecs_to_jiffies(t_nfb));
+                          jiffies + usecs_to_jiffies(t_nfb));
 out:
        bh_unlock_sock(sk);
        sock_put(sk);
@@ -313,14 +318,16 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)
        switch (hctx->ccid3hctx_state) {
        case TFRC_SSTATE_NO_SENT:
                sk_reset_timer(sk, &hctx->ccid3hctx_no_feedback_timer,
-                              jiffies + usecs_to_jiffies(TFRC_INITIAL_TIMEOUT));
+                              (jiffies +
+                               usecs_to_jiffies(TFRC_INITIAL_TIMEOUT)));
                hctx->ccid3hctx_last_win_count   = 0;
                hctx->ccid3hctx_t_last_win_count = now;
                ccid3_hc_tx_set_state(sk, TFRC_SSTATE_NO_FBACK);
 
                /* Set initial sending rate X/s to 1pps (X is scaled by 2^6) */
                ccid3_hc_tx_update_s(hctx, skb->len);
-               hctx->ccid3hctx_x = hctx->ccid3hctx_s << 6;
+               hctx->ccid3hctx_x = hctx->ccid3hctx_s;
+               hctx->ccid3hctx_x <<= 6;
 
                /* First timeout, according to [RFC 3448, 4.2], is 1 second */
                hctx->ccid3hctx_t_ipi = USEC_PER_SEC;
@@ -334,7 +341,7 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)
        case TFRC_SSTATE_FBACK:
                delay = timeval_delta(&hctx->ccid3hctx_t_nom, &now);
                /*
-                *      Scheduling of packet transmissions [RFC 3448, 4.6]
+                *      Scheduling of packet transmissions [RFC 3448, 4.6]
                 *
                 * if (t_now > t_nom - delta)
                 *       // send the packet now
@@ -361,7 +368,8 @@ static int ccid3_hc_tx_send_packet(struct sock *sk, struct sk_buff *skb)
        return 0;
 }
 
-static void ccid3_hc_tx_packet_sent(struct sock *sk, int more, unsigned int len)
+static void ccid3_hc_tx_packet_sent(struct sock *sk, int more,
+                                   unsigned int len)
 {
        struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk);
        struct timeval now;
@@ -395,7 +403,7 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
        struct timeval now;
        unsigned long t_nfb;
        u32 pinv;
-       long r_sample, t_elapsed;
+       suseconds_t r_sample, t_elapsed;
 
        BUG_ON(hctx == NULL);
 
@@ -411,38 +419,39 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
        case TFRC_SSTATE_FBACK:
                /* get packet from history to look up t_recvdata */
                packet = dccp_tx_hist_find_entry(&hctx->ccid3hctx_hist,
-                                                DCCP_SKB_CB(skb)->dccpd_ack_seq);
+                                             DCCP_SKB_CB(skb)->dccpd_ack_seq);
                if (unlikely(packet == NULL)) {
                        DCCP_WARN("%s(%p), seqno %llu(%s) doesn't exist "
                                  "in history!\n",  dccp_role(sk), sk,
                            (unsigned long long)DCCP_SKB_CB(skb)->dccpd_ack_seq,
-                                 dccp_packet_name(DCCP_SKB_CB(skb)->dccpd_type));
+                               dccp_packet_name(DCCP_SKB_CB(skb)->dccpd_type));
                        return;
                }
 
                /* Update receive rate in units of 64 * bytes/second */
-               hctx->ccid3hctx_x_recv = opt_recv->ccid3or_receive_rate << 6;
+               hctx->ccid3hctx_x_recv = opt_recv->ccid3or_receive_rate;
+               hctx->ccid3hctx_x_recv <<= 6;
 
                /* Update loss event rate */
                pinv = opt_recv->ccid3or_loss_event_rate;
                if (pinv == ~0U || pinv == 0)          /* see RFC 4342, 8.5   */
                        hctx->ccid3hctx_p = 0;
                else                                   /* can not exceed 100% */
-                       hctx->ccid3hctx_p = 1000000 / pinv;
+                       hctx->ccid3hctx_p = 1000000 / pinv;
 
                dccp_timestamp(sk, &now);
 
                /*
                 * Calculate new round trip sample as per [RFC 3448, 4.3] by
-                *      R_sample  =  (now - t_recvdata) - t_elapsed
+                *      R_sample  =  (now - t_recvdata) - t_elapsed
                 */
                r_sample  = timeval_delta(&now, &packet->dccphtx_tstamp);
                t_elapsed = dp->dccps_options_received.dccpor_elapsed_time * 10;
 
                DCCP_BUG_ON(r_sample < 0);
                if (unlikely(r_sample <= t_elapsed))
-                       DCCP_WARN("WARNING: r_sample=%ldus <= t_elapsed=%ldus\n",
-                                 r_sample, t_elapsed);
+                       DCCP_WARN("WARNING: r_sample=%dus <= t_elapsed=%dus\n",
+                                 (int)r_sample, (int)t_elapsed);
                else
                        r_sample -= t_elapsed;
                CCID3_RTT_SANITY_CHECK(r_sample);
@@ -460,23 +469,25 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
                         * Larger Initial Windows [RFC 4342, sec. 5]
                         * We deviate in that we use `s' instead of `MSS'.
                         */
-                       u16 w_init = min(    4 * hctx->ccid3hctx_s,
-                                        max(2 * hctx->ccid3hctx_s, 4380));
+                       __u64 w_init = min(4 * hctx->ccid3hctx_s,
+                                          max(2 * hctx->ccid3hctx_s, 4380));
                        hctx->ccid3hctx_rtt  = r_sample;
-                       hctx->ccid3hctx_x    = scaled_div(w_init<< 6, r_sample);
+                       hctx->ccid3hctx_x    = scaled_div(w_init << 6, r_sample);
                        hctx->ccid3hctx_t_ld = now;
 
                        ccid3_update_send_time(hctx);
 
-                       ccid3_pr_debug("%s(%p), s=%u, w_init=%u, "
-                                      "R_sample=%ldus, X=%u\n", dccp_role(sk),
-                                      sk, hctx->ccid3hctx_s, w_init, r_sample,
+                       ccid3_pr_debug("%s(%p), s=%u, w_init=%llu, "
+                                      "R_sample=%dus, X=%u\n", dccp_role(sk),
+                                      sk, hctx->ccid3hctx_s,
+                                      (unsigned long long)w_init,
+                                      (int)r_sample,
                                       (unsigned)(hctx->ccid3hctx_x >> 6));
 
                        ccid3_hc_tx_set_state(sk, TFRC_SSTATE_FBACK);
                } else {
                        hctx->ccid3hctx_rtt = (9 * hctx->ccid3hctx_rtt +
-                                                  (u32)r_sample        ) / 10;
+                                                  (u32)r_sample) / 10;
 
                        /* Update sending rate (step 4 of [RFC 3448, 4.3]) */
                        if (hctx->ccid3hctx_p > 0)
@@ -486,11 +497,13 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
                                                    hctx->ccid3hctx_p);
                        ccid3_hc_tx_update_x(sk, &now);
 
-                       ccid3_pr_debug("%s(%p), RTT=%uus (sample=%ldus), s=%u, "
-                                      "p=%u, X_calc=%u, X=%u\n", dccp_role(sk),
-                                      sk, hctx->ccid3hctx_rtt, r_sample,
+                       ccid3_pr_debug("%s(%p), RTT=%uus (sample=%dus), s=%u, "
+                                      "p=%u, X_calc=%u, X_recv=%u, X=%u\n",
+                                      dccp_role(sk),
+                                      sk, hctx->ccid3hctx_rtt, (int)r_sample,
                                       hctx->ccid3hctx_s, hctx->ccid3hctx_p,
                                       hctx->ccid3hctx_x_calc,
+                                      (unsigned)(hctx->ccid3hctx_x_recv >> 6),
                                       (unsigned)(hctx->ccid3hctx_x >> 6));
                }
 
@@ -501,20 +514,20 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
                dccp_tx_hist_purge_older(ccid3_tx_hist,
                                         &hctx->ccid3hctx_hist, packet);
                /*
-                * As we have calculated new ipi, delta, t_nom it is possible that
-                * we now can send a packet, so wake up dccp_wait_for_ccid
+                * As we have calculated new ipi, delta, t_nom it is possible
+                * that we now can send a packet, so wake up dccp_wait_for_ccid
                 */
                sk->sk_write_space(sk);
 
                /*
                 * Update timeout interval for the nofeedback timer.
                 * We use a configuration option to increase the lower bound.
-                * This can help avoid triggering the nofeedback timer too often
-                * ('spinning') on LANs with small RTTs.
+                * This can help avoid triggering the nofeedback timer too
+                * often ('spinning') on LANs with small RTTs.
                 */
                hctx->ccid3hctx_t_rto = max_t(u32, 4 * hctx->ccid3hctx_rtt,
                                                   CONFIG_IP_DCCP_CCID3_RTO *
-                                                  (USEC_PER_SEC/1000)       );
+                                                  (USEC_PER_SEC/1000));
                /*
                 * Schedule no feedback timer to expire in
                 * max(t_RTO, 2 * s/X)  =  max(t_RTO, 2 * t_ipi)
@@ -522,7 +535,8 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
                t_nfb = max(hctx->ccid3hctx_t_rto, 2 * hctx->ccid3hctx_t_ipi);
 
                ccid3_pr_debug("%s(%p), Scheduled no feedback timer to "
-                              "expire in %lu jiffies (%luus)\n", dccp_role(sk),
+                              "expire in %lu jiffies (%luus)\n",
+                              dccp_role(sk),
                               sk, usecs_to_jiffies(t_nfb), t_nfb);
 
                sk_reset_timer(sk, &hctx->ccid3hctx_no_feedback_timer,
@@ -531,10 +545,7 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
                /* set idle flag */
                hctx->ccid3hctx_idle = 1;
                break;
-       case TFRC_SSTATE_NO_SENT:
-               /* XXX when implementing bidirectional rx/tx check this again */
-               DCCP_WARN("Illegal ACK received - no packet sent\n");
-               /* fall through */
+       case TFRC_SSTATE_NO_SENT:       /* fall through */
        case TFRC_SSTATE_TERM:          /* ignore feedback when closing */
                break;
        }
@@ -569,7 +580,8 @@ static int ccid3_hc_tx_parse_options(struct sock *sk, unsigned char option,
                                  dccp_role(sk), sk, len);
                        rc = -EINVAL;
                } else {
-                       opt_recv->ccid3or_loss_event_rate = ntohl(*(__be32 *)value);
+                       opt_recv->ccid3or_loss_event_rate =
+                                               ntohl(*(__be32 *)value);
                        ccid3_pr_debug("%s(%p), LOSS_EVENT_RATE=%u\n",
                                       dccp_role(sk), sk,
                                       opt_recv->ccid3or_loss_event_rate);
@@ -590,7 +602,8 @@ static int ccid3_hc_tx_parse_options(struct sock *sk, unsigned char option,
                                  dccp_role(sk), sk, len);
                        rc = -EINVAL;
                } else {
-                       opt_recv->ccid3or_receive_rate = ntohl(*(__be32 *)value);
+                       opt_recv->ccid3or_receive_rate =
+                                               ntohl(*(__be32 *)value);
                        ccid3_pr_debug("%s(%p), RECEIVE_RATE=%u\n",
                                       dccp_role(sk), sk,
                                       opt_recv->ccid3or_receive_rate);
@@ -610,7 +623,8 @@ static int ccid3_hc_tx_init(struct ccid *ccid, struct sock *sk)
        hctx->ccid3hctx_state = TFRC_SSTATE_NO_SENT;
        INIT_LIST_HEAD(&hctx->ccid3hctx_hist);
 
-       hctx->ccid3hctx_no_feedback_timer.function = ccid3_hc_tx_no_feedback_timer;
+       hctx->ccid3hctx_no_feedback_timer.function =
+                               ccid3_hc_tx_no_feedback_timer;
        hctx->ccid3hctx_no_feedback_timer.data     = (unsigned long)sk;
        init_timer(&hctx->ccid3hctx_no_feedback_timer);
 
@@ -748,9 +762,9 @@ static int ccid3_hc_rx_insert_options(struct sock *sk, struct sk_buff *skb)
                                             hcrx->ccid3hcrx_elapsed_time)) ||
            dccp_insert_option_timestamp(sk, skb) ||
            dccp_insert_option(sk, skb, TFRC_OPT_LOSS_EVENT_RATE,
-                              &pinv, sizeof(pinv)) ||
+                              &pinv, sizeof(pinv)) ||
            dccp_insert_option(sk, skb, TFRC_OPT_RECEIVE_RATE,
-                              &x_recv, sizeof(x_recv)))
+                              &x_recv, sizeof(x_recv)))
                return -1;
 
        return 0;
@@ -815,20 +829,20 @@ found:
        DCCP_BUG_ON(delta < 0);
 
        rtt = delta * 4 / interval;
-       ccid3_pr_debug("%s(%p), approximated RTT to %ldus\n",
-                      dccp_role(sk), sk, rtt);
+       ccid3_pr_debug("%s(%p), approximated RTT to %dus\n",
+                      dccp_role(sk), sk, (int)rtt);
 
        /*
         * Determine the length of the first loss interval via inverse lookup.
         * Assume that X_recv can be computed by the throughput equation
-        *                  s
-        *      X_recv = --------
-        *               R * fval
+        *                  s
+        *      X_recv = --------
+        *               R * fval
         * Find some p such that f(p) = fval; return 1/p [RFC 3448, 6.3.1].
         */
        if (rtt == 0) {                 /* would result in divide-by-zero */
-               DCCP_WARN("RTT==0, returning 1/p = 1\n");
-               return 1000000;
+               DCCP_WARN("RTT==0\n");
+               return ~0;
        }
 
        dccp_timestamp(sk, &tstamp);
@@ -840,7 +854,7 @@ found:
                DCCP_WARN("X_recv==0\n");
                if ((x_recv = hcrx->ccid3hcrx_x_recv) == 0) {
                        DCCP_BUG("stored value of X_recv is zero");
-                       return 1000000;
+                       return ~0;
                }
        }
 
@@ -854,7 +868,7 @@ found:
        if (p == 0)
                return ~0;
        else
-               return 1000000 / p; 
+               return 1000000 / p;
 }
 
 static void ccid3_hc_rx_update_li(struct sock *sk, u64 seq_loss, u8 win_loss)
@@ -905,10 +919,11 @@ static void ccid3_hc_rx_update_li(struct sock *sk, u64 seq_loss, u8 win_loss)
 }
 
 static int ccid3_hc_rx_detect_loss(struct sock *sk,
-                                    struct dccp_rx_hist_entry *packet)
+                                   struct dccp_rx_hist_entry *packet)
 {
        struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk);
-       struct dccp_rx_hist_entry *rx_hist = dccp_rx_hist_head(&hcrx->ccid3hcrx_hist);
+       struct dccp_rx_hist_entry *rx_hist =
+                               dccp_rx_hist_head(&hcrx->ccid3hcrx_hist);
        u64 seqno = packet->dccphrx_seqno;
        u64 tmp_seqno;
        int loss = 0;
@@ -936,7 +951,7 @@ static int ccid3_hc_rx_detect_loss(struct sock *sk,
                dccp_inc_seqno(&tmp_seqno);
                while (dccp_rx_hist_find_entry(&hcrx->ccid3hcrx_hist,
                   tmp_seqno, &ccval)) {
-                       hcrx->ccid3hcrx_seqno_nonloss = tmp_seqno;
+                       hcrx->ccid3hcrx_seqno_nonloss = tmp_seqno;
                        hcrx->ccid3hcrx_ccval_nonloss = ccval;
                        dccp_inc_seqno(&tmp_seqno);
                }
@@ -986,7 +1001,7 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
                DCCP_BUG_ON(r_sample < 0);
                if (unlikely(r_sample <= t_elapsed))
                        DCCP_WARN("r_sample=%ldus, t_elapsed=%ldus\n",
-                                 r_sample, t_elapsed);
+                                 (long)r_sample, (long)t_elapsed);
                else
                        r_sample -= t_elapsed;
                CCID3_RTT_SANITY_CHECK(r_sample);
@@ -1038,8 +1053,8 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
                        break;
 
                dccp_timestamp(sk, &now);
-               if (timeval_delta(&now, &hcrx->ccid3hcrx_tstamp_last_ack) -
-                                       (suseconds_t)hcrx->ccid3hcrx_rtt >= 0) {
+               if ((timeval_delta(&now, &hcrx->ccid3hcrx_tstamp_last_ack) -
+                    (suseconds_t)hcrx->ccid3hcrx_rtt) >= 0) {
                        hcrx->ccid3hcrx_tstamp_last_ack = now;
                        ccid3_hc_rx_send_feedback(sk);
                }
@@ -1054,7 +1069,7 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
                       dccp_role(sk), sk, dccp_state_name(sk->sk_state));
 
        p_prev = hcrx->ccid3hcrx_p;
-       
+
        /* Calculate loss event rate */
        if (!list_empty(&hcrx->ccid3hcrx_li_hist)) {
                u32 i_mean = dccp_li_hist_calc_i_mean(&hcrx->ccid3hcrx_li_hist);
@@ -1112,9 +1127,9 @@ static void ccid3_hc_rx_get_info(struct sock *sk, struct tcp_info *info)
 
        BUG_ON(hcrx == NULL);
 
-       info->tcpi_ca_state     = hcrx->ccid3hcrx_state;
-       info->tcpi_options      |= TCPI_OPT_TIMESTAMPS;
-       info->tcpi_rcv_rtt      = hcrx->ccid3hcrx_rtt;
+       info->tcpi_ca_state = hcrx->ccid3hcrx_state;
+       info->tcpi_options  |= TCPI_OPT_TIMESTAMPS;
+       info->tcpi_rcv_rtt  = hcrx->ccid3hcrx_rtt;
 }
 
 static void ccid3_hc_tx_get_info(struct sock *sk, struct tcp_info *info)
@@ -1136,7 +1151,7 @@ static int ccid3_hc_rx_getsockopt(struct sock *sk, const int optname, int len,
 {
        const struct ccid3_hc_rx_sock *hcrx = ccid3_hc_rx_sk(sk);
        const void *val;
-       
+
        /* Listen socks doesn't have a private CCID block */
        if (sk->sk_state == DCCP_LISTEN)
                return -EINVAL;
@@ -1163,7 +1178,7 @@ static int ccid3_hc_tx_getsockopt(struct sock *sk, const int optname, int len,
 {
        const struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk);
        const void *val;
-       
+
        /* Listen socks doesn't have a private CCID block */
        if (sk->sk_state == DCCP_LISTEN)
                return -EINVAL;
@@ -1206,7 +1221,7 @@ static struct ccid_operations ccid3 = {
        .ccid_hc_rx_getsockopt     = ccid3_hc_rx_getsockopt,
        .ccid_hc_tx_getsockopt     = ccid3_hc_tx_getsockopt,
 };
+
 #ifdef CONFIG_IP_DCCP_CCID3_DEBUG
 module_param(ccid3_debug, int, 0444);
 MODULE_PARM_DESC(ccid3_debug, "Enable debug messages");
@@ -1229,7 +1244,7 @@ static __init int ccid3_module_init(void)
                goto out_free_tx;
 
        rc = ccid_register(&ccid3);
-       if (rc != 0) 
+       if (rc != 0)
                goto out_free_loss_interval_history;
 out:
        return rc;