]> err.no Git - linux-2.6/commitdiff
[DCCP] ccid: Deprecate ccid_hc_tx_insert_options
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Sun, 10 Dec 2006 02:05:38 +0000 (00:05 -0200)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 11 Dec 2006 22:34:49 +0000 (14:34 -0800)
 The function ccid3_hc_tx_insert_options only does a redundant no-op,
 as the operation

  DCCP_SKB_CB(skb)->dccpd_ccval = hctx->ccid3hctx_last_win_count;

 is already performed _unconditionally_ in ccid3_hc_tx_send_packet.

 Since there is further no current need for this function, it is removed
 entirely. Since furthermore, there is actually no present need for the
 entire interface function ccid_hc_tx_insert_options, it was decided to
 remove it also, to clean up the interface.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
net/dccp/ccid.h
net/dccp/ccids/ccid3.c
net/dccp/options.c

index bcc2d12ae81ccb13d00e428c85840b37a0ac81ec..c65cb2453e43d7836e80ab25059d3993c5d875ce 100644 (file)
@@ -43,8 +43,6 @@ struct ccid_operations {
                                                    unsigned char* value);
        int             (*ccid_hc_rx_insert_options)(struct sock *sk,
                                                     struct sk_buff *skb);
-       int             (*ccid_hc_tx_insert_options)(struct sock *sk,
-                                                    struct sk_buff *skb);
        void            (*ccid_hc_tx_packet_recv)(struct sock *sk,
                                                  struct sk_buff *skb);
        int             (*ccid_hc_tx_parse_options)(struct sock *sk,
@@ -146,14 +144,6 @@ static inline int ccid_hc_rx_parse_options(struct ccid *ccid, struct sock *sk,
        return rc;
 }
 
-static inline int ccid_hc_tx_insert_options(struct ccid *ccid, struct sock *sk,
-                                           struct sk_buff *skb)
-{
-       if (ccid->ccid_ops->ccid_hc_tx_insert_options != NULL)
-               return ccid->ccid_ops->ccid_hc_tx_insert_options(sk, skb);
-       return 0;
-}
-
 static inline int ccid_hc_rx_insert_options(struct ccid *ccid, struct sock *sk,
                                            struct sk_buff *skb)
 {
index 936704d1b77ebbfa66554647d28d784cdec2c97a..7017d84a381dc87e9d45ffed5602e03fb6bf1649 100644 (file)
@@ -551,17 +551,6 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb)
        }
 }
 
-static int ccid3_hc_tx_insert_options(struct sock *sk, struct sk_buff *skb)
-{
-       const struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk);
-
-       BUG_ON(hctx == NULL);
-
-       if (sk->sk_state == DCCP_OPEN || sk->sk_state == DCCP_PARTOPEN)
-               DCCP_SKB_CB(skb)->dccpd_ccval = hctx->ccid3hctx_last_win_count;
-       return 0;
-}
-
 static int ccid3_hc_tx_parse_options(struct sock *sk, unsigned char option,
                                     unsigned char len, u16 idx,
                                     unsigned char *value)
@@ -1216,7 +1205,6 @@ static struct ccid_operations ccid3 = {
        .ccid_hc_tx_send_packet    = ccid3_hc_tx_send_packet,
        .ccid_hc_tx_packet_sent    = ccid3_hc_tx_packet_sent,
        .ccid_hc_tx_packet_recv    = ccid3_hc_tx_packet_recv,
-       .ccid_hc_tx_insert_options = ccid3_hc_tx_insert_options,
        .ccid_hc_tx_parse_options  = ccid3_hc_tx_parse_options,
        .ccid_hc_rx_obj_size       = sizeof(struct ccid3_hc_rx_sock),
        .ccid_hc_rx_init           = ccid3_hc_rx_init,
index f398b43bc055fef04bd4f0fa72adaa06d73ca7be..c03ba61eb6da3c37a1bd225a24b566fdd2e89434 100644 (file)
@@ -557,11 +557,6 @@ int dccp_insert_options(struct sock *sk, struct sk_buff *skb)
                        return -1;
                dp->dccps_hc_rx_insert_options = 0;
        }
-       if (dp->dccps_hc_tx_insert_options) {
-               if (ccid_hc_tx_insert_options(dp->dccps_hc_tx_ccid, sk, skb))
-                       return -1;
-               dp->dccps_hc_tx_insert_options = 0;
-       }
 
        /* Feature negotiation */
        /* Data packets can't do feat negotiation */