diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2006-12-09 21:05:38 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-11 17:34:49 -0500 |
commit | 65d6c2b42ecc0ca77bb3c0fe27fcbdc84fc7a79a (patch) | |
tree | f38a54545125cf0c736fd484f03ec3e3ee3d971a | |
parent | f6282f4da5eb67e08eff94d73a1911c3a008846a (diff) |
[DCCP] ccid: Deprecate ccid_hc_tx_insert_options
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>
-rw-r--r-- | net/dccp/ccid.h | 10 | ||||
-rw-r--r-- | net/dccp/ccids/ccid3.c | 12 | ||||
-rw-r--r-- | net/dccp/options.c | 5 |
3 files changed, 0 insertions, 27 deletions
diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h index bcc2d12ae81c..c65cb2453e43 100644 --- a/net/dccp/ccid.h +++ b/net/dccp/ccid.h | |||
@@ -43,8 +43,6 @@ struct ccid_operations { | |||
43 | unsigned char* value); | 43 | unsigned char* value); |
44 | int (*ccid_hc_rx_insert_options)(struct sock *sk, | 44 | int (*ccid_hc_rx_insert_options)(struct sock *sk, |
45 | struct sk_buff *skb); | 45 | struct sk_buff *skb); |
46 | int (*ccid_hc_tx_insert_options)(struct sock *sk, | ||
47 | struct sk_buff *skb); | ||
48 | void (*ccid_hc_tx_packet_recv)(struct sock *sk, | 46 | void (*ccid_hc_tx_packet_recv)(struct sock *sk, |
49 | struct sk_buff *skb); | 47 | struct sk_buff *skb); |
50 | int (*ccid_hc_tx_parse_options)(struct sock *sk, | 48 | 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, | |||
146 | return rc; | 144 | return rc; |
147 | } | 145 | } |
148 | 146 | ||
149 | static inline int ccid_hc_tx_insert_options(struct ccid *ccid, struct sock *sk, | ||
150 | struct sk_buff *skb) | ||
151 | { | ||
152 | if (ccid->ccid_ops->ccid_hc_tx_insert_options != NULL) | ||
153 | return ccid->ccid_ops->ccid_hc_tx_insert_options(sk, skb); | ||
154 | return 0; | ||
155 | } | ||
156 | |||
157 | static inline int ccid_hc_rx_insert_options(struct ccid *ccid, struct sock *sk, | 147 | static inline int ccid_hc_rx_insert_options(struct ccid *ccid, struct sock *sk, |
158 | struct sk_buff *skb) | 148 | struct sk_buff *skb) |
159 | { | 149 | { |
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index 936704d1b77e..7017d84a381d 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c | |||
@@ -551,17 +551,6 @@ static void ccid3_hc_tx_packet_recv(struct sock *sk, struct sk_buff *skb) | |||
551 | } | 551 | } |
552 | } | 552 | } |
553 | 553 | ||
554 | static int ccid3_hc_tx_insert_options(struct sock *sk, struct sk_buff *skb) | ||
555 | { | ||
556 | const struct ccid3_hc_tx_sock *hctx = ccid3_hc_tx_sk(sk); | ||
557 | |||
558 | BUG_ON(hctx == NULL); | ||
559 | |||
560 | if (sk->sk_state == DCCP_OPEN || sk->sk_state == DCCP_PARTOPEN) | ||
561 | DCCP_SKB_CB(skb)->dccpd_ccval = hctx->ccid3hctx_last_win_count; | ||
562 | return 0; | ||
563 | } | ||
564 | |||
565 | static int ccid3_hc_tx_parse_options(struct sock *sk, unsigned char option, | 554 | static int ccid3_hc_tx_parse_options(struct sock *sk, unsigned char option, |
566 | unsigned char len, u16 idx, | 555 | unsigned char len, u16 idx, |
567 | unsigned char *value) | 556 | unsigned char *value) |
@@ -1216,7 +1205,6 @@ static struct ccid_operations ccid3 = { | |||
1216 | .ccid_hc_tx_send_packet = ccid3_hc_tx_send_packet, | 1205 | .ccid_hc_tx_send_packet = ccid3_hc_tx_send_packet, |
1217 | .ccid_hc_tx_packet_sent = ccid3_hc_tx_packet_sent, | 1206 | .ccid_hc_tx_packet_sent = ccid3_hc_tx_packet_sent, |
1218 | .ccid_hc_tx_packet_recv = ccid3_hc_tx_packet_recv, | 1207 | .ccid_hc_tx_packet_recv = ccid3_hc_tx_packet_recv, |
1219 | .ccid_hc_tx_insert_options = ccid3_hc_tx_insert_options, | ||
1220 | .ccid_hc_tx_parse_options = ccid3_hc_tx_parse_options, | 1208 | .ccid_hc_tx_parse_options = ccid3_hc_tx_parse_options, |
1221 | .ccid_hc_rx_obj_size = sizeof(struct ccid3_hc_rx_sock), | 1209 | .ccid_hc_rx_obj_size = sizeof(struct ccid3_hc_rx_sock), |
1222 | .ccid_hc_rx_init = ccid3_hc_rx_init, | 1210 | .ccid_hc_rx_init = ccid3_hc_rx_init, |
diff --git a/net/dccp/options.c b/net/dccp/options.c index f398b43bc055..c03ba61eb6da 100644 --- a/net/dccp/options.c +++ b/net/dccp/options.c | |||
@@ -557,11 +557,6 @@ int dccp_insert_options(struct sock *sk, struct sk_buff *skb) | |||
557 | return -1; | 557 | return -1; |
558 | dp->dccps_hc_rx_insert_options = 0; | 558 | dp->dccps_hc_rx_insert_options = 0; |
559 | } | 559 | } |
560 | if (dp->dccps_hc_tx_insert_options) { | ||
561 | if (ccid_hc_tx_insert_options(dp->dccps_hc_tx_ccid, sk, skb)) | ||
562 | return -1; | ||
563 | dp->dccps_hc_tx_insert_options = 0; | ||
564 | } | ||
565 | 560 | ||
566 | /* Feature negotiation */ | 561 | /* Feature negotiation */ |
567 | /* Data packets can't do feat negotiation */ | 562 | /* Data packets can't do feat negotiation */ |