aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/addrconf.h1
-rw-r--r--include/net/af_unix.h1
-rw-r--r--include/net/ax25.h1
-rw-r--r--include/net/compat.h1
-rw-r--r--include/net/dst.h1
-rw-r--r--include/net/icmp.h1
-rw-r--r--include/net/ieee80211.h9
-rw-r--r--include/net/ieee80211softmac.h40
-rw-r--r--include/net/ieee80211softmac_wx.h5
-rw-r--r--include/net/inet6_hashtables.h1
-rw-r--r--include/net/inet_hashtables.h1
-rw-r--r--include/net/inet_sock.h1
-rw-r--r--include/net/inet_timewait_sock.h1
-rw-r--r--include/net/ip.h2
-rw-r--r--include/net/ip_fib.h1
-rw-r--r--include/net/ip_mp_alg.h1
-rw-r--r--include/net/ip_vs.h1
-rw-r--r--include/net/ipv6.h1
-rw-r--r--include/net/irda/irda.h1
-rw-r--r--include/net/irda/irda_device.h1
-rw-r--r--include/net/irda/irlap.h1
-rw-r--r--include/net/irda/irlmp.h1
-rw-r--r--include/net/irda/irlmp_frame.h1
-rw-r--r--include/net/irda/qos.h1
-rw-r--r--include/net/llc_if.h17
-rw-r--r--include/net/ndisc.h1
-rw-r--r--include/net/netdma.h44
-rw-r--r--include/net/netfilter/nf_conntrack.h6
-rw-r--r--include/net/netfilter/nf_conntrack_compat.h26
-rw-r--r--include/net/pkt_act.h1
-rw-r--r--include/net/pkt_sched.h7
-rw-r--r--include/net/protocol.h1
-rw-r--r--include/net/raw.h3
-rw-r--r--include/net/red.h1
-rw-r--r--include/net/route.h1
-rw-r--r--include/net/sch_generic.h1
-rw-r--r--include/net/sctp/sctp.h1
-rw-r--r--include/net/sctp/structs.h3
-rw-r--r--include/net/sock.h21
-rw-r--r--include/net/tcp.h16
-rw-r--r--include/net/xfrm.h26
41 files changed, 184 insertions, 68 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index 750e2508dd90..3d71251b3eca 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -45,7 +45,6 @@ struct prefix_info {
45 45
46#ifdef __KERNEL__ 46#ifdef __KERNEL__
47 47
48#include <linux/config.h>
49#include <linux/netdevice.h> 48#include <linux/netdevice.h>
50#include <net/if_inet6.h> 49#include <net/if_inet6.h>
51#include <net/ipv6.h> 50#include <net/ipv6.h>
diff --git a/include/net/af_unix.h b/include/net/af_unix.h
index 427dac94bc7e..795f81f9ec7f 100644
--- a/include/net/af_unix.h
+++ b/include/net/af_unix.h
@@ -1,7 +1,6 @@
1#ifndef __LINUX_NET_AFUNIX_H 1#ifndef __LINUX_NET_AFUNIX_H
2#define __LINUX_NET_AFUNIX_H 2#define __LINUX_NET_AFUNIX_H
3 3
4#include <linux/config.h>
5#include <linux/socket.h> 4#include <linux/socket.h>
6#include <linux/un.h> 5#include <linux/un.h>
7#include <linux/mutex.h> 6#include <linux/mutex.h>
diff --git a/include/net/ax25.h b/include/net/ax25.h
index 5bd997487054..7cd528e9d668 100644
--- a/include/net/ax25.h
+++ b/include/net/ax25.h
@@ -6,7 +6,6 @@
6#ifndef _AX25_H 6#ifndef _AX25_H
7#define _AX25_H 7#define _AX25_H
8 8
9#include <linux/config.h>
10#include <linux/ax25.h> 9#include <linux/ax25.h>
11#include <linux/spinlock.h> 10#include <linux/spinlock.h>
12#include <linux/timer.h> 11#include <linux/timer.h>
diff --git a/include/net/compat.h b/include/net/compat.h
index e65cbedb6abc..9859b60280d5 100644
--- a/include/net/compat.h
+++ b/include/net/compat.h
@@ -1,7 +1,6 @@
1#ifndef NET_COMPAT_H 1#ifndef NET_COMPAT_H
2#define NET_COMPAT_H 2#define NET_COMPAT_H
3 3
4#include <linux/config.h>
5 4
6struct sock; 5struct sock;
7 6
diff --git a/include/net/dst.h b/include/net/dst.h
index 5161e89017f9..36d54fc248b0 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -8,7 +8,6 @@
8#ifndef _NET_DST_H 8#ifndef _NET_DST_H
9#define _NET_DST_H 9#define _NET_DST_H
10 10
11#include <linux/config.h>
12#include <linux/netdevice.h> 11#include <linux/netdevice.h>
13#include <linux/rtnetlink.h> 12#include <linux/rtnetlink.h>
14#include <linux/rcupdate.h> 13#include <linux/rcupdate.h>
diff --git a/include/net/icmp.h b/include/net/icmp.h
index e7c3f20fbafc..05f8ff7d9316 100644
--- a/include/net/icmp.h
+++ b/include/net/icmp.h
@@ -18,7 +18,6 @@
18#ifndef _ICMP_H 18#ifndef _ICMP_H
19#define _ICMP_H 19#define _ICMP_H
20 20
21#include <linux/config.h>
22#include <linux/icmp.h> 21#include <linux/icmp.h>
23 22
24#include <net/inet_sock.h> 23#include <net/inet_sock.h>
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h
index d5926bfb1fc9..d5147770ad47 100644
--- a/include/net/ieee80211.h
+++ b/include/net/ieee80211.h
@@ -29,7 +29,7 @@
29#include <linux/kernel.h> /* ARRAY_SIZE */ 29#include <linux/kernel.h> /* ARRAY_SIZE */
30#include <linux/wireless.h> 30#include <linux/wireless.h>
31 31
32#define IEEE80211_VERSION "git-1.1.7" 32#define IEEE80211_VERSION "git-1.1.13"
33 33
34#define IEEE80211_DATA_LEN 2304 34#define IEEE80211_DATA_LEN 2304
35/* Maximum size for the MA-UNITDATA primitive, 802.11 standard section 35/* Maximum size for the MA-UNITDATA primitive, 802.11 standard section
@@ -104,6 +104,9 @@
104#define IEEE80211_SCTL_FRAG 0x000F 104#define IEEE80211_SCTL_FRAG 0x000F
105#define IEEE80211_SCTL_SEQ 0xFFF0 105#define IEEE80211_SCTL_SEQ 0xFFF0
106 106
107/* QOS control */
108#define IEEE80211_QCTL_TID 0x000F
109
107/* debug macros */ 110/* debug macros */
108 111
109#ifdef CONFIG_IEEE80211_DEBUG 112#ifdef CONFIG_IEEE80211_DEBUG
@@ -1075,6 +1078,7 @@ struct ieee80211_device {
1075 1078
1076 int (*handle_management) (struct net_device * dev, 1079 int (*handle_management) (struct net_device * dev,
1077 struct ieee80211_network * network, u16 type); 1080 struct ieee80211_network * network, u16 type);
1081 int (*is_qos_active) (struct net_device *dev, struct sk_buff *skb);
1078 1082
1079 /* Typical STA methods */ 1083 /* Typical STA methods */
1080 int (*handle_auth) (struct net_device * dev, 1084 int (*handle_auth) (struct net_device * dev,
@@ -1243,7 +1247,8 @@ extern int ieee80211_set_encryption(struct ieee80211_device *ieee);
1243extern int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev); 1247extern int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev);
1244extern void ieee80211_txb_free(struct ieee80211_txb *); 1248extern void ieee80211_txb_free(struct ieee80211_txb *);
1245extern int ieee80211_tx_frame(struct ieee80211_device *ieee, 1249extern int ieee80211_tx_frame(struct ieee80211_device *ieee,
1246 struct ieee80211_hdr *frame, int len); 1250 struct ieee80211_hdr *frame, int hdr_len,
1251 int total_len, int encrypt_mpdu);
1247 1252
1248/* ieee80211_rx.c */ 1253/* ieee80211_rx.c */
1249extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, 1254extern int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
diff --git a/include/net/ieee80211softmac.h b/include/net/ieee80211softmac.h
index 052ed596a4e4..7a483ab4022f 100644
--- a/include/net/ieee80211softmac.h
+++ b/include/net/ieee80211softmac.h
@@ -86,6 +86,9 @@ struct ieee80211softmac_assoc_info {
86 86
87 /* BSSID we're trying to associate to */ 87 /* BSSID we're trying to associate to */
88 char bssid[ETH_ALEN]; 88 char bssid[ETH_ALEN];
89
90 /* Rates supported by the network */
91 struct ieee80211softmac_ratesinfo supported_rates;
89 92
90 /* some flags. 93 /* some flags.
91 * static_essid is valid if the essid is constant, 94 * static_essid is valid if the essid is constant,
@@ -132,23 +135,26 @@ enum {
132struct ieee80211softmac_txrates { 135struct ieee80211softmac_txrates {
133 /* The Bit-Rate to be used for multicast frames. */ 136 /* The Bit-Rate to be used for multicast frames. */
134 u8 mcast_rate; 137 u8 mcast_rate;
135 /* The Bit-Rate to be used for multicast fallback 138
136 * (If the device supports fallback and hardware-retry) 139 /* The Bit-Rate to be used for multicast management frames. */
137 */ 140 u8 mgt_mcast_rate;
138 u8 mcast_fallback; 141
139 /* The Bit-Rate to be used for any other (normal) data packet. */ 142 /* The Bit-Rate to be used for any other (normal) data packet. */
140 u8 default_rate; 143 u8 default_rate;
141 /* The Bit-Rate to be used for default fallback 144 /* The Bit-Rate to be used for default fallback
142 * (If the device supports fallback and hardware-retry) 145 * (If the device supports fallback and hardware-retry)
143 */ 146 */
144 u8 default_fallback; 147 u8 default_fallback;
148
149 /* This is the rate that the user asked for */
150 u8 user_rate;
145}; 151};
146 152
147/* Bits for txrates_change callback. */ 153/* Bits for txrates_change callback. */
148#define IEEE80211SOFTMAC_TXRATECHG_DEFAULT (1 << 0) /* default_rate */ 154#define IEEE80211SOFTMAC_TXRATECHG_DEFAULT (1 << 0) /* default_rate */
149#define IEEE80211SOFTMAC_TXRATECHG_DEFAULT_FBACK (1 << 1) /* default_fallback */ 155#define IEEE80211SOFTMAC_TXRATECHG_DEFAULT_FBACK (1 << 1) /* default_fallback */
150#define IEEE80211SOFTMAC_TXRATECHG_MCAST (1 << 2) /* mcast_rate */ 156#define IEEE80211SOFTMAC_TXRATECHG_MCAST (1 << 2) /* mcast_rate */
151#define IEEE80211SOFTMAC_TXRATECHG_MCAST_FBACK (1 << 3) /* mcast_fallback */ 157#define IEEE80211SOFTMAC_TXRATECHG_MGT_MCAST (1 << 3) /* mgt_mcast_rate */
152 158
153struct ieee80211softmac_device { 159struct ieee80211softmac_device {
154 /* 802.11 structure for data stuff */ 160 /* 802.11 structure for data stuff */
@@ -250,6 +256,28 @@ extern void ieee80211softmac_fragment_lost(struct net_device *dev,
250 * Note that the rates need to be sorted. */ 256 * Note that the rates need to be sorted. */
251extern void ieee80211softmac_set_rates(struct net_device *dev, u8 count, u8 *rates); 257extern void ieee80211softmac_set_rates(struct net_device *dev, u8 count, u8 *rates);
252 258
259/* Helper function which advises you the rate at which a frame should be
260 * transmitted at. */
261static inline u8 ieee80211softmac_suggest_txrate(struct ieee80211softmac_device *mac,
262 int is_multicast,
263 int is_mgt)
264{
265 struct ieee80211softmac_txrates *txrates = &mac->txrates;
266
267 if (!mac->associated)
268 return txrates->mgt_mcast_rate;
269
270 /* We are associated, sending unicast frame */
271 if (!is_multicast)
272 return txrates->default_rate;
273
274 /* We are associated, sending multicast frame */
275 if (is_mgt)
276 return txrates->mgt_mcast_rate;
277 else
278 return txrates->mcast_rate;
279}
280
253/* Start the SoftMAC. Call this after you initialized the device 281/* Start the SoftMAC. Call this after you initialized the device
254 * and it is ready to run. 282 * and it is ready to run.
255 */ 283 */
@@ -282,7 +310,7 @@ extern void ieee80211softmac_stop(struct net_device *dev);
282 * - context set to the context data you want passed 310 * - context set to the context data you want passed
283 * The return value is 0, or an error. 311 * The return value is 0, or an error.
284 */ 312 */
285typedef void (*notify_function_ptr)(struct net_device *dev, void *context); 313typedef void (*notify_function_ptr)(struct net_device *dev, int event_type, void *context);
286 314
287#define ieee80211softmac_notify(dev, event, fun, context) ieee80211softmac_notify_gfp(dev, event, fun, context, GFP_KERNEL); 315#define ieee80211softmac_notify(dev, event, fun, context) ieee80211softmac_notify_gfp(dev, event, fun, context, GFP_KERNEL);
288#define ieee80211softmac_notify_atomic(dev, event, fun, context) ieee80211softmac_notify_gfp(dev, event, fun, context, GFP_ATOMIC); 316#define ieee80211softmac_notify_atomic(dev, event, fun, context) ieee80211softmac_notify_gfp(dev, event, fun, context, GFP_ATOMIC);
diff --git a/include/net/ieee80211softmac_wx.h b/include/net/ieee80211softmac_wx.h
index 3e0be453ecea..4ee3ad57283f 100644
--- a/include/net/ieee80211softmac_wx.h
+++ b/include/net/ieee80211softmac_wx.h
@@ -91,4 +91,9 @@ ieee80211softmac_wx_get_genie(struct net_device *dev,
91 struct iw_request_info *info, 91 struct iw_request_info *info,
92 union iwreq_data *wrqu, 92 union iwreq_data *wrqu,
93 char *extra); 93 char *extra);
94extern int
95ieee80211softmac_wx_set_mlme(struct net_device *dev,
96 struct iw_request_info *info,
97 union iwreq_data *wrqu,
98 char *extra);
94#endif /* _IEEE80211SOFTMAC_WX */ 99#endif /* _IEEE80211SOFTMAC_WX */
diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h
index 59f0c83d55a2..bc6a71dce984 100644
--- a/include/net/inet6_hashtables.h
+++ b/include/net/inet6_hashtables.h
@@ -14,7 +14,6 @@
14#ifndef _INET6_HASHTABLES_H 14#ifndef _INET6_HASHTABLES_H
15#define _INET6_HASHTABLES_H 15#define _INET6_HASHTABLES_H
16 16
17#include <linux/config.h>
18 17
19#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) 18#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
20#include <linux/in6.h> 19#include <linux/in6.h>
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index 135d80fd658e..98e0bb3014fe 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -14,7 +14,6 @@
14#ifndef _INET_HASHTABLES_H 14#ifndef _INET_HASHTABLES_H
15#define _INET_HASHTABLES_H 15#define _INET_HASHTABLES_H
16 16
17#include <linux/config.h>
18 17
19#include <linux/interrupt.h> 18#include <linux/interrupt.h>
20#include <linux/ipv6.h> 19#include <linux/ipv6.h>
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index 883eb529ef8e..1f4a9a60d4cc 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -16,7 +16,6 @@
16#ifndef _INET_SOCK_H 16#ifndef _INET_SOCK_H
17#define _INET_SOCK_H 17#define _INET_SOCK_H
18 18
19#include <linux/config.h>
20 19
21#include <linux/string.h> 20#include <linux/string.h>
22#include <linux/types.h> 21#include <linux/types.h>
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
index e837f98fdb50..600cb543550d 100644
--- a/include/net/inet_timewait_sock.h
+++ b/include/net/inet_timewait_sock.h
@@ -15,7 +15,6 @@
15#ifndef _INET_TIMEWAIT_SOCK_ 15#ifndef _INET_TIMEWAIT_SOCK_
16#define _INET_TIMEWAIT_SOCK_ 16#define _INET_TIMEWAIT_SOCK_
17 17
18#include <linux/config.h>
19 18
20#include <linux/list.h> 19#include <linux/list.h>
21#include <linux/module.h> 20#include <linux/module.h>
diff --git a/include/net/ip.h b/include/net/ip.h
index 3d2e5ca62a5a..98f908400771 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -22,7 +22,6 @@
22#ifndef _IP_H 22#ifndef _IP_H
23#define _IP_H 23#define _IP_H
24 24
25#include <linux/config.h>
26#include <linux/types.h> 25#include <linux/types.h>
27#include <linux/ip.h> 26#include <linux/ip.h>
28#include <linux/in.h> 27#include <linux/in.h>
@@ -147,7 +146,6 @@ void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *ar
147struct ipv4_config 146struct ipv4_config
148{ 147{
149 int log_martians; 148 int log_martians;
150 int autoconfig;
151 int no_pmtu_disc; 149 int no_pmtu_disc;
152}; 150};
153 151
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index e000fa2cd5f6..a095d1dec7a4 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -16,7 +16,6 @@
16#ifndef _NET_IP_FIB_H 16#ifndef _NET_IP_FIB_H
17#define _NET_IP_FIB_H 17#define _NET_IP_FIB_H
18 18
19#include <linux/config.h>
20#include <net/flow.h> 19#include <net/flow.h>
21#include <linux/seq_file.h> 20#include <linux/seq_file.h>
22 21
diff --git a/include/net/ip_mp_alg.h b/include/net/ip_mp_alg.h
index 77225735cbd4..ac747b64734c 100644
--- a/include/net/ip_mp_alg.h
+++ b/include/net/ip_mp_alg.h
@@ -7,7 +7,6 @@
7#ifndef _NET_IP_MP_ALG_H 7#ifndef _NET_IP_MP_ALG_H
8#define _NET_IP_MP_ALG_H 8#define _NET_IP_MP_ALG_H
9 9
10#include <linux/config.h>
11#include <linux/ip_mp_alg.h> 10#include <linux/ip_mp_alg.h>
12#include <net/flow.h> 11#include <net/flow.h>
13#include <net/route.h> 12#include <net/route.h>
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 7d2674fde19a..3b57b159b653 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -248,7 +248,6 @@ struct ip_vs_daemon_user {
248 248
249#ifdef __KERNEL__ 249#ifdef __KERNEL__
250 250
251#include <linux/config.h>
252#include <linux/list.h> /* for struct list_head */ 251#include <linux/list.h> /* for struct list_head */
253#include <linux/spinlock.h> /* for struct rwlock_t */ 252#include <linux/spinlock.h> /* for struct rwlock_t */
254#include <asm/atomic.h> /* for struct atomic_t */ 253#include <asm/atomic.h> /* for struct atomic_t */
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 4abedb8eaece..a8fdf7970b37 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -104,7 +104,6 @@ struct frag_hdr {
104 104
105#ifdef __KERNEL__ 105#ifdef __KERNEL__
106 106
107#include <linux/config.h>
108#include <net/sock.h> 107#include <net/sock.h>
109 108
110/* sysctls */ 109/* sysctls */
diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h
index 1880e46ecc9b..1cb0607fcbb9 100644
--- a/include/net/irda/irda.h
+++ b/include/net/irda/irda.h
@@ -26,7 +26,6 @@
26#ifndef NET_IRDA_H 26#ifndef NET_IRDA_H
27#define NET_IRDA_H 27#define NET_IRDA_H
28 28
29#include <linux/config.h>
30#include <linux/skbuff.h> /* struct sk_buff */ 29#include <linux/skbuff.h> /* struct sk_buff */
31#include <linux/kernel.h> 30#include <linux/kernel.h>
32#include <linux/if.h> /* sa_family_t in <linux/irda.h> */ 31#include <linux/if.h> /* sa_family_t in <linux/irda.h> */
diff --git a/include/net/irda/irda_device.h b/include/net/irda/irda_device.h
index 92c828029cd8..0575c59a5c96 100644
--- a/include/net/irda/irda_device.h
+++ b/include/net/irda/irda_device.h
@@ -39,7 +39,6 @@
39#ifndef IRDA_DEVICE_H 39#ifndef IRDA_DEVICE_H
40#define IRDA_DEVICE_H 40#define IRDA_DEVICE_H
41 41
42#include <linux/config.h>
43#include <linux/tty.h> 42#include <linux/tty.h>
44#include <linux/netdevice.h> 43#include <linux/netdevice.h>
45#include <linux/spinlock.h> 44#include <linux/spinlock.h>
diff --git a/include/net/irda/irlap.h b/include/net/irda/irlap.h
index 2127cae1e0a6..e77eb88d9226 100644
--- a/include/net/irda/irlap.h
+++ b/include/net/irda/irlap.h
@@ -27,7 +27,6 @@
27#ifndef IRLAP_H 27#ifndef IRLAP_H
28#define IRLAP_H 28#define IRLAP_H
29 29
30#include <linux/config.h>
31#include <linux/types.h> 30#include <linux/types.h>
32#include <linux/skbuff.h> 31#include <linux/skbuff.h>
33#include <linux/netdevice.h> 32#include <linux/netdevice.h>
diff --git a/include/net/irda/irlmp.h b/include/net/irda/irlmp.h
index c0c895d379ba..11ecfa58a648 100644
--- a/include/net/irda/irlmp.h
+++ b/include/net/irda/irlmp.h
@@ -29,7 +29,6 @@
29 29
30#include <asm/param.h> /* for HZ */ 30#include <asm/param.h> /* for HZ */
31 31
32#include <linux/config.h>
33#include <linux/types.h> 32#include <linux/types.h>
34 33
35#include <net/irda/irda.h> 34#include <net/irda/irda.h>
diff --git a/include/net/irda/irlmp_frame.h b/include/net/irda/irlmp_frame.h
index eb3ad158c023..c463f8bca856 100644
--- a/include/net/irda/irlmp_frame.h
+++ b/include/net/irda/irlmp_frame.h
@@ -26,7 +26,6 @@
26#ifndef IRMLP_FRAME_H 26#ifndef IRMLP_FRAME_H
27#define IRMLP_FRAME_H 27#define IRMLP_FRAME_H
28 28
29#include <linux/config.h>
30#include <linux/skbuff.h> 29#include <linux/skbuff.h>
31 30
32#include <net/irda/discovery.h> 31#include <net/irda/discovery.h>
diff --git a/include/net/irda/qos.h b/include/net/irda/qos.h
index 9ae3d6bc2423..cc577dc0a0ef 100644
--- a/include/net/irda/qos.h
+++ b/include/net/irda/qos.h
@@ -31,7 +31,6 @@
31#ifndef IRDA_QOS_H 31#ifndef IRDA_QOS_H
32#define IRDA_QOS_H 32#define IRDA_QOS_H
33 33
34#include <linux/config.h>
35#include <linux/skbuff.h> 34#include <linux/skbuff.h>
36 35
37#include <net/irda/parameters.h> 36#include <net/irda/parameters.h>
diff --git a/include/net/llc_if.h b/include/net/llc_if.h
index 090eaa0d71f9..c608812a8e89 100644
--- a/include/net/llc_if.h
+++ b/include/net/llc_if.h
@@ -16,6 +16,7 @@
16#include <linux/if.h> 16#include <linux/if.h>
17#include <linux/if_arp.h> 17#include <linux/if_arp.h>
18#include <linux/llc.h> 18#include <linux/llc.h>
19#include <linux/etherdevice.h>
19#include <net/llc.h> 20#include <net/llc.h>
20 21
21#define LLC_DATAUNIT_PRIM 1 22#define LLC_DATAUNIT_PRIM 1
@@ -61,8 +62,6 @@
61#define LLC_STATUS_CONFLICT 7 /* disconnect conn */ 62#define LLC_STATUS_CONFLICT 7 /* disconnect conn */
62#define LLC_STATUS_RESET_DONE 8 /* */ 63#define LLC_STATUS_RESET_DONE 8 /* */
63 64
64extern u8 llc_mac_null_var[IFHWADDRLEN];
65
66/** 65/**
67 * llc_mac_null - determines if a address is a null mac address 66 * llc_mac_null - determines if a address is a null mac address
68 * @mac: Mac address to test if null. 67 * @mac: Mac address to test if null.
@@ -70,16 +69,20 @@ extern u8 llc_mac_null_var[IFHWADDRLEN];
70 * Determines if a given address is a null mac address. Returns 0 if the 69 * Determines if a given address is a null mac address. Returns 0 if the
71 * address is not a null mac, 1 if the address is a null mac. 70 * address is not a null mac, 1 if the address is a null mac.
72 */ 71 */
73static __inline__ int llc_mac_null(u8 *mac) 72static inline int llc_mac_null(const u8 *mac)
74{ 73{
75 return !memcmp(mac, llc_mac_null_var, IFHWADDRLEN); 74 return is_zero_ether_addr(mac);
76} 75}
77 76
78static __inline__ int llc_addrany(struct llc_addr *addr) 77static inline int llc_addrany(const struct llc_addr *addr)
79{ 78{
80 return llc_mac_null(addr->mac) && !addr->lsap; 79 return llc_mac_null(addr->mac) && !addr->lsap;
81} 80}
82 81
82static inline int llc_mac_multicast(const u8 *mac)
83{
84 return is_multicast_ether_addr(mac);
85}
83/** 86/**
84 * llc_mac_match - determines if two mac addresses are the same 87 * llc_mac_match - determines if two mac addresses are the same
85 * @mac1: First mac address to compare. 88 * @mac1: First mac address to compare.
@@ -89,9 +92,9 @@ static __inline__ int llc_addrany(struct llc_addr *addr)
89 * is not a complete match up to len, 1 if a complete match up to len is 92 * is not a complete match up to len, 1 if a complete match up to len is
90 * found. 93 * found.
91 */ 94 */
92static __inline__ int llc_mac_match(u8 *mac1, u8 *mac2) 95static inline int llc_mac_match(const u8 *mac1, const u8 *mac2)
93{ 96{
94 return !memcmp(mac1, mac2, IFHWADDRLEN); 97 return !compare_ether_addr(mac1, mac2);
95} 98}
96 99
97extern int llc_establish_connection(struct sock *sk, u8 *lmac, 100extern int llc_establish_connection(struct sock *sk, u8 *lmac,
diff --git a/include/net/ndisc.h b/include/net/ndisc.h
index 91fa271a0064..d3915dabe6de 100644
--- a/include/net/ndisc.h
+++ b/include/net/ndisc.h
@@ -37,7 +37,6 @@ enum {
37 37
38#ifdef __KERNEL__ 38#ifdef __KERNEL__
39 39
40#include <linux/config.h>
41#include <linux/compiler.h> 40#include <linux/compiler.h>
42#include <linux/icmpv6.h> 41#include <linux/icmpv6.h>
43#include <linux/in6.h> 42#include <linux/in6.h>
diff --git a/include/net/netdma.h b/include/net/netdma.h
new file mode 100644
index 000000000000..19760eb131aa
--- /dev/null
+++ b/include/net/netdma.h
@@ -0,0 +1,44 @@
1/*
2 * Copyright(c) 2004 - 2006 Intel Corporation. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the Free
6 * Software Foundation; either version 2 of the License, or (at your option)
7 * any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 59
16 * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 *
18 * The full GNU General Public License is included in this distribution in the
19 * file called COPYING.
20 */
21#ifndef NETDMA_H
22#define NETDMA_H
23#include <linux/config.h>
24#ifdef CONFIG_NET_DMA
25#include <linux/dmaengine.h>
26#include <linux/skbuff.h>
27
28static inline struct dma_chan *get_softnet_dma(void)
29{
30 struct dma_chan *chan;
31 rcu_read_lock();
32 chan = rcu_dereference(__get_cpu_var(softnet_data.net_dma));
33 if (chan)
34 dma_chan_get(chan);
35 rcu_read_unlock();
36 return chan;
37}
38
39int dma_skb_copy_datagram_iovec(struct dma_chan* chan,
40 const struct sk_buff *skb, int offset, struct iovec *to,
41 size_t len, struct dma_pinned_list *pinned_list);
42
43#endif /* CONFIG_NET_DMA */
44#endif /* NETDMA_H */
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index 916013ca4a5c..1fbd8193d5f1 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -15,7 +15,6 @@
15#include <linux/netfilter/nf_conntrack_common.h> 15#include <linux/netfilter/nf_conntrack_common.h>
16 16
17#ifdef __KERNEL__ 17#ifdef __KERNEL__
18#include <linux/config.h>
19#include <linux/bitops.h> 18#include <linux/bitops.h>
20#include <linux/compiler.h> 19#include <linux/compiler.h>
21#include <asm/atomic.h> 20#include <asm/atomic.h>
@@ -114,6 +113,10 @@ struct nf_conn
114 u_int32_t mark; 113 u_int32_t mark;
115#endif 114#endif
116 115
116#ifdef CONFIG_NF_CONNTRACK_SECMARK
117 u_int32_t secmark;
118#endif
119
117 /* Storage reserved for other modules: */ 120 /* Storage reserved for other modules: */
118 union nf_conntrack_proto proto; 121 union nf_conntrack_proto proto;
119 122
@@ -285,6 +288,7 @@ static inline int nf_ct_is_dying(struct nf_conn *ct)
285} 288}
286 289
287extern unsigned int nf_conntrack_htable_size; 290extern unsigned int nf_conntrack_htable_size;
291extern int nf_conntrack_checksum;
288 292
289#define NF_CT_STAT_INC(count) (__get_cpu_var(nf_conntrack_stat).count++) 293#define NF_CT_STAT_INC(count) (__get_cpu_var(nf_conntrack_stat).count++)
290 294
diff --git a/include/net/netfilter/nf_conntrack_compat.h b/include/net/netfilter/nf_conntrack_compat.h
index 3cac19fb3648..f1b1482d7200 100644
--- a/include/net/netfilter/nf_conntrack_compat.h
+++ b/include/net/netfilter/nf_conntrack_compat.h
@@ -20,6 +20,19 @@ static inline u_int32_t *nf_ct_get_mark(const struct sk_buff *skb,
20} 20}
21#endif /* CONFIG_IP_NF_CONNTRACK_MARK */ 21#endif /* CONFIG_IP_NF_CONNTRACK_MARK */
22 22
23#ifdef CONFIG_IP_NF_CONNTRACK_SECMARK
24static inline u_int32_t *nf_ct_get_secmark(const struct sk_buff *skb,
25 u_int32_t *ctinfo)
26{
27 struct ip_conntrack *ct = ip_conntrack_get(skb, ctinfo);
28
29 if (ct)
30 return &ct->secmark;
31 else
32 return NULL;
33}
34#endif /* CONFIG_IP_NF_CONNTRACK_SECMARK */
35
23#ifdef CONFIG_IP_NF_CT_ACCT 36#ifdef CONFIG_IP_NF_CT_ACCT
24static inline struct ip_conntrack_counter * 37static inline struct ip_conntrack_counter *
25nf_ct_get_counters(const struct sk_buff *skb) 38nf_ct_get_counters(const struct sk_buff *skb)
@@ -70,6 +83,19 @@ static inline u_int32_t *nf_ct_get_mark(const struct sk_buff *skb,
70} 83}
71#endif /* CONFIG_NF_CONNTRACK_MARK */ 84#endif /* CONFIG_NF_CONNTRACK_MARK */
72 85
86#ifdef CONFIG_NF_CONNTRACK_SECMARK
87static inline u_int32_t *nf_ct_get_secmark(const struct sk_buff *skb,
88 u_int32_t *ctinfo)
89{
90 struct nf_conn *ct = nf_ct_get(skb, ctinfo);
91
92 if (ct)
93 return &ct->secmark;
94 else
95 return NULL;
96}
97#endif /* CONFIG_NF_CONNTRACK_MARK */
98
73#ifdef CONFIG_NF_CT_ACCT 99#ifdef CONFIG_NF_CT_ACCT
74static inline struct ip_conntrack_counter * 100static inline struct ip_conntrack_counter *
75nf_ct_get_counters(const struct sk_buff *skb) 101nf_ct_get_counters(const struct sk_buff *skb)
diff --git a/include/net/pkt_act.h b/include/net/pkt_act.h
index b225d8472b7e..cf5e4d2e4c21 100644
--- a/include/net/pkt_act.h
+++ b/include/net/pkt_act.h
@@ -4,7 +4,6 @@
4#include <asm/uaccess.h> 4#include <asm/uaccess.h>
5#include <asm/system.h> 5#include <asm/system.h>
6#include <linux/bitops.h> 6#include <linux/bitops.h>
7#include <linux/config.h>
8#include <linux/types.h> 7#include <linux/types.h>
9#include <linux/kernel.h> 8#include <linux/kernel.h>
10#include <linux/sched.h> 9#include <linux/sched.h>
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index b94d1ad92c4d..75b5b9333fc7 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -218,12 +218,13 @@ extern struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r,
218 struct rtattr *tab); 218 struct rtattr *tab);
219extern void qdisc_put_rtab(struct qdisc_rate_table *tab); 219extern void qdisc_put_rtab(struct qdisc_rate_table *tab);
220 220
221extern int qdisc_restart(struct net_device *dev); 221extern void __qdisc_run(struct net_device *dev);
222 222
223static inline void qdisc_run(struct net_device *dev) 223static inline void qdisc_run(struct net_device *dev)
224{ 224{
225 while (!netif_queue_stopped(dev) && qdisc_restart(dev) < 0) 225 if (!netif_queue_stopped(dev) &&
226 /* NOTHING */; 226 !test_and_set_bit(__LINK_STATE_QDISC_RUNNING, &dev->state))
227 __qdisc_run(dev);
227} 228}
228 229
229extern int tc_classify(struct sk_buff *skb, struct tcf_proto *tp, 230extern int tc_classify(struct sk_buff *skb, struct tcf_proto *tp,
diff --git a/include/net/protocol.h b/include/net/protocol.h
index 6dc5970612d7..bcaee39bd2ff 100644
--- a/include/net/protocol.h
+++ b/include/net/protocol.h
@@ -24,7 +24,6 @@
24#ifndef _PROTOCOL_H 24#ifndef _PROTOCOL_H
25#define _PROTOCOL_H 25#define _PROTOCOL_H
26 26
27#include <linux/config.h>
28#include <linux/in6.h> 27#include <linux/in6.h>
29#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE) 28#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
30#include <linux/ipv6.h> 29#include <linux/ipv6.h>
diff --git a/include/net/raw.h b/include/net/raw.h
index e67b28a0248c..e4af59781949 100644
--- a/include/net/raw.h
+++ b/include/net/raw.h
@@ -17,7 +17,6 @@
17#ifndef _RAW_H 17#ifndef _RAW_H
18#define _RAW_H 18#define _RAW_H
19 19
20#include <linux/config.h>
21 20
22#include <net/protocol.h> 21#include <net/protocol.h>
23 22
@@ -36,7 +35,7 @@ extern rwlock_t raw_v4_lock;
36 35
37 36
38extern struct sock *__raw_v4_lookup(struct sock *sk, unsigned short num, 37extern struct sock *__raw_v4_lookup(struct sock *sk, unsigned short num,
39 unsigned long raddr, unsigned long laddr, 38 __be32 raddr, __be32 laddr,
40 int dif); 39 int dif);
41 40
42extern int raw_v4_input(struct sk_buff *skb, struct iphdr *iph, int hash); 41extern int raw_v4_input(struct sk_buff *skb, struct iphdr *iph, int hash);
diff --git a/include/net/red.h b/include/net/red.h
index 2ed4358e3295..5ccdbb3d4722 100644
--- a/include/net/red.h
+++ b/include/net/red.h
@@ -1,7 +1,6 @@
1#ifndef __NET_SCHED_RED_H 1#ifndef __NET_SCHED_RED_H
2#define __NET_SCHED_RED_H 2#define __NET_SCHED_RED_H
3 3
4#include <linux/config.h>
5#include <linux/types.h> 4#include <linux/types.h>
6#include <net/pkt_sched.h> 5#include <net/pkt_sched.h>
7#include <net/inet_ecn.h> 6#include <net/inet_ecn.h>
diff --git a/include/net/route.h b/include/net/route.h
index 98c915abdec8..c4a068692dcc 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -24,7 +24,6 @@
24#ifndef _ROUTE_H 24#ifndef _ROUTE_H
25#define _ROUTE_H 25#define _ROUTE_H
26 26
27#include <linux/config.h>
28#include <net/dst.h> 27#include <net/dst.h>
29#include <net/inetpeer.h> 28#include <net/inetpeer.h>
30#include <net/flow.h> 29#include <net/flow.h>
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 7b6ec9986715..b0e9108a4e18 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -1,7 +1,6 @@
1#ifndef __NET_SCHED_GENERIC_H 1#ifndef __NET_SCHED_GENERIC_H
2#define __NET_SCHED_GENERIC_H 2#define __NET_SCHED_GENERIC_H
3 3
4#include <linux/config.h>
5#include <linux/netdevice.h> 4#include <linux/netdevice.h>
6#include <linux/types.h> 5#include <linux/types.h>
7#include <linux/rcupdate.h> 6#include <linux/rcupdate.h>
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index aa6033ca7cd8..a9663b49ea54 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -63,7 +63,6 @@
63 */ 63 */
64 64
65 65
66#include <linux/config.h>
67 66
68#ifdef TEST_FRAME 67#ifdef TEST_FRAME
69#undef CONFIG_PROC_FS 68#undef CONFIG_PROC_FS
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 7f4fea173fb1..5f69158c1006 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -555,7 +555,8 @@ struct sctp_af {
555 int (*to_addr_param) (const union sctp_addr *, 555 int (*to_addr_param) (const union sctp_addr *,
556 union sctp_addr_param *); 556 union sctp_addr_param *);
557 int (*addr_valid) (union sctp_addr *, 557 int (*addr_valid) (union sctp_addr *,
558 struct sctp_sock *); 558 struct sctp_sock *,
559 const struct sk_buff *);
559 sctp_scope_t (*scope) (union sctp_addr *); 560 sctp_scope_t (*scope) (union sctp_addr *);
560 void (*inaddr_any) (union sctp_addr *, unsigned short); 561 void (*inaddr_any) (union sctp_addr *, unsigned short);
561 int (*is_any) (const union sctp_addr *); 562 int (*is_any) (const union sctp_addr *);
diff --git a/include/net/sock.h b/include/net/sock.h
index c9fad6fb629b..d10dfecb6cbd 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -40,7 +40,6 @@
40#ifndef _SOCK_H 40#ifndef _SOCK_H
41#define _SOCK_H 41#define _SOCK_H
42 42
43#include <linux/config.h>
44#include <linux/list.h> 43#include <linux/list.h>
45#include <linux/timer.h> 44#include <linux/timer.h>
46#include <linux/cache.h> 45#include <linux/cache.h>
@@ -132,6 +131,7 @@ struct sock_common {
132 * @sk_receive_queue: incoming packets 131 * @sk_receive_queue: incoming packets
133 * @sk_wmem_alloc: transmit queue bytes committed 132 * @sk_wmem_alloc: transmit queue bytes committed
134 * @sk_write_queue: Packet sending queue 133 * @sk_write_queue: Packet sending queue
134 * @sk_async_wait_queue: DMA copied packets
135 * @sk_omem_alloc: "o" is "option" or "other" 135 * @sk_omem_alloc: "o" is "option" or "other"
136 * @sk_wmem_queued: persistent queue size 136 * @sk_wmem_queued: persistent queue size
137 * @sk_forward_alloc: space allocated forward 137 * @sk_forward_alloc: space allocated forward
@@ -205,6 +205,7 @@ struct sock {
205 atomic_t sk_omem_alloc; 205 atomic_t sk_omem_alloc;
206 struct sk_buff_head sk_receive_queue; 206 struct sk_buff_head sk_receive_queue;
207 struct sk_buff_head sk_write_queue; 207 struct sk_buff_head sk_write_queue;
208 struct sk_buff_head sk_async_wait_queue;
208 int sk_wmem_queued; 209 int sk_wmem_queued;
209 int sk_forward_alloc; 210 int sk_forward_alloc;
210 gfp_t sk_allocation; 211 gfp_t sk_allocation;
@@ -871,10 +872,7 @@ static inline int sk_filter(struct sock *sk, struct sk_buff *skb, int needlock)
871 if (filter) { 872 if (filter) {
872 unsigned int pkt_len = sk_run_filter(skb, filter->insns, 873 unsigned int pkt_len = sk_run_filter(skb, filter->insns,
873 filter->len); 874 filter->len);
874 if (!pkt_len) 875 err = pkt_len ? pskb_trim(skb, pkt_len) : -EPERM;
875 err = -EPERM;
876 else
877 skb_trim(skb, pkt_len);
878 } 876 }
879 877
880 if (needlock) 878 if (needlock)
@@ -1271,11 +1269,22 @@ sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb)
1271 * This routine must be called with interrupts disabled or with the socket 1269 * This routine must be called with interrupts disabled or with the socket
1272 * locked so that the sk_buff queue operation is ok. 1270 * locked so that the sk_buff queue operation is ok.
1273*/ 1271*/
1274static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb) 1272#ifdef CONFIG_NET_DMA
1273static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_early)
1274{
1275 __skb_unlink(skb, &sk->sk_receive_queue);
1276 if (!copied_early)
1277 __kfree_skb(skb);
1278 else
1279 __skb_queue_tail(&sk->sk_async_wait_queue, skb);
1280}
1281#else
1282static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_early)
1275{ 1283{
1276 __skb_unlink(skb, &sk->sk_receive_queue); 1284 __skb_unlink(skb, &sk->sk_receive_queue);
1277 __kfree_skb(skb); 1285 __kfree_skb(skb);
1278} 1286}
1287#endif
1279 1288
1280extern void sock_enable_timestamp(struct sock *sk); 1289extern void sock_enable_timestamp(struct sock *sk);
1281extern int sock_get_timestamp(struct sock *, struct timeval __user *); 1290extern int sock_get_timestamp(struct sock *, struct timeval __user *);
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 3c989db8a7aa..5f4eb5c79689 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -21,13 +21,13 @@
21#define TCP_DEBUG 1 21#define TCP_DEBUG 1
22#define FASTRETRANS_DEBUG 1 22#define FASTRETRANS_DEBUG 1
23 23
24#include <linux/config.h>
25#include <linux/list.h> 24#include <linux/list.h>
26#include <linux/tcp.h> 25#include <linux/tcp.h>
27#include <linux/slab.h> 26#include <linux/slab.h>
28#include <linux/cache.h> 27#include <linux/cache.h>
29#include <linux/percpu.h> 28#include <linux/percpu.h>
30#include <linux/skbuff.h> 29#include <linux/skbuff.h>
30#include <linux/dmaengine.h>
31 31
32#include <net/inet_connection_sock.h> 32#include <net/inet_connection_sock.h>
33#include <net/inet_timewait_sock.h> 33#include <net/inet_timewait_sock.h>
@@ -218,6 +218,7 @@ extern int sysctl_tcp_adv_win_scale;
218extern int sysctl_tcp_tw_reuse; 218extern int sysctl_tcp_tw_reuse;
219extern int sysctl_tcp_frto; 219extern int sysctl_tcp_frto;
220extern int sysctl_tcp_low_latency; 220extern int sysctl_tcp_low_latency;
221extern int sysctl_tcp_dma_copybreak;
221extern int sysctl_tcp_nometrics_save; 222extern int sysctl_tcp_nometrics_save;
222extern int sysctl_tcp_moderate_rcvbuf; 223extern int sysctl_tcp_moderate_rcvbuf;
223extern int sysctl_tcp_tso_win_divisor; 224extern int sysctl_tcp_tso_win_divisor;
@@ -225,6 +226,7 @@ extern int sysctl_tcp_abc;
225extern int sysctl_tcp_mtu_probing; 226extern int sysctl_tcp_mtu_probing;
226extern int sysctl_tcp_base_mss; 227extern int sysctl_tcp_base_mss;
227extern int sysctl_tcp_workaround_signed_windows; 228extern int sysctl_tcp_workaround_signed_windows;
229extern int sysctl_tcp_slow_start_after_idle;
228 230
229extern atomic_t tcp_memory_allocated; 231extern atomic_t tcp_memory_allocated;
230extern atomic_t tcp_sockets_allocated; 232extern atomic_t tcp_sockets_allocated;
@@ -293,6 +295,8 @@ extern int tcp_rcv_established(struct sock *sk,
293 295
294extern void tcp_rcv_space_adjust(struct sock *sk); 296extern void tcp_rcv_space_adjust(struct sock *sk);
295 297
298extern void tcp_cleanup_rbuf(struct sock *sk, int copied);
299
296extern int tcp_twsk_unique(struct sock *sk, 300extern int tcp_twsk_unique(struct sock *sk,
297 struct sock *sktw, void *twp); 301 struct sock *sktw, void *twp);
298 302
@@ -628,7 +632,7 @@ struct tcp_congestion_ops {
628 /* return slow start threshold (required) */ 632 /* return slow start threshold (required) */
629 u32 (*ssthresh)(struct sock *sk); 633 u32 (*ssthresh)(struct sock *sk);
630 /* lower bound for congestion window (optional) */ 634 /* lower bound for congestion window (optional) */
631 u32 (*min_cwnd)(struct sock *sk); 635 u32 (*min_cwnd)(const struct sock *sk);
632 /* do new cwnd calculation (required) */ 636 /* do new cwnd calculation (required) */
633 void (*cong_avoid)(struct sock *sk, u32 ack, 637 void (*cong_avoid)(struct sock *sk, u32 ack,
634 u32 rtt, u32 in_flight, int good_ack); 638 u32 rtt, u32 in_flight, int good_ack);
@@ -663,7 +667,7 @@ extern struct tcp_congestion_ops tcp_init_congestion_ops;
663extern u32 tcp_reno_ssthresh(struct sock *sk); 667extern u32 tcp_reno_ssthresh(struct sock *sk);
664extern void tcp_reno_cong_avoid(struct sock *sk, u32 ack, 668extern void tcp_reno_cong_avoid(struct sock *sk, u32 ack,
665 u32 rtt, u32 in_flight, int flag); 669 u32 rtt, u32 in_flight, int flag);
666extern u32 tcp_reno_min_cwnd(struct sock *sk); 670extern u32 tcp_reno_min_cwnd(const struct sock *sk);
667extern struct tcp_congestion_ops tcp_reno; 671extern struct tcp_congestion_ops tcp_reno;
668 672
669static inline void tcp_set_ca_state(struct sock *sk, const u8 ca_state) 673static inline void tcp_set_ca_state(struct sock *sk, const u8 ca_state)
@@ -817,6 +821,12 @@ static inline void tcp_prequeue_init(struct tcp_sock *tp)
817 tp->ucopy.len = 0; 821 tp->ucopy.len = 0;
818 tp->ucopy.memory = 0; 822 tp->ucopy.memory = 0;
819 skb_queue_head_init(&tp->ucopy.prequeue); 823 skb_queue_head_init(&tp->ucopy.prequeue);
824#ifdef CONFIG_NET_DMA
825 tp->ucopy.dma_chan = NULL;
826 tp->ucopy.wakeup = 0;
827 tp->ucopy.pinned_list = NULL;
828 tp->ucopy.dma_cookie = 0;
829#endif
820} 830}
821 831
822/* Packet is added to VJ-style prequeue for processing in process 832/* Packet is added to VJ-style prequeue for processing in process
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index afa508d92c93..9c5ee9f20b65 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -20,6 +20,8 @@
20#include <net/ip6_fib.h> 20#include <net/ip6_fib.h>
21 21
22#define XFRM_ALIGN8(len) (((len) + 7) & ~7) 22#define XFRM_ALIGN8(len) (((len) + 7) & ~7)
23#define MODULE_ALIAS_XFRM_MODE(family, encap) \
24 MODULE_ALIAS("xfrm-mode-" __stringify(family) "-" __stringify(encap))
23 25
24extern struct sock *xfrm_nl; 26extern struct sock *xfrm_nl;
25extern u32 sysctl_xfrm_aevent_etime; 27extern u32 sysctl_xfrm_aevent_etime;
@@ -164,6 +166,7 @@ struct xfrm_state
164 /* Reference to data common to all the instances of this 166 /* Reference to data common to all the instances of this
165 * transformer. */ 167 * transformer. */
166 struct xfrm_type *type; 168 struct xfrm_type *type;
169 struct xfrm_mode *mode;
167 170
168 /* Security context */ 171 /* Security context */
169 struct xfrm_sec_ctx *security; 172 struct xfrm_sec_ctx *security;
@@ -204,8 +207,8 @@ struct xfrm_type;
204struct xfrm_dst; 207struct xfrm_dst;
205struct xfrm_policy_afinfo { 208struct xfrm_policy_afinfo {
206 unsigned short family; 209 unsigned short family;
207 rwlock_t lock; 210 struct xfrm_type *type_map[IPPROTO_MAX];
208 struct xfrm_type_map *type_map; 211 struct xfrm_mode *mode_map[XFRM_MODE_MAX];
209 struct dst_ops *dst_ops; 212 struct dst_ops *dst_ops;
210 void (*garbage_collect)(void); 213 void (*garbage_collect)(void);
211 int (*dst_lookup)(struct xfrm_dst **dst, struct flowi *fl); 214 int (*dst_lookup)(struct xfrm_dst **dst, struct flowi *fl);
@@ -232,7 +235,6 @@ extern int __xfrm_state_delete(struct xfrm_state *x);
232 235
233struct xfrm_state_afinfo { 236struct xfrm_state_afinfo {
234 unsigned short family; 237 unsigned short family;
235 rwlock_t lock;
236 struct list_head *state_bydst; 238 struct list_head *state_bydst;
237 struct list_head *state_byspi; 239 struct list_head *state_byspi;
238 int (*init_flags)(struct xfrm_state *x); 240 int (*init_flags)(struct xfrm_state *x);
@@ -264,16 +266,24 @@ struct xfrm_type
264 u32 (*get_max_size)(struct xfrm_state *, int size); 266 u32 (*get_max_size)(struct xfrm_state *, int size);
265}; 267};
266 268
267struct xfrm_type_map {
268 rwlock_t lock;
269 struct xfrm_type *map[256];
270};
271
272extern int xfrm_register_type(struct xfrm_type *type, unsigned short family); 269extern int xfrm_register_type(struct xfrm_type *type, unsigned short family);
273extern int xfrm_unregister_type(struct xfrm_type *type, unsigned short family); 270extern int xfrm_unregister_type(struct xfrm_type *type, unsigned short family);
274extern struct xfrm_type *xfrm_get_type(u8 proto, unsigned short family); 271extern struct xfrm_type *xfrm_get_type(u8 proto, unsigned short family);
275extern void xfrm_put_type(struct xfrm_type *type); 272extern void xfrm_put_type(struct xfrm_type *type);
276 273
274struct xfrm_mode {
275 int (*input)(struct xfrm_state *x, struct sk_buff *skb);
276 int (*output)(struct sk_buff *skb);
277
278 struct module *owner;
279 unsigned int encap;
280};
281
282extern int xfrm_register_mode(struct xfrm_mode *mode, int family);
283extern int xfrm_unregister_mode(struct xfrm_mode *mode, int family);
284extern struct xfrm_mode *xfrm_get_mode(unsigned int encap, int family);
285extern void xfrm_put_mode(struct xfrm_mode *mode);
286
277struct xfrm_tmpl 287struct xfrm_tmpl
278{ 288{
279/* id in template is interpreted as: 289/* id in template is interpreted as: