aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ipv6.h5
-rw-r--r--include/net/transp_v6.h5
-rw-r--r--include/net/udplite.h9
3 files changed, 17 insertions, 2 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 8b05c65415cb..96b1763bfcaa 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -603,8 +603,13 @@ extern int tcp6_proc_init(void);
603extern void tcp6_proc_exit(void); 603extern void tcp6_proc_exit(void);
604extern int udp6_proc_init(void); 604extern int udp6_proc_init(void);
605extern void udp6_proc_exit(void); 605extern void udp6_proc_exit(void);
606#ifdef CONFIG_IP_UDPLITE
606extern int udplite6_proc_init(void); 607extern int udplite6_proc_init(void);
607extern void udplite6_proc_exit(void); 608extern void udplite6_proc_exit(void);
609#else
610static inline int udplite6_proc_init(void) { return 0; }
611static inline void udplite6_proc_exit(void) { }
612#endif
608extern int ipv6_misc_proc_init(void); 613extern int ipv6_misc_proc_init(void);
609extern void ipv6_misc_proc_exit(void); 614extern void ipv6_misc_proc_exit(void);
610extern int snmp6_register_dev(struct inet6_dev *idev); 615extern int snmp6_register_dev(struct inet6_dev *idev);
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h
index 27394e0447d8..902e6c6bc793 100644
--- a/include/net/transp_v6.h
+++ b/include/net/transp_v6.h
@@ -27,8 +27,13 @@ extern int rawv6_init(void);
27extern void rawv6_exit(void); 27extern void rawv6_exit(void);
28extern int udpv6_init(void); 28extern int udpv6_init(void);
29extern void udpv6_exit(void); 29extern void udpv6_exit(void);
30#ifdef CONFIG_IP_UDPLITE
30extern int udplitev6_init(void); 31extern int udplitev6_init(void);
31extern void udplitev6_exit(void); 32extern void udplitev6_exit(void);
33#else
34static inline int udplitev6_init(void) { return 0; }
35static inline void udplitev6_exit(void) { }
36#endif
32extern int tcpv6_init(void); 37extern int tcpv6_init(void);
33extern void tcpv6_exit(void); 38extern void tcpv6_exit(void);
34 39
diff --git a/include/net/udplite.h b/include/net/udplite.h
index b76b2e377af4..01ddb2c20264 100644
--- a/include/net/udplite.h
+++ b/include/net/udplite.h
@@ -25,7 +25,9 @@ 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 */
26static inline int udplite_sk_init(struct sock *sk) 26static inline int udplite_sk_init(struct sock *sk)
27{ 27{
28#ifdef CONFIG_IP_UDPLITE
28 udp_sk(sk)->pcflag = UDPLITE_BIT; 29 udp_sk(sk)->pcflag = UDPLITE_BIT;
30#endif
29 return 0; 31 return 0;
30} 32}
31 33
@@ -69,7 +71,7 @@ static inline int udplite_checksum_init(struct sk_buff *skb, struct udphdr *uh)
69static inline int udplite_sender_cscov(struct udp_sock *up, struct udphdr *uh) 71static inline int udplite_sender_cscov(struct udp_sock *up, struct udphdr *uh)
70{ 72{
71 int cscov = up->len; 73 int cscov = up->len;
72 74#ifdef CONFIG_IP_UDPLITE
73 /* 75 /*
74 * Sender has set `partial coverage' option on UDP-Lite socket 76 * Sender has set `partial coverage' option on UDP-Lite socket
75 */ 77 */
@@ -93,13 +95,15 @@ static inline int udplite_sender_cscov(struct udp_sock *up, struct udphdr *uh)
93 * illegal, we fall back to the defaults here. 95 * illegal, we fall back to the defaults here.
94 */ 96 */
95 } 97 }
98#endif
96 return cscov; 99 return cscov;
97} 100}
98 101
99static inline __wsum udplite_csum_outgoing(struct sock *sk, struct sk_buff *skb) 102static inline __wsum udplite_csum_outgoing(struct sock *sk, struct sk_buff *skb)
100{ 103{
101 int cscov = udplite_sender_cscov(udp_sk(sk), udp_hdr(skb));
102 __wsum csum = 0; 104 __wsum csum = 0;
105#ifdef CONFIG_IP_UDPLITE
106 int cscov = udplite_sender_cscov(udp_sk(sk), udp_hdr(skb));
103 107
104 skb->ip_summed = CHECKSUM_NONE; /* no HW support for checksumming */ 108 skb->ip_summed = CHECKSUM_NONE; /* no HW support for checksumming */
105 109
@@ -112,6 +116,7 @@ static inline __wsum udplite_csum_outgoing(struct sock *sk, struct sk_buff *skb)
112 if ((cscov -= len) <= 0) 116 if ((cscov -= len) <= 0)
113 break; 117 break;
114 } 118 }
119#endif
115 return csum; 120 return csum;
116} 121}
117 122