aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/9p/9p.h1
-rw-r--r--include/net/9p/transport.h9
-rw-r--r--include/net/addrconf.h3
-rw-r--r--include/net/bluetooth/hci_core.h3
-rw-r--r--include/net/dst.h12
-rw-r--r--include/net/flow.h1
-rw-r--r--include/net/inet_timewait_sock.h3
-rw-r--r--include/net/ip6_route.h7
-rw-r--r--include/net/ip_vs.h285
-rw-r--r--include/net/mac80211.h31
-rw-r--r--include/net/netlink.h2
-rw-r--r--include/net/pkt_sched.h6
-rw-r--r--include/net/request_sock.h2
-rw-r--r--include/net/sch_generic.h45
-rw-r--r--include/net/sctp/sm.h3
-rw-r--r--include/net/sctp/structs.h3
-rw-r--r--include/net/syncppp.h2
17 files changed, 119 insertions, 299 deletions
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h
index b3d3e27c6299..c3626c0ba9d3 100644
--- a/include/net/9p/9p.h
+++ b/include/net/9p/9p.h
@@ -596,4 +596,5 @@ int p9_idpool_check(int id, struct p9_idpool *p);
596int p9_error_init(void); 596int p9_error_init(void);
597int p9_errstr2errno(char *, int); 597int p9_errstr2errno(char *, int);
598int p9_trans_fd_init(void); 598int p9_trans_fd_init(void);
599void p9_trans_fd_exit(void);
599#endif /* NET_9P_H */ 600#endif /* NET_9P_H */
diff --git a/include/net/9p/transport.h b/include/net/9p/transport.h
index 0db3a4038dc0..3ca737120a90 100644
--- a/include/net/9p/transport.h
+++ b/include/net/9p/transport.h
@@ -26,6 +26,8 @@
26#ifndef NET_9P_TRANSPORT_H 26#ifndef NET_9P_TRANSPORT_H
27#define NET_9P_TRANSPORT_H 27#define NET_9P_TRANSPORT_H
28 28
29#include <linux/module.h>
30
29/** 31/**
30 * enum p9_trans_status - different states of underlying transports 32 * enum p9_trans_status - different states of underlying transports
31 * @Connected: transport is connected and healthy 33 * @Connected: transport is connected and healthy
@@ -91,9 +93,12 @@ struct p9_trans_module {
91 int maxsize; /* max message size of transport */ 93 int maxsize; /* max message size of transport */
92 int def; /* this transport should be default */ 94 int def; /* this transport should be default */
93 struct p9_trans * (*create)(const char *, char *, int, unsigned char); 95 struct p9_trans * (*create)(const char *, char *, int, unsigned char);
96 struct module *owner;
94}; 97};
95 98
96void v9fs_register_trans(struct p9_trans_module *m); 99void v9fs_register_trans(struct p9_trans_module *m);
97struct p9_trans_module *v9fs_match_trans(const substring_t *name); 100void v9fs_unregister_trans(struct p9_trans_module *m);
98struct p9_trans_module *v9fs_default_trans(void); 101struct p9_trans_module *v9fs_get_trans_by_name(const substring_t *name);
102struct p9_trans_module *v9fs_get_default_trans(void);
103void v9fs_put_trans(struct p9_trans_module *m);
99#endif /* NET_9P_TRANSPORT_H */ 104#endif /* NET_9P_TRANSPORT_H */
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index 06b28142b3ab..c216de528b08 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -80,7 +80,8 @@ extern struct inet6_ifaddr *ipv6_get_ifaddr(struct net *net,
80 struct net_device *dev, 80 struct net_device *dev,
81 int strict); 81 int strict);
82 82
83extern int ipv6_dev_get_saddr(struct net_device *dev, 83extern int ipv6_dev_get_saddr(struct net *net,
84 struct net_device *dev,
84 const struct in6_addr *daddr, 85 const struct in6_addr *daddr,
85 unsigned int srcprefs, 86 unsigned int srcprefs,
86 struct in6_addr *saddr); 87 struct in6_addr *saddr);
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index cbf751094688..46a43b721dd6 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -325,7 +325,8 @@ int hci_conn_del(struct hci_conn *conn);
325void hci_conn_hash_flush(struct hci_dev *hdev); 325void hci_conn_hash_flush(struct hci_dev *hdev);
326void hci_conn_check_pending(struct hci_dev *hdev); 326void hci_conn_check_pending(struct hci_dev *hdev);
327 327
328struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *src); 328struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8 auth_type);
329int hci_conn_check_link_mode(struct hci_conn *conn);
329int hci_conn_auth(struct hci_conn *conn); 330int hci_conn_auth(struct hci_conn *conn);
330int hci_conn_encrypt(struct hci_conn *conn); 331int hci_conn_encrypt(struct hci_conn *conn);
331int hci_conn_change_link_key(struct hci_conn *conn); 332int hci_conn_change_link_key(struct hci_conn *conn);
diff --git a/include/net/dst.h b/include/net/dst.h
index c5c318a628f8..8a8b71e5f3f1 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -252,17 +252,7 @@ static inline int dst_output(struct sk_buff *skb)
252/* Input packet from network to transport. */ 252/* Input packet from network to transport. */
253static inline int dst_input(struct sk_buff *skb) 253static inline int dst_input(struct sk_buff *skb)
254{ 254{
255 int err; 255 return skb->dst->input(skb);
256
257 for (;;) {
258 err = skb->dst->input(skb);
259
260 if (likely(err == 0))
261 return err;
262 /* Oh, Jamal... Seems, I will not forgive you this mess. :-) */
263 if (unlikely(err != NET_XMIT_BYPASS))
264 return err;
265 }
266} 256}
267 257
268static inline struct dst_entry *dst_check(struct dst_entry *dst, u32 cookie) 258static inline struct dst_entry *dst_check(struct dst_entry *dst, u32 cookie)
diff --git a/include/net/flow.h b/include/net/flow.h
index ad16e0076c89..228b2477ceec 100644
--- a/include/net/flow.h
+++ b/include/net/flow.h
@@ -47,7 +47,6 @@ struct flowi {
47#define fl4_scope nl_u.ip4_u.scope 47#define fl4_scope nl_u.ip4_u.scope
48 48
49 __u8 proto; 49 __u8 proto;
50 __u8 flags;
51 union { 50 union {
52 struct { 51 struct {
53 __be16 sport; 52 __be16 sport;
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
index 95c660c9719b..91324908fccd 100644
--- a/include/net/inet_timewait_sock.h
+++ b/include/net/inet_timewait_sock.h
@@ -208,6 +208,9 @@ extern void inet_twsk_schedule(struct inet_timewait_sock *tw,
208extern void inet_twsk_deschedule(struct inet_timewait_sock *tw, 208extern void inet_twsk_deschedule(struct inet_timewait_sock *tw,
209 struct inet_timewait_death_row *twdr); 209 struct inet_timewait_death_row *twdr);
210 210
211extern void inet_twsk_purge(struct net *net, struct inet_hashinfo *hashinfo,
212 struct inet_timewait_death_row *twdr, int family);
213
211static inline 214static inline
212struct net *twsk_net(const struct inet_timewait_sock *twsk) 215struct net *twsk_net(const struct inet_timewait_sock *twsk)
213{ 216{
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 2f8b3c06a101..5f53db7e4e57 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -38,11 +38,6 @@ struct route_info {
38#define RT6_LOOKUP_F_SRCPREF_COA 0x00000020 38#define RT6_LOOKUP_F_SRCPREF_COA 0x00000020
39 39
40 40
41#ifdef CONFIG_IPV6_MULTIPLE_TABLES
42extern struct rt6_info *ip6_prohibit_entry;
43extern struct rt6_info *ip6_blk_hole_entry;
44#endif
45
46extern void ip6_route_input(struct sk_buff *skb); 41extern void ip6_route_input(struct sk_buff *skb);
47 42
48extern struct dst_entry * ip6_route_output(struct net *net, 43extern struct dst_entry * ip6_route_output(struct net *net,
@@ -112,13 +107,13 @@ struct rt6_rtnl_dump_arg
112{ 107{
113 struct sk_buff *skb; 108 struct sk_buff *skb;
114 struct netlink_callback *cb; 109 struct netlink_callback *cb;
110 struct net *net;
115}; 111};
116 112
117extern int rt6_dump_route(struct rt6_info *rt, void *p_arg); 113extern int rt6_dump_route(struct rt6_info *rt, void *p_arg);
118extern void rt6_ifdown(struct net *net, struct net_device *dev); 114extern void rt6_ifdown(struct net *net, struct net_device *dev);
119extern void rt6_mtu_change(struct net_device *dev, unsigned mtu); 115extern void rt6_mtu_change(struct net_device *dev, unsigned mtu);
120 116
121extern rwlock_t rt6_lock;
122 117
123/* 118/*
124 * Store a destination cache entry in a socket 119 * Store a destination cache entry in a socket
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 9a51ebad3f1f..7312c3dd309f 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -3,254 +3,17 @@
3 * data structure and functionality definitions 3 * data structure and functionality definitions
4 */ 4 */
5 5
6#ifndef _IP_VS_H 6#ifndef _NET_IP_VS_H
7#define _IP_VS_H 7#define _NET_IP_VS_H
8
9#include <asm/types.h> /* For __uXX types */
10#include <linux/types.h> /* For __beXX types in userland */
11
12#include <linux/sysctl.h> /* For ctl_path */
13
14#define IP_VS_VERSION_CODE 0x010201
15#define NVERSION(version) \
16 (version >> 16) & 0xFF, \
17 (version >> 8) & 0xFF, \
18 version & 0xFF
19
20/*
21 * Virtual Service Flags
22 */
23#define IP_VS_SVC_F_PERSISTENT 0x0001 /* persistent port */
24#define IP_VS_SVC_F_HASHED 0x0002 /* hashed entry */
25
26/*
27 * Destination Server Flags
28 */
29#define IP_VS_DEST_F_AVAILABLE 0x0001 /* server is available */
30#define IP_VS_DEST_F_OVERLOAD 0x0002 /* server is overloaded */
31
32/*
33 * IPVS sync daemon states
34 */
35#define IP_VS_STATE_NONE 0x0000 /* daemon is stopped */
36#define IP_VS_STATE_MASTER 0x0001 /* started as master */
37#define IP_VS_STATE_BACKUP 0x0002 /* started as backup */
38
39/*
40 * IPVS socket options
41 */
42#define IP_VS_BASE_CTL (64+1024+64) /* base */
43
44#define IP_VS_SO_SET_NONE IP_VS_BASE_CTL /* just peek */
45#define IP_VS_SO_SET_INSERT (IP_VS_BASE_CTL+1)
46#define IP_VS_SO_SET_ADD (IP_VS_BASE_CTL+2)
47#define IP_VS_SO_SET_EDIT (IP_VS_BASE_CTL+3)
48#define IP_VS_SO_SET_DEL (IP_VS_BASE_CTL+4)
49#define IP_VS_SO_SET_FLUSH (IP_VS_BASE_CTL+5)
50#define IP_VS_SO_SET_LIST (IP_VS_BASE_CTL+6)
51#define IP_VS_SO_SET_ADDDEST (IP_VS_BASE_CTL+7)
52#define IP_VS_SO_SET_DELDEST (IP_VS_BASE_CTL+8)
53#define IP_VS_SO_SET_EDITDEST (IP_VS_BASE_CTL+9)
54#define IP_VS_SO_SET_TIMEOUT (IP_VS_BASE_CTL+10)
55#define IP_VS_SO_SET_STARTDAEMON (IP_VS_BASE_CTL+11)
56#define IP_VS_SO_SET_STOPDAEMON (IP_VS_BASE_CTL+12)
57#define IP_VS_SO_SET_RESTORE (IP_VS_BASE_CTL+13)
58#define IP_VS_SO_SET_SAVE (IP_VS_BASE_CTL+14)
59#define IP_VS_SO_SET_ZERO (IP_VS_BASE_CTL+15)
60#define IP_VS_SO_SET_MAX IP_VS_SO_SET_ZERO
61
62#define IP_VS_SO_GET_VERSION IP_VS_BASE_CTL
63#define IP_VS_SO_GET_INFO (IP_VS_BASE_CTL+1)
64#define IP_VS_SO_GET_SERVICES (IP_VS_BASE_CTL+2)
65#define IP_VS_SO_GET_SERVICE (IP_VS_BASE_CTL+3)
66#define IP_VS_SO_GET_DESTS (IP_VS_BASE_CTL+4)
67#define IP_VS_SO_GET_DEST (IP_VS_BASE_CTL+5) /* not used now */
68#define IP_VS_SO_GET_TIMEOUT (IP_VS_BASE_CTL+6)
69#define IP_VS_SO_GET_DAEMON (IP_VS_BASE_CTL+7)
70#define IP_VS_SO_GET_MAX IP_VS_SO_GET_DAEMON
71
72
73/*
74 * IPVS Connection Flags
75 */
76#define IP_VS_CONN_F_FWD_MASK 0x0007 /* mask for the fwd methods */
77#define IP_VS_CONN_F_MASQ 0x0000 /* masquerading/NAT */
78#define IP_VS_CONN_F_LOCALNODE 0x0001 /* local node */
79#define IP_VS_CONN_F_TUNNEL 0x0002 /* tunneling */
80#define IP_VS_CONN_F_DROUTE 0x0003 /* direct routing */
81#define IP_VS_CONN_F_BYPASS 0x0004 /* cache bypass */
82#define IP_VS_CONN_F_SYNC 0x0020 /* entry created by sync */
83#define IP_VS_CONN_F_HASHED 0x0040 /* hashed entry */
84#define IP_VS_CONN_F_NOOUTPUT 0x0080 /* no output packets */
85#define IP_VS_CONN_F_INACTIVE 0x0100 /* not established */
86#define IP_VS_CONN_F_OUT_SEQ 0x0200 /* must do output seq adjust */
87#define IP_VS_CONN_F_IN_SEQ 0x0400 /* must do input seq adjust */
88#define IP_VS_CONN_F_SEQ_MASK 0x0600 /* in/out sequence mask */
89#define IP_VS_CONN_F_NO_CPORT 0x0800 /* no client port set yet */
90#define IP_VS_CONN_F_TEMPLATE 0x1000 /* template, not connection */
91
92/* Move it to better place one day, for now keep it unique */
93#define NFC_IPVS_PROPERTY 0x10000
94
95#define IP_VS_SCHEDNAME_MAXLEN 16
96#define IP_VS_IFNAME_MAXLEN 16
97
98
99/*
100 * The struct ip_vs_service_user and struct ip_vs_dest_user are
101 * used to set IPVS rules through setsockopt.
102 */
103struct ip_vs_service_user {
104 /* virtual service addresses */
105 u_int16_t protocol;
106 __be32 addr; /* virtual ip address */
107 __be16 port;
108 u_int32_t fwmark; /* firwall mark of service */
109
110 /* virtual service options */
111 char sched_name[IP_VS_SCHEDNAME_MAXLEN];
112 unsigned flags; /* virtual service flags */
113 unsigned timeout; /* persistent timeout in sec */
114 __be32 netmask; /* persistent netmask */
115};
116
117
118struct ip_vs_dest_user {
119 /* destination server address */
120 __be32 addr;
121 __be16 port;
122
123 /* real server options */
124 unsigned conn_flags; /* connection flags */
125 int weight; /* destination weight */
126
127 /* thresholds for active connections */
128 u_int32_t u_threshold; /* upper threshold */
129 u_int32_t l_threshold; /* lower threshold */
130};
131
132
133/*
134 * IPVS statistics object (for user space)
135 */
136struct ip_vs_stats_user
137{
138 __u32 conns; /* connections scheduled */
139 __u32 inpkts; /* incoming packets */
140 __u32 outpkts; /* outgoing packets */
141 __u64 inbytes; /* incoming bytes */
142 __u64 outbytes; /* outgoing bytes */
143
144 __u32 cps; /* current connection rate */
145 __u32 inpps; /* current in packet rate */
146 __u32 outpps; /* current out packet rate */
147 __u32 inbps; /* current in byte rate */
148 __u32 outbps; /* current out byte rate */
149};
150
151
152/* The argument to IP_VS_SO_GET_INFO */
153struct ip_vs_getinfo {
154 /* version number */
155 unsigned int version;
156
157 /* size of connection hash table */
158 unsigned int size;
159
160 /* number of virtual services */
161 unsigned int num_services;
162};
163
164
165/* The argument to IP_VS_SO_GET_SERVICE */
166struct ip_vs_service_entry {
167 /* which service: user fills in these */
168 u_int16_t protocol;
169 __be32 addr; /* virtual address */
170 __be16 port;
171 u_int32_t fwmark; /* firwall mark of service */
172
173 /* service options */
174 char sched_name[IP_VS_SCHEDNAME_MAXLEN];
175 unsigned flags; /* virtual service flags */
176 unsigned timeout; /* persistent timeout */
177 __be32 netmask; /* persistent netmask */
178
179 /* number of real servers */
180 unsigned int num_dests;
181
182 /* statistics */
183 struct ip_vs_stats_user stats;
184};
185
186
187struct ip_vs_dest_entry {
188 __be32 addr; /* destination address */
189 __be16 port;
190 unsigned conn_flags; /* connection flags */
191 int weight; /* destination weight */
192
193 u_int32_t u_threshold; /* upper threshold */
194 u_int32_t l_threshold; /* lower threshold */
195
196 u_int32_t activeconns; /* active connections */
197 u_int32_t inactconns; /* inactive connections */
198 u_int32_t persistconns; /* persistent connections */
199
200 /* statistics */
201 struct ip_vs_stats_user stats;
202};
203
204
205/* The argument to IP_VS_SO_GET_DESTS */
206struct ip_vs_get_dests {
207 /* which service: user fills in these */
208 u_int16_t protocol;
209 __be32 addr; /* virtual address */
210 __be16 port;
211 u_int32_t fwmark; /* firwall mark of service */
212
213 /* number of real servers */
214 unsigned int num_dests;
215
216 /* the real servers */
217 struct ip_vs_dest_entry entrytable[0];
218};
219
220
221/* The argument to IP_VS_SO_GET_SERVICES */
222struct ip_vs_get_services {
223 /* number of virtual services */
224 unsigned int num_services;
225
226 /* service table */
227 struct ip_vs_service_entry entrytable[0];
228};
229
230
231/* The argument to IP_VS_SO_GET_TIMEOUT */
232struct ip_vs_timeout_user {
233 int tcp_timeout;
234 int tcp_fin_timeout;
235 int udp_timeout;
236};
237
238
239/* The argument to IP_VS_SO_GET_DAEMON */
240struct ip_vs_daemon_user {
241 /* sync daemon state (master/backup) */
242 int state;
243
244 /* multicast interface name */
245 char mcast_ifn[IP_VS_IFNAME_MAXLEN];
246
247 /* SyncID we belong to */
248 int syncid;
249};
250 8
9#include <linux/ip_vs.h> /* definitions shared with userland */
251 10
11/* old ipvsadm versions still include this file directly */
252#ifdef __KERNEL__ 12#ifdef __KERNEL__
253 13
14#include <asm/types.h> /* for __uXX types */
15
16#include <linux/sysctl.h> /* for ctl_path */
254#include <linux/list.h> /* for struct list_head */ 17#include <linux/list.h> /* for struct list_head */
255#include <linux/spinlock.h> /* for struct rwlock_t */ 18#include <linux/spinlock.h> /* for struct rwlock_t */
256#include <asm/atomic.h> /* for struct atomic_t */ 19#include <asm/atomic.h> /* for struct atomic_t */
@@ -377,8 +140,24 @@ struct ip_vs_seq {
377 140
378 141
379/* 142/*
380 * IPVS statistics object 143 * IPVS statistics objects
381 */ 144 */
145struct ip_vs_estimator {
146 struct list_head list;
147
148 u64 last_inbytes;
149 u64 last_outbytes;
150 u32 last_conns;
151 u32 last_inpkts;
152 u32 last_outpkts;
153
154 u32 cps;
155 u32 inpps;
156 u32 outpps;
157 u32 inbps;
158 u32 outbps;
159};
160
382struct ip_vs_stats 161struct ip_vs_stats
383{ 162{
384 __u32 conns; /* connections scheduled */ 163 __u32 conns; /* connections scheduled */
@@ -393,7 +172,15 @@ struct ip_vs_stats
393 __u32 inbps; /* current in byte rate */ 172 __u32 inbps; /* current in byte rate */
394 __u32 outbps; /* current out byte rate */ 173 __u32 outbps; /* current out byte rate */
395 174
175 /*
176 * Don't add anything before the lock, because we use memcpy() to copy
177 * the members before the lock to struct ip_vs_stats_user in
178 * ip_vs_ctl.c.
179 */
180
396 spinlock_t lock; /* spin lock */ 181 spinlock_t lock; /* spin lock */
182
183 struct ip_vs_estimator est; /* estimator */
397}; 184};
398 185
399struct dst_entry; 186struct dst_entry;
@@ -677,7 +464,7 @@ struct ip_vs_app
677 */ 464 */
678extern const char *ip_vs_proto_name(unsigned proto); 465extern const char *ip_vs_proto_name(unsigned proto);
679extern void ip_vs_init_hash_table(struct list_head *table, int rows); 466extern void ip_vs_init_hash_table(struct list_head *table, int rows);
680#define IP_VS_INIT_HASH_TABLE(t) ip_vs_init_hash_table(t, sizeof(t)/sizeof(t[0])) 467#define IP_VS_INIT_HASH_TABLE(t) ip_vs_init_hash_table((t), ARRAY_SIZE((t)))
681 468
682#define IP_VS_APP_TYPE_FTP 1 469#define IP_VS_APP_TYPE_FTP 1
683 470
@@ -857,7 +644,7 @@ extern int sysctl_ip_vs_expire_quiescent_template;
857extern int sysctl_ip_vs_sync_threshold[2]; 644extern int sysctl_ip_vs_sync_threshold[2];
858extern int sysctl_ip_vs_nat_icmp_send; 645extern int sysctl_ip_vs_nat_icmp_send;
859extern struct ip_vs_stats ip_vs_stats; 646extern struct ip_vs_stats ip_vs_stats;
860extern struct ctl_path net_vs_ctl_path[]; 647extern const struct ctl_path net_vs_ctl_path[];
861 648
862extern struct ip_vs_service * 649extern struct ip_vs_service *
863ip_vs_service_get(__u32 fwmark, __u16 protocol, __be32 vaddr, __be16 vport); 650ip_vs_service_get(__u32 fwmark, __u16 protocol, __be32 vaddr, __be16 vport);
@@ -896,7 +683,7 @@ extern void ip_vs_sync_conn(struct ip_vs_conn *cp);
896/* 683/*
897 * IPVS rate estimator prototypes (from ip_vs_est.c) 684 * IPVS rate estimator prototypes (from ip_vs_est.c)
898 */ 685 */
899extern int ip_vs_new_estimator(struct ip_vs_stats *stats); 686extern void ip_vs_new_estimator(struct ip_vs_stats *stats);
900extern void ip_vs_kill_estimator(struct ip_vs_stats *stats); 687extern void ip_vs_kill_estimator(struct ip_vs_stats *stats);
901extern void ip_vs_zero_estimator(struct ip_vs_stats *stats); 688extern void ip_vs_zero_estimator(struct ip_vs_stats *stats);
902 689
@@ -981,4 +768,4 @@ static inline __wsum ip_vs_check_diff2(__be16 old, __be16 new, __wsum oldsum)
981 768
982#endif /* __KERNEL__ */ 769#endif /* __KERNEL__ */
983 770
984#endif /* _IP_VS_H */ 771#endif /* _NET_IP_VS_H */
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 4dd3d93e1960..ff137fd7714f 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -177,9 +177,10 @@ enum ieee80211_bss_change {
177 * @aid: association ID number, valid only when @assoc is true 177 * @aid: association ID number, valid only when @assoc is true
178 * @use_cts_prot: use CTS protection 178 * @use_cts_prot: use CTS protection
179 * @use_short_preamble: use 802.11b short preamble 179 * @use_short_preamble: use 802.11b short preamble
180 * @dtim_period: num of beacons before the next DTIM, for PSM
180 * @timestamp: beacon timestamp 181 * @timestamp: beacon timestamp
181 * @beacon_int: beacon interval 182 * @beacon_int: beacon interval
182 * @assoc_capability: capabbilities taken from assoc resp 183 * @assoc_capability: capabilities taken from assoc resp
183 * @assoc_ht: association in HT mode 184 * @assoc_ht: association in HT mode
184 * @ht_conf: ht capabilities 185 * @ht_conf: ht capabilities
185 * @ht_bss_conf: ht extended capabilities 186 * @ht_bss_conf: ht extended capabilities
@@ -191,6 +192,7 @@ struct ieee80211_bss_conf {
191 /* erp related data */ 192 /* erp related data */
192 bool use_cts_prot; 193 bool use_cts_prot;
193 bool use_short_preamble; 194 bool use_short_preamble;
195 u8 dtim_period;
194 u16 beacon_int; 196 u16 beacon_int;
195 u16 assoc_capability; 197 u16 assoc_capability;
196 u64 timestamp; 198 u64 timestamp;
@@ -206,8 +208,6 @@ struct ieee80211_bss_conf {
206 * These flags are used with the @flags member of &ieee80211_tx_info. 208 * These flags are used with the @flags member of &ieee80211_tx_info.
207 * 209 *
208 * @IEEE80211_TX_CTL_REQ_TX_STATUS: request TX status callback for this frame. 210 * @IEEE80211_TX_CTL_REQ_TX_STATUS: request TX status callback for this frame.
209 * @IEEE80211_TX_CTL_DO_NOT_ENCRYPT: send this frame without encryption;
210 * e.g., for EAPOL frame
211 * @IEEE80211_TX_CTL_USE_RTS_CTS: use RTS-CTS before sending frame 211 * @IEEE80211_TX_CTL_USE_RTS_CTS: use RTS-CTS before sending frame
212 * @IEEE80211_TX_CTL_USE_CTS_PROTECT: use CTS protection for the frame (e.g., 212 * @IEEE80211_TX_CTL_USE_CTS_PROTECT: use CTS protection for the frame (e.g.,
213 * for combined 802.11g / 802.11b networks) 213 * for combined 802.11g / 802.11b networks)
@@ -220,7 +220,6 @@ struct ieee80211_bss_conf {
220 * @IEEE80211_TX_CTL_SHORT_PREAMBLE: TBD 220 * @IEEE80211_TX_CTL_SHORT_PREAMBLE: TBD
221 * @IEEE80211_TX_CTL_LONG_RETRY_LIMIT: this frame should be send using the 221 * @IEEE80211_TX_CTL_LONG_RETRY_LIMIT: this frame should be send using the
222 * through set_retry_limit configured long retry value 222 * through set_retry_limit configured long retry value
223 * @IEEE80211_TX_CTL_EAPOL_FRAME: internal to mac80211
224 * @IEEE80211_TX_CTL_SEND_AFTER_DTIM: send this frame after DTIM beacon 223 * @IEEE80211_TX_CTL_SEND_AFTER_DTIM: send this frame after DTIM beacon
225 * @IEEE80211_TX_CTL_AMPDU: this frame should be sent as part of an A-MPDU 224 * @IEEE80211_TX_CTL_AMPDU: this frame should be sent as part of an A-MPDU
226 * @IEEE80211_TX_CTL_OFDM_HT: this frame can be sent in HT OFDM rates. number 225 * @IEEE80211_TX_CTL_OFDM_HT: this frame can be sent in HT OFDM rates. number
@@ -253,7 +252,6 @@ struct ieee80211_bss_conf {
253 */ 252 */
254enum mac80211_tx_control_flags { 253enum mac80211_tx_control_flags {
255 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), 254 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0),
256 IEEE80211_TX_CTL_DO_NOT_ENCRYPT = BIT(1),
257 IEEE80211_TX_CTL_USE_RTS_CTS = BIT(2), 255 IEEE80211_TX_CTL_USE_RTS_CTS = BIT(2),
258 IEEE80211_TX_CTL_USE_CTS_PROTECT = BIT(3), 256 IEEE80211_TX_CTL_USE_CTS_PROTECT = BIT(3),
259 IEEE80211_TX_CTL_NO_ACK = BIT(4), 257 IEEE80211_TX_CTL_NO_ACK = BIT(4),
@@ -263,7 +261,6 @@ enum mac80211_tx_control_flags {
263 IEEE80211_TX_CTL_FIRST_FRAGMENT = BIT(8), 261 IEEE80211_TX_CTL_FIRST_FRAGMENT = BIT(8),
264 IEEE80211_TX_CTL_SHORT_PREAMBLE = BIT(9), 262 IEEE80211_TX_CTL_SHORT_PREAMBLE = BIT(9),
265 IEEE80211_TX_CTL_LONG_RETRY_LIMIT = BIT(10), 263 IEEE80211_TX_CTL_LONG_RETRY_LIMIT = BIT(10),
266 IEEE80211_TX_CTL_EAPOL_FRAME = BIT(11),
267 IEEE80211_TX_CTL_SEND_AFTER_DTIM = BIT(12), 264 IEEE80211_TX_CTL_SEND_AFTER_DTIM = BIT(12),
268 IEEE80211_TX_CTL_AMPDU = BIT(13), 265 IEEE80211_TX_CTL_AMPDU = BIT(13),
269 IEEE80211_TX_CTL_OFDM_HT = BIT(14), 266 IEEE80211_TX_CTL_OFDM_HT = BIT(14),
@@ -323,7 +320,6 @@ struct ieee80211_tx_info {
323 struct ieee80211_vif *vif; 320 struct ieee80211_vif *vif;
324 struct ieee80211_key_conf *hw_key; 321 struct ieee80211_key_conf *hw_key;
325 unsigned long jiffies; 322 unsigned long jiffies;
326 int ifindex;
327 u16 aid; 323 u16 aid;
328 s8 rts_cts_rate_idx, alt_retry_rate_idx; 324 s8 rts_cts_rate_idx, alt_retry_rate_idx;
329 u8 retry_limit; 325 u8 retry_limit;
@@ -436,6 +432,7 @@ enum ieee80211_conf_flags {
436 * @radio_enabled: when zero, driver is required to switch off the radio. 432 * @radio_enabled: when zero, driver is required to switch off the radio.
437 * TODO make a flag 433 * TODO make a flag
438 * @beacon_int: beacon interval (TODO make interface config) 434 * @beacon_int: beacon interval (TODO make interface config)
435 * @listen_interval: listen interval in units of beacon interval
439 * @flags: configuration flags defined above 436 * @flags: configuration flags defined above
440 * @power_level: requested transmit power (in dBm) 437 * @power_level: requested transmit power (in dBm)
441 * @max_antenna_gain: maximum antenna gain (in dBi) 438 * @max_antenna_gain: maximum antenna gain (in dBi)
@@ -450,6 +447,7 @@ struct ieee80211_conf {
450 int radio_enabled; 447 int radio_enabled;
451 448
452 int beacon_int; 449 int beacon_int;
450 u16 listen_interval;
453 u32 flags; 451 u32 flags;
454 int power_level; 452 int power_level;
455 int max_antenna_gain; 453 int max_antenna_gain;
@@ -710,10 +708,7 @@ enum ieee80211_tkip_key_type {
710 * rely on the host system for such buffering. This option is used 708 * rely on the host system for such buffering. This option is used
711 * to configure the IEEE 802.11 upper layer to buffer broadcast and 709 * to configure the IEEE 802.11 upper layer to buffer broadcast and
712 * multicast frames when there are power saving stations so that 710 * multicast frames when there are power saving stations so that
713 * the driver can fetch them with ieee80211_get_buffered_bc(). Note 711 * the driver can fetch them with ieee80211_get_buffered_bc().
714 * that not setting this flag works properly only when the
715 * %IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE is also not set because
716 * otherwise the stack will not know when the DTIM beacon was sent.
717 * 712 *
718 * @IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE: 713 * @IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE:
719 * Hardware is not capable of short slot operation on the 2.4 GHz band. 714 * Hardware is not capable of short slot operation on the 2.4 GHz band.
@@ -746,7 +741,6 @@ enum ieee80211_tkip_key_type {
746 * Measurement, Channel Switch, Quieting, TPC 741 * Measurement, Channel Switch, Quieting, TPC
747 */ 742 */
748enum ieee80211_hw_flags { 743enum ieee80211_hw_flags {
749 IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE = 1<<0,
750 IEEE80211_HW_RX_INCLUDES_FCS = 1<<1, 744 IEEE80211_HW_RX_INCLUDES_FCS = 1<<1,
751 IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING = 1<<2, 745 IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING = 1<<2,
752 IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE = 1<<3, 746 IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE = 1<<3,
@@ -792,6 +786,9 @@ enum ieee80211_hw_flags {
792 * @max_signal: Maximum value for signal (rssi) in RX information, used 786 * @max_signal: Maximum value for signal (rssi) in RX information, used
793 * only when @IEEE80211_HW_SIGNAL_UNSPEC or @IEEE80211_HW_SIGNAL_DB 787 * only when @IEEE80211_HW_SIGNAL_UNSPEC or @IEEE80211_HW_SIGNAL_DB
794 * 788 *
789 * @max_listen_interval: max listen interval in units of beacon interval
790 * that HW supports
791 *
795 * @queues: number of available hardware transmit queues for 792 * @queues: number of available hardware transmit queues for
796 * data packets. WMM/QoS requires at least four, these 793 * data packets. WMM/QoS requires at least four, these
797 * queues need to have configurable access parameters. 794 * queues need to have configurable access parameters.
@@ -819,7 +816,9 @@ struct ieee80211_hw {
819 unsigned int extra_tx_headroom; 816 unsigned int extra_tx_headroom;
820 int channel_change_time; 817 int channel_change_time;
821 int vif_data_size; 818 int vif_data_size;
822 u16 queues, ampdu_queues; 819 u16 queues;
820 u16 ampdu_queues;
821 u16 max_listen_interval;
823 s8 max_signal; 822 s8 max_signal;
824}; 823};
825 824
@@ -1097,10 +1096,8 @@ enum ieee80211_ampdu_mlme_action {
1097 * See the section "Frame filtering" for more information. 1096 * See the section "Frame filtering" for more information.
1098 * This callback must be implemented and atomic. 1097 * This callback must be implemented and atomic.
1099 * 1098 *
1100 * @set_tim: Set TIM bit. If the hardware/firmware takes care of beacon 1099 * @set_tim: Set TIM bit. mac80211 calls this function when a TIM bit
1101 * generation (that is, %IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE is set) 1100 * must be set or cleared for a given AID. Must be atomic.
1102 * mac80211 calls this function when a TIM bit must be set or cleared
1103 * for a given AID. Must be atomic.
1104 * 1101 *
1105 * @set_key: See the section "Hardware crypto acceleration" 1102 * @set_key: See the section "Hardware crypto acceleration"
1106 * This callback can sleep, and is only called between add_interface 1103 * This callback can sleep, and is only called between add_interface
diff --git a/include/net/netlink.h b/include/net/netlink.h
index 18024b8cecb8..208fe5a38546 100644
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -702,7 +702,7 @@ static inline int nla_len(const struct nlattr *nla)
702 */ 702 */
703static inline int nla_ok(const struct nlattr *nla, int remaining) 703static inline int nla_ok(const struct nlattr *nla, int remaining)
704{ 704{
705 return remaining >= sizeof(*nla) && 705 return remaining >= (int) sizeof(*nla) &&
706 nla->nla_len >= sizeof(*nla) && 706 nla->nla_len >= sizeof(*nla) &&
707 nla->nla_len <= remaining; 707 nla->nla_len <= remaining;
708} 708}
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index 6affcfaa123e..b786a5b09253 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -78,6 +78,7 @@ extern struct Qdisc *fifo_create_dflt(struct Qdisc *sch, struct Qdisc_ops *ops,
78 78
79extern int register_qdisc(struct Qdisc_ops *qops); 79extern int register_qdisc(struct Qdisc_ops *qops);
80extern int unregister_qdisc(struct Qdisc_ops *qops); 80extern int unregister_qdisc(struct Qdisc_ops *qops);
81extern void qdisc_list_del(struct Qdisc *q);
81extern struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle); 82extern struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle);
82extern struct Qdisc *qdisc_lookup_class(struct net_device *dev, u32 handle); 83extern struct Qdisc *qdisc_lookup_class(struct net_device *dev, u32 handle);
83extern struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, 84extern struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r,
@@ -89,7 +90,10 @@ extern void __qdisc_run(struct Qdisc *q);
89 90
90static inline void qdisc_run(struct Qdisc *q) 91static inline void qdisc_run(struct Qdisc *q)
91{ 92{
92 if (!test_and_set_bit(__QDISC_STATE_RUNNING, &q->state)) 93 struct netdev_queue *txq = q->dev_queue;
94
95 if (!netif_tx_queue_stopped(txq) &&
96 !test_and_set_bit(__QDISC_STATE_RUNNING, &q->state))
93 __qdisc_run(q); 97 __qdisc_run(q);
94} 98}
95 99
diff --git a/include/net/request_sock.h b/include/net/request_sock.h
index 8d6e991ef4df..cac811e51f6d 100644
--- a/include/net/request_sock.h
+++ b/include/net/request_sock.h
@@ -33,7 +33,7 @@ struct request_sock_ops {
33 struct kmem_cache *slab; 33 struct kmem_cache *slab;
34 int (*rtx_syn_ack)(struct sock *sk, 34 int (*rtx_syn_ack)(struct sock *sk,
35 struct request_sock *req); 35 struct request_sock *req);
36 void (*send_ack)(struct sk_buff *skb, 36 void (*send_ack)(struct sock *sk, struct sk_buff *skb,
37 struct request_sock *req); 37 struct request_sock *req);
38 void (*send_reset)(struct sock *sk, 38 void (*send_reset)(struct sock *sk,
39 struct sk_buff *skb); 39 struct sk_buff *skb);
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index b5f40d7ef724..e5569625d2a5 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -27,6 +27,7 @@ enum qdisc_state_t
27{ 27{
28 __QDISC_STATE_RUNNING, 28 __QDISC_STATE_RUNNING,
29 __QDISC_STATE_SCHED, 29 __QDISC_STATE_SCHED,
30 __QDISC_STATE_DEACTIVATED,
30}; 31};
31 32
32struct qdisc_size_table { 33struct qdisc_size_table {
@@ -60,7 +61,6 @@ struct Qdisc
60 struct gnet_stats_basic bstats; 61 struct gnet_stats_basic bstats;
61 struct gnet_stats_queue qstats; 62 struct gnet_stats_queue qstats;
62 struct gnet_stats_rate_est rate_est; 63 struct gnet_stats_rate_est rate_est;
63 struct rcu_head q_rcu;
64 int (*reshape_fail)(struct sk_buff *skb, 64 int (*reshape_fail)(struct sk_buff *skb,
65 struct Qdisc *q); 65 struct Qdisc *q);
66 66
@@ -193,10 +193,35 @@ static inline struct Qdisc *qdisc_root(struct Qdisc *qdisc)
193 return qdisc->dev_queue->qdisc; 193 return qdisc->dev_queue->qdisc;
194} 194}
195 195
196static inline struct Qdisc *qdisc_root_sleeping(struct Qdisc *qdisc)
197{
198 return qdisc->dev_queue->qdisc_sleeping;
199}
200
201/* The qdisc root lock is a mechanism by which to top level
202 * of a qdisc tree can be locked from any qdisc node in the
203 * forest. This allows changing the configuration of some
204 * aspect of the qdisc tree while blocking out asynchronous
205 * qdisc access in the packet processing paths.
206 *
207 * It is only legal to do this when the root will not change
208 * on us. Otherwise we'll potentially lock the wrong qdisc
209 * root. This is enforced by holding the RTNL semaphore, which
210 * all users of this lock accessor must do.
211 */
196static inline spinlock_t *qdisc_root_lock(struct Qdisc *qdisc) 212static inline spinlock_t *qdisc_root_lock(struct Qdisc *qdisc)
197{ 213{
198 struct Qdisc *root = qdisc_root(qdisc); 214 struct Qdisc *root = qdisc_root(qdisc);
199 215
216 ASSERT_RTNL();
217 return qdisc_lock(root);
218}
219
220static inline spinlock_t *qdisc_root_sleeping_lock(struct Qdisc *qdisc)
221{
222 struct Qdisc *root = qdisc_root_sleeping(qdisc);
223
224 ASSERT_RTNL();
200 return qdisc_lock(root); 225 return qdisc_lock(root);
201} 226}
202 227
@@ -207,12 +232,12 @@ static inline struct net_device *qdisc_dev(struct Qdisc *qdisc)
207 232
208static inline void sch_tree_lock(struct Qdisc *q) 233static inline void sch_tree_lock(struct Qdisc *q)
209{ 234{
210 spin_lock_bh(qdisc_root_lock(q)); 235 spin_lock_bh(qdisc_root_sleeping_lock(q));
211} 236}
212 237
213static inline void sch_tree_unlock(struct Qdisc *q) 238static inline void sch_tree_unlock(struct Qdisc *q)
214{ 239{
215 spin_unlock_bh(qdisc_root_lock(q)); 240 spin_unlock_bh(qdisc_root_sleeping_lock(q));
216} 241}
217 242
218#define tcf_tree_lock(tp) sch_tree_lock((tp)->q) 243#define tcf_tree_lock(tp) sch_tree_lock((tp)->q)
@@ -331,6 +356,18 @@ static inline unsigned int qdisc_pkt_len(struct sk_buff *skb)
331 return qdisc_skb_cb(skb)->pkt_len; 356 return qdisc_skb_cb(skb)->pkt_len;
332} 357}
333 358
359/* additional qdisc xmit flags (NET_XMIT_MASK in linux/netdevice.h) */
360enum net_xmit_qdisc_t {
361 __NET_XMIT_STOLEN = 0x00010000,
362 __NET_XMIT_BYPASS = 0x00020000,
363};
364
365#ifdef CONFIG_NET_CLS_ACT
366#define net_xmit_drop_count(e) ((e) & __NET_XMIT_STOLEN ? 0 : 1)
367#else
368#define net_xmit_drop_count(e) (1)
369#endif
370
334static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch) 371static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
335{ 372{
336#ifdef CONFIG_NET_SCHED 373#ifdef CONFIG_NET_SCHED
@@ -343,7 +380,7 @@ static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
343static inline int qdisc_enqueue_root(struct sk_buff *skb, struct Qdisc *sch) 380static inline int qdisc_enqueue_root(struct sk_buff *skb, struct Qdisc *sch)
344{ 381{
345 qdisc_skb_cb(skb)->pkt_len = skb->len; 382 qdisc_skb_cb(skb)->pkt_len = skb->len;
346 return qdisc_enqueue(skb, sch); 383 return qdisc_enqueue(skb, sch) & NET_XMIT_MASK;
347} 384}
348 385
349static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch, 386static inline int __qdisc_enqueue_tail(struct sk_buff *skb, struct Qdisc *sch,
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index 24811732bdb2..029a54a02396 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -227,6 +227,9 @@ struct sctp_chunk *sctp_make_abort_violation(const struct sctp_association *,
227 const struct sctp_chunk *, 227 const struct sctp_chunk *,
228 const __u8 *, 228 const __u8 *,
229 const size_t ); 229 const size_t );
230struct sctp_chunk *sctp_make_violation_paramlen(const struct sctp_association *,
231 const struct sctp_chunk *,
232 struct sctp_paramhdr *);
230struct sctp_chunk *sctp_make_heartbeat(const struct sctp_association *, 233struct sctp_chunk *sctp_make_heartbeat(const struct sctp_association *,
231 const struct sctp_transport *, 234 const struct sctp_transport *,
232 const void *payload, 235 const void *payload,
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 535a18f57a13..ab1c472ea753 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -524,8 +524,7 @@ static inline void sctp_ssn_skip(struct sctp_stream *stream, __u16 id,
524 */ 524 */
525struct sctp_af { 525struct sctp_af {
526 int (*sctp_xmit) (struct sk_buff *skb, 526 int (*sctp_xmit) (struct sk_buff *skb,
527 struct sctp_transport *, 527 struct sctp_transport *);
528 int ipfragok);
529 int (*setsockopt) (struct sock *sk, 528 int (*setsockopt) (struct sock *sk,
530 int level, 529 int level,
531 int optname, 530 int optname,
diff --git a/include/net/syncppp.h b/include/net/syncppp.h
index e43f4070d892..9e306f7f579a 100644
--- a/include/net/syncppp.h
+++ b/include/net/syncppp.h
@@ -43,8 +43,6 @@ struct sppp
43 u32 pp_rseq; /* remote sequence number */ 43 u32 pp_rseq; /* remote sequence number */
44 struct slcp lcp; /* LCP params */ 44 struct slcp lcp; /* LCP params */
45 struct sipcp ipcp; /* IPCP params */ 45 struct sipcp ipcp; /* IPCP params */
46 u32 ibytes,obytes; /* Bytes in/out */
47 u32 ipkts,opkts; /* Packets in/out */
48 struct timer_list pp_timer; 46 struct timer_list pp_timer;
49 struct net_device *pp_if; 47 struct net_device *pp_if;
50 char pp_link_state; /* Link status */ 48 char pp_link_state; /* Link status */