diff options
Diffstat (limited to 'include/net/udplite.h')
-rw-r--r-- | include/net/udplite.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/include/net/udplite.h b/include/net/udplite.h index 01ddb2c20264..b76b2e377af4 100644 --- a/include/net/udplite.h +++ b/include/net/udplite.h | |||
@@ -25,9 +25,7 @@ static __inline__ int udplite_getfrag(void *from, char *to, int offset, | |||
25 | /* Designate sk as UDP-Lite socket */ | 25 | /* Designate sk as UDP-Lite socket */ |
26 | static inline int udplite_sk_init(struct sock *sk) | 26 | static inline int udplite_sk_init(struct sock *sk) |
27 | { | 27 | { |
28 | #ifdef CONFIG_IP_UDPLITE | ||
29 | udp_sk(sk)->pcflag = UDPLITE_BIT; | 28 | udp_sk(sk)->pcflag = UDPLITE_BIT; |
30 | #endif | ||
31 | return 0; | 29 | return 0; |
32 | } | 30 | } |
33 | 31 | ||
@@ -71,7 +69,7 @@ static inline int udplite_checksum_init(struct sk_buff *skb, struct udphdr *uh) | |||
71 | static inline int udplite_sender_cscov(struct udp_sock *up, struct udphdr *uh) | 69 | static inline int udplite_sender_cscov(struct udp_sock *up, struct udphdr *uh) |
72 | { | 70 | { |
73 | int cscov = up->len; | 71 | int cscov = up->len; |
74 | #ifdef CONFIG_IP_UDPLITE | 72 | |
75 | /* | 73 | /* |
76 | * Sender has set `partial coverage' option on UDP-Lite socket | 74 | * Sender has set `partial coverage' option on UDP-Lite socket |
77 | */ | 75 | */ |
@@ -95,15 +93,13 @@ static inline int udplite_sender_cscov(struct udp_sock *up, struct udphdr *uh) | |||
95 | * illegal, we fall back to the defaults here. | 93 | * illegal, we fall back to the defaults here. |
96 | */ | 94 | */ |
97 | } | 95 | } |
98 | #endif | ||
99 | return cscov; | 96 | return cscov; |
100 | } | 97 | } |
101 | 98 | ||
102 | static inline __wsum udplite_csum_outgoing(struct sock *sk, struct sk_buff *skb) | 99 | static inline __wsum udplite_csum_outgoing(struct sock *sk, struct sk_buff *skb) |
103 | { | 100 | { |
104 | __wsum csum = 0; | ||
105 | #ifdef CONFIG_IP_UDPLITE | ||
106 | int cscov = udplite_sender_cscov(udp_sk(sk), udp_hdr(skb)); | 101 | int cscov = udplite_sender_cscov(udp_sk(sk), udp_hdr(skb)); |
102 | __wsum csum = 0; | ||
107 | 103 | ||
108 | skb->ip_summed = CHECKSUM_NONE; /* no HW support for checksumming */ | 104 | skb->ip_summed = CHECKSUM_NONE; /* no HW support for checksumming */ |
109 | 105 | ||
@@ -116,7 +112,6 @@ static inline __wsum udplite_csum_outgoing(struct sock *sk, struct sk_buff *skb) | |||
116 | if ((cscov -= len) <= 0) | 112 | if ((cscov -= len) <= 0) |
117 | break; | 113 | break; |
118 | } | 114 | } |
119 | #endif | ||
120 | return csum; | 115 | return csum; |
121 | } | 116 | } |
122 | 117 | ||