diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/ax25.h | 9 | ||||
-rw-r--r-- | include/net/bluetooth/rfcomm.h | 2 | ||||
-rw-r--r-- | include/net/ieee80211.h | 4 | ||||
-rw-r--r-- | include/net/ip.h | 1 | ||||
-rw-r--r-- | include/net/irda/irda.h | 6 | ||||
-rw-r--r-- | include/net/irda/irlap.h | 3 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_l3proto.h | 15 | ||||
-rw-r--r-- | include/net/route.h | 5 | ||||
-rw-r--r-- | include/net/sctp/structs.h | 2 | ||||
-rw-r--r-- | include/net/sock.h | 10 | ||||
-rw-r--r-- | include/net/xfrm.h | 7 |
11 files changed, 41 insertions, 23 deletions
diff --git a/include/net/ax25.h b/include/net/ax25.h index 2250a18b0cbb..d052b221dbcd 100644 --- a/include/net/ax25.h +++ b/include/net/ax25.h | |||
@@ -110,8 +110,15 @@ enum { | |||
110 | enum { | 110 | enum { |
111 | AX25_PROTO_STD_SIMPLEX, | 111 | AX25_PROTO_STD_SIMPLEX, |
112 | AX25_PROTO_STD_DUPLEX, | 112 | AX25_PROTO_STD_DUPLEX, |
113 | #ifdef CONFIG_AX25_DAMA_SLAVE | ||
113 | AX25_PROTO_DAMA_SLAVE, | 114 | AX25_PROTO_DAMA_SLAVE, |
114 | AX25_PROTO_DAMA_MASTER | 115 | #ifdef CONFIG_AX25_DAMA_MASTER |
116 | AX25_PROTO_DAMA_MASTER, | ||
117 | #define AX25_PROTO_MAX AX25_PROTO_DAMA_MASTER | ||
118 | #endif | ||
119 | #endif | ||
120 | __AX25_PROTO_MAX, | ||
121 | AX25_PROTO_MAX = __AX25_PROTO_MAX -1 | ||
115 | }; | 122 | }; |
116 | 123 | ||
117 | enum { | 124 | enum { |
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h index bbfac86734ec..89d743cfdfdf 100644 --- a/include/net/bluetooth/rfcomm.h +++ b/include/net/bluetooth/rfcomm.h | |||
@@ -33,7 +33,7 @@ | |||
33 | #define RFCOMM_DEFAULT_MTU 127 | 33 | #define RFCOMM_DEFAULT_MTU 127 |
34 | #define RFCOMM_DEFAULT_CREDITS 7 | 34 | #define RFCOMM_DEFAULT_CREDITS 7 |
35 | 35 | ||
36 | #define RFCOMM_MAX_L2CAP_MTU 1024 | 36 | #define RFCOMM_MAX_L2CAP_MTU 1013 |
37 | #define RFCOMM_MAX_CREDITS 40 | 37 | #define RFCOMM_MAX_CREDITS 40 |
38 | 38 | ||
39 | #define RFCOMM_SKB_HEAD_RESERVE 8 | 39 | #define RFCOMM_SKB_HEAD_RESERVE 8 |
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h index df05f468fa5c..9a92aef8b0b2 100644 --- a/include/net/ieee80211.h +++ b/include/net/ieee80211.h | |||
@@ -803,9 +803,9 @@ enum ieee80211_state { | |||
803 | #define IEEE80211_24GHZ_MAX_CHANNEL 14 | 803 | #define IEEE80211_24GHZ_MAX_CHANNEL 14 |
804 | #define IEEE80211_24GHZ_CHANNELS 14 | 804 | #define IEEE80211_24GHZ_CHANNELS 14 |
805 | 805 | ||
806 | #define IEEE80211_52GHZ_MIN_CHANNEL 36 | 806 | #define IEEE80211_52GHZ_MIN_CHANNEL 34 |
807 | #define IEEE80211_52GHZ_MAX_CHANNEL 165 | 807 | #define IEEE80211_52GHZ_MAX_CHANNEL 165 |
808 | #define IEEE80211_52GHZ_CHANNELS 32 | 808 | #define IEEE80211_52GHZ_CHANNELS 131 |
809 | 809 | ||
810 | enum { | 810 | enum { |
811 | IEEE80211_CH_PASSIVE_ONLY = (1 << 0), | 811 | IEEE80211_CH_PASSIVE_ONLY = (1 << 0), |
diff --git a/include/net/ip.h b/include/net/ip.h index 8de0697b364c..fab3d5b3ab1c 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -41,6 +41,7 @@ struct inet_skb_parm | |||
41 | #define IPSKB_XFRM_TUNNEL_SIZE 2 | 41 | #define IPSKB_XFRM_TUNNEL_SIZE 2 |
42 | #define IPSKB_XFRM_TRANSFORMED 4 | 42 | #define IPSKB_XFRM_TRANSFORMED 4 |
43 | #define IPSKB_FRAG_COMPLETE 8 | 43 | #define IPSKB_FRAG_COMPLETE 8 |
44 | #define IPSKB_REROUTED 16 | ||
44 | }; | 45 | }; |
45 | 46 | ||
46 | struct ipcm_cookie | 47 | struct ipcm_cookie |
diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h index 05a840837fe7..1880e46ecc9b 100644 --- a/include/net/irda/irda.h +++ b/include/net/irda/irda.h | |||
@@ -82,9 +82,9 @@ do { if(!(expr)) { \ | |||
82 | #define IRDA_ASSERT_LABEL(label) | 82 | #define IRDA_ASSERT_LABEL(label) |
83 | #endif /* CONFIG_IRDA_DEBUG */ | 83 | #endif /* CONFIG_IRDA_DEBUG */ |
84 | 84 | ||
85 | #define IRDA_WARNING(args...) printk(KERN_WARNING args) | 85 | #define IRDA_WARNING(args...) do { if (net_ratelimit()) printk(KERN_WARNING args); } while (0) |
86 | #define IRDA_MESSAGE(args...) printk(KERN_INFO args) | 86 | #define IRDA_MESSAGE(args...) do { if (net_ratelimit()) printk(KERN_INFO args); } while (0) |
87 | #define IRDA_ERROR(args...) printk(KERN_ERR args) | 87 | #define IRDA_ERROR(args...) do { if (net_ratelimit()) printk(KERN_ERR args); } while (0) |
88 | 88 | ||
89 | /* | 89 | /* |
90 | * Magic numbers used by Linux-IrDA. Random numbers which must be unique to | 90 | * Magic numbers used by Linux-IrDA. Random numbers which must be unique to |
diff --git a/include/net/irda/irlap.h b/include/net/irda/irlap.h index f55e86e75030..2127cae1e0a6 100644 --- a/include/net/irda/irlap.h +++ b/include/net/irda/irlap.h | |||
@@ -50,6 +50,9 @@ | |||
50 | /* May be different when we get VFIR */ | 50 | /* May be different when we get VFIR */ |
51 | #define LAP_MAX_HEADER (LAP_ADDR_HEADER + LAP_CTRL_HEADER) | 51 | #define LAP_MAX_HEADER (LAP_ADDR_HEADER + LAP_CTRL_HEADER) |
52 | 52 | ||
53 | /* Each IrDA device gets a random 32 bits IRLAP device address */ | ||
54 | #define LAP_ALEN 4 | ||
55 | |||
53 | #define BROADCAST 0xffffffff /* Broadcast device address */ | 56 | #define BROADCAST 0xffffffff /* Broadcast device address */ |
54 | #define CBROADCAST 0xfe /* Connection broadcast address */ | 57 | #define CBROADCAST 0xfe /* Connection broadcast address */ |
55 | #define XID_FORMAT 0x01 /* Discovery XID format */ | 58 | #define XID_FORMAT 0x01 /* Discovery XID format */ |
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h index 67856eb93b43..dac43b15a5b0 100644 --- a/include/net/netfilter/nf_conntrack_l3proto.h +++ b/include/net/netfilter/nf_conntrack_l3proto.h | |||
@@ -88,12 +88,6 @@ extern struct nf_conntrack_l3proto *nf_ct_l3protos[AF_MAX]; | |||
88 | extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto); | 88 | extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto); |
89 | extern void nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto); | 89 | extern void nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto); |
90 | 90 | ||
91 | static inline struct nf_conntrack_l3proto * | ||
92 | __nf_ct_l3proto_find(u_int16_t l3proto) | ||
93 | { | ||
94 | return nf_ct_l3protos[l3proto]; | ||
95 | } | ||
96 | |||
97 | extern struct nf_conntrack_l3proto * | 91 | extern struct nf_conntrack_l3proto * |
98 | nf_ct_l3proto_find_get(u_int16_t l3proto); | 92 | nf_ct_l3proto_find_get(u_int16_t l3proto); |
99 | 93 | ||
@@ -103,4 +97,13 @@ extern void nf_ct_l3proto_put(struct nf_conntrack_l3proto *p); | |||
103 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4; | 97 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4; |
104 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv6; | 98 | extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv6; |
105 | extern struct nf_conntrack_l3proto nf_conntrack_generic_l3proto; | 99 | extern struct nf_conntrack_l3proto nf_conntrack_generic_l3proto; |
100 | |||
101 | static inline struct nf_conntrack_l3proto * | ||
102 | __nf_ct_l3proto_find(u_int16_t l3proto) | ||
103 | { | ||
104 | if (unlikely(l3proto >= AF_MAX)) | ||
105 | return &nf_conntrack_generic_l3proto; | ||
106 | return nf_ct_l3protos[l3proto]; | ||
107 | } | ||
108 | |||
106 | #endif /*_NF_CONNTRACK_L3PROTO_H*/ | 109 | #endif /*_NF_CONNTRACK_L3PROTO_H*/ |
diff --git a/include/net/route.h b/include/net/route.h index e3e5436f8017..9c04f15090d2 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -170,8 +170,8 @@ static inline int ip_route_connect(struct rtable **rp, u32 dst, | |||
170 | return ip_route_output_flow(rp, &fl, sk, 0); | 170 | return ip_route_output_flow(rp, &fl, sk, 0); |
171 | } | 171 | } |
172 | 172 | ||
173 | static inline int ip_route_newports(struct rtable **rp, u16 sport, u16 dport, | 173 | static inline int ip_route_newports(struct rtable **rp, u8 protocol, |
174 | struct sock *sk) | 174 | u16 sport, u16 dport, struct sock *sk) |
175 | { | 175 | { |
176 | if (sport != (*rp)->fl.fl_ip_sport || | 176 | if (sport != (*rp)->fl.fl_ip_sport || |
177 | dport != (*rp)->fl.fl_ip_dport) { | 177 | dport != (*rp)->fl.fl_ip_dport) { |
@@ -180,6 +180,7 @@ static inline int ip_route_newports(struct rtable **rp, u16 sport, u16 dport, | |||
180 | memcpy(&fl, &(*rp)->fl, sizeof(fl)); | 180 | memcpy(&fl, &(*rp)->fl, sizeof(fl)); |
181 | fl.fl_ip_sport = sport; | 181 | fl.fl_ip_sport = sport; |
182 | fl.fl_ip_dport = dport; | 182 | fl.fl_ip_dport = dport; |
183 | fl.proto = protocol; | ||
183 | ip_rt_put(*rp); | 184 | ip_rt_put(*rp); |
184 | *rp = NULL; | 185 | *rp = NULL; |
185 | return ip_route_output_flow(rp, &fl, sk, 0); | 186 | return ip_route_output_flow(rp, &fl, sk, 0); |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 8c522ae031bb..072f407848a6 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -700,7 +700,7 @@ struct sctp_chunk { | |||
700 | __u8 ecn_ce_done; /* Have we processed the ECN CE bit? */ | 700 | __u8 ecn_ce_done; /* Have we processed the ECN CE bit? */ |
701 | __u8 pdiscard; /* Discard the whole packet now? */ | 701 | __u8 pdiscard; /* Discard the whole packet now? */ |
702 | __u8 tsn_gap_acked; /* Is this chunk acked by a GAP ACK? */ | 702 | __u8 tsn_gap_acked; /* Is this chunk acked by a GAP ACK? */ |
703 | __u8 fast_retransmit; /* Is this chunk fast retransmitted? */ | 703 | __s8 fast_retransmit; /* Is this chunk fast retransmitted? */ |
704 | __u8 tsn_missing_report; /* Data chunk missing counter. */ | 704 | __u8 tsn_missing_report; /* Data chunk missing counter. */ |
705 | }; | 705 | }; |
706 | 706 | ||
diff --git a/include/net/sock.h b/include/net/sock.h index 1806e5b61419..f63d0d56712c 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -478,9 +478,9 @@ static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb) | |||
478 | rc = __condition; \ | 478 | rc = __condition; \ |
479 | if (!rc) { \ | 479 | if (!rc) { \ |
480 | *(__timeo) = schedule_timeout(*(__timeo)); \ | 480 | *(__timeo) = schedule_timeout(*(__timeo)); \ |
481 | rc = __condition; \ | ||
482 | } \ | 481 | } \ |
483 | lock_sock(__sk); \ | 482 | lock_sock(__sk); \ |
483 | rc = __condition; \ | ||
484 | rc; \ | 484 | rc; \ |
485 | }) | 485 | }) |
486 | 486 | ||
@@ -1354,12 +1354,12 @@ extern int sock_get_timestamp(struct sock *, struct timeval __user *); | |||
1354 | * Enable debug/info messages | 1354 | * Enable debug/info messages |
1355 | */ | 1355 | */ |
1356 | 1356 | ||
1357 | #if 0 | 1357 | #ifdef CONFIG_NETDEBUG |
1358 | #define NETDEBUG(fmt, args...) do { } while (0) | ||
1359 | #define LIMIT_NETDEBUG(fmt, args...) do { } while(0) | ||
1360 | #else | ||
1361 | #define NETDEBUG(fmt, args...) printk(fmt,##args) | 1358 | #define NETDEBUG(fmt, args...) printk(fmt,##args) |
1362 | #define LIMIT_NETDEBUG(fmt, args...) do { if (net_ratelimit()) printk(fmt,##args); } while(0) | 1359 | #define LIMIT_NETDEBUG(fmt, args...) do { if (net_ratelimit()) printk(fmt,##args); } while(0) |
1360 | #else | ||
1361 | #define NETDEBUG(fmt, args...) do { } while (0) | ||
1362 | #define LIMIT_NETDEBUG(fmt, args...) do { } while(0) | ||
1363 | #endif | 1363 | #endif |
1364 | 1364 | ||
1365 | /* | 1365 | /* |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index d09ca0e7d139..8d362c49b8a9 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -233,7 +233,6 @@ struct xfrm_type | |||
233 | int (*init_state)(struct xfrm_state *x); | 233 | int (*init_state)(struct xfrm_state *x); |
234 | void (*destructor)(struct xfrm_state *); | 234 | void (*destructor)(struct xfrm_state *); |
235 | int (*input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb); | 235 | int (*input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb); |
236 | int (*post_input)(struct xfrm_state *, struct xfrm_decap_state *, struct sk_buff *skb); | ||
237 | int (*output)(struct xfrm_state *, struct sk_buff *pskb); | 236 | int (*output)(struct xfrm_state *, struct sk_buff *pskb); |
238 | /* Estimate maximal size of result of transformation of a dgram */ | 237 | /* Estimate maximal size of result of transformation of a dgram */ |
239 | u32 (*get_max_size)(struct xfrm_state *, int size); | 238 | u32 (*get_max_size)(struct xfrm_state *, int size); |
@@ -403,6 +402,11 @@ unsigned xfrm_spi_hash(xfrm_address_t *addr, u32 spi, u8 proto, unsigned short f | |||
403 | 402 | ||
404 | extern void __xfrm_state_destroy(struct xfrm_state *); | 403 | extern void __xfrm_state_destroy(struct xfrm_state *); |
405 | 404 | ||
405 | static inline void __xfrm_state_put(struct xfrm_state *x) | ||
406 | { | ||
407 | atomic_dec(&x->refcnt); | ||
408 | } | ||
409 | |||
406 | static inline void xfrm_state_put(struct xfrm_state *x) | 410 | static inline void xfrm_state_put(struct xfrm_state *x) |
407 | { | 411 | { |
408 | if (atomic_dec_and_test(&x->refcnt)) | 412 | if (atomic_dec_and_test(&x->refcnt)) |
@@ -866,7 +870,6 @@ extern int xfrm_state_mtu(struct xfrm_state *x, int mtu); | |||
866 | extern int xfrm_init_state(struct xfrm_state *x); | 870 | extern int xfrm_init_state(struct xfrm_state *x); |
867 | extern int xfrm4_rcv(struct sk_buff *skb); | 871 | extern int xfrm4_rcv(struct sk_buff *skb); |
868 | extern int xfrm4_output(struct sk_buff *skb); | 872 | extern int xfrm4_output(struct sk_buff *skb); |
869 | extern int xfrm4_output_finish(struct sk_buff *skb); | ||
870 | extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler); | 873 | extern int xfrm4_tunnel_register(struct xfrm_tunnel *handler); |
871 | extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler); | 874 | extern int xfrm4_tunnel_deregister(struct xfrm_tunnel *handler); |
872 | extern int xfrm6_rcv_spi(struct sk_buff **pskb, u32 spi); | 875 | extern int xfrm6_rcv_spi(struct sk_buff **pskb, u32 spi); |