aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/brcmphy.h6
-rw-r--r--include/linux/dm9000.h1
-rw-r--r--include/linux/ethtool.h33
-rw-r--r--include/linux/hdlc.h7
-rw-r--r--include/linux/ieee80211.h493
-rw-r--r--include/linux/if_bridge.h2
-rw-r--r--include/linux/if_ppp.h2
-rw-r--r--include/linux/if_tun.h12
-rw-r--r--include/linux/if_vlan.h1
-rw-r--r--include/linux/igmp.h1
-rw-r--r--include/linux/ip6_tunnel.h4
-rw-r--r--include/linux/ipv6.h4
-rw-r--r--include/linux/mroute.h28
-rw-r--r--include/linux/mroute6.h35
-rw-r--r--include/linux/mv643xx_eth.h65
-rw-r--r--include/linux/netdevice.h15
-rw-r--r--include/linux/netfilter/nfnetlink_conntrack.h10
-rw-r--r--include/linux/netfilter_bridge/ebt_ip6.h40
-rw-r--r--include/linux/netfilter_bridge/ebt_log.h3
-rw-r--r--include/linux/netfilter_ipv4.h1
-rw-r--r--include/linux/netfilter_ipv6.h1
-rw-r--r--include/linux/netlink.h2
-rw-r--r--include/linux/nl80211.h13
-rw-r--r--include/linux/notifier.h1
-rw-r--r--include/linux/pci_ids.h3
-rw-r--r--include/linux/ppp-comp.h2
-rw-r--r--include/linux/ppp_defs.h2
-rw-r--r--include/linux/rfkill.h46
-rw-r--r--include/linux/skbuff.h14
-rw-r--r--include/linux/smc911x.h12
-rw-r--r--include/linux/sonet.h2
-rw-r--r--include/linux/ssb/ssb.h143
-rw-r--r--include/linux/sunrpc/auth_gss.h2
-rw-r--r--include/linux/sunrpc/gss_api.h2
-rw-r--r--include/linux/sunrpc/svcauth_gss.h3
-rw-r--r--include/linux/tcp.h50
-rw-r--r--include/linux/tipc_config.h10
-rw-r--r--include/linux/udp.h6
-rw-r--r--include/linux/usb/rndis_host.h3
-rw-r--r--include/linux/wanrouter.h2
-rw-r--r--include/linux/wireless.h30
-rw-r--r--include/net/addrconf.h3
-rw-r--r--include/net/fib_rules.h2
-rw-r--r--include/net/garp.h128
-rw-r--r--include/net/ieee80211.h11
-rw-r--r--include/net/if_inet6.h1
-rw-r--r--include/net/inet6_hashtables.h10
-rw-r--r--include/net/inet_hashtables.h12
-rw-r--r--include/net/inet_sock.h9
-rw-r--r--include/net/inetpeer.h2
-rw-r--r--include/net/ip6_tunnel.h5
-rw-r--r--include/net/ipconfig.h2
-rw-r--r--include/net/ipip.h1
-rw-r--r--include/net/ipv6.h2
-rw-r--r--include/net/iw_handler.h151
-rw-r--r--include/net/mac80211.h493
-rw-r--r--include/net/net_namespace.h3
-rw-r--r--include/net/netfilter/ipv4/nf_conntrack_ipv4.h2
-rw-r--r--include/net/netfilter/nf_conntrack.h19
-rw-r--r--include/net/netns/hash.h21
-rw-r--r--include/net/netns/ipv4.h5
-rw-r--r--include/net/netns/ipv6.h1
-rw-r--r--include/net/rose.h2
-rw-r--r--include/net/route.h2
-rw-r--r--include/net/sctp/sctp.h4
-rw-r--r--include/net/sctp/structs.h6
-rw-r--r--include/net/sctp/user.h34
-rw-r--r--include/net/snmp.h2
-rw-r--r--include/net/sock.h37
-rw-r--r--include/net/stp.h14
-rw-r--r--include/net/tcp.h23
-rw-r--r--include/net/tipc/tipc_port.h3
-rw-r--r--include/net/transp_v6.h2
-rw-r--r--include/net/udp.h16
-rw-r--r--include/net/wext.h7
-rw-r--r--include/net/wireless.h6
76 files changed, 1590 insertions, 563 deletions
diff --git a/include/linux/brcmphy.h b/include/linux/brcmphy.h
new file mode 100644
index 000000000000..9b64b6d67873
--- /dev/null
+++ b/include/linux/brcmphy.h
@@ -0,0 +1,6 @@
1#define PHY_BRCM_WIRESPEED_ENABLE 0x00000001
2#define PHY_BRCM_AUTO_PWRDWN_ENABLE 0x00000002
3#define PHY_BRCM_APD_CLK125_ENABLE 0x00000004
4#define PHY_BRCM_STD_IBND_DISABLE 0x00000008
5#define PHY_BRCM_EXT_IBND_RX_ENABLE 0x00000010
6#define PHY_BRCM_EXT_IBND_TX_ENABLE 0x00000020
diff --git a/include/linux/dm9000.h b/include/linux/dm9000.h
index a3750462f9e3..fc82446b6425 100644
--- a/include/linux/dm9000.h
+++ b/include/linux/dm9000.h
@@ -21,6 +21,7 @@
21#define DM9000_PLATF_32BITONLY (0x0004) 21#define DM9000_PLATF_32BITONLY (0x0004)
22#define DM9000_PLATF_EXT_PHY (0x0008) 22#define DM9000_PLATF_EXT_PHY (0x0008)
23#define DM9000_PLATF_NO_EEPROM (0x0010) 23#define DM9000_PLATF_NO_EEPROM (0x0010)
24#define DM9000_PLATF_SIMPLE_PHY (0x0020) /* Use NSR to find LinkStatus */
24 25
25/* platfrom data for platfrom device structure's platfrom_data field */ 26/* platfrom data for platfrom device structure's platfrom_data field */
26 27
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index c8d216357865..8bb5e87df365 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -272,6 +272,12 @@ enum ethtool_flags {
272 ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */ 272 ETH_FLAG_LRO = (1 << 15), /* LRO is enabled */
273}; 273};
274 274
275struct ethtool_rxnfc {
276 __u32 cmd;
277 __u32 flow_type;
278 __u64 data;
279};
280
275#ifdef __KERNEL__ 281#ifdef __KERNEL__
276 282
277struct net_device; 283struct net_device;
@@ -396,6 +402,8 @@ struct ethtool_ops {
396 /* the following hooks are obsolete */ 402 /* the following hooks are obsolete */
397 int (*self_test_count)(struct net_device *);/* use get_sset_count */ 403 int (*self_test_count)(struct net_device *);/* use get_sset_count */
398 int (*get_stats_count)(struct net_device *);/* use get_sset_count */ 404 int (*get_stats_count)(struct net_device *);/* use get_sset_count */
405 int (*get_rxhash)(struct net_device *, struct ethtool_rxnfc *);
406 int (*set_rxhash)(struct net_device *, struct ethtool_rxnfc *);
399}; 407};
400#endif /* __KERNEL__ */ 408#endif /* __KERNEL__ */
401 409
@@ -442,6 +450,9 @@ struct ethtool_ops {
442#define ETHTOOL_GPFLAGS 0x00000027 /* Get driver-private flags bitmap */ 450#define ETHTOOL_GPFLAGS 0x00000027 /* Get driver-private flags bitmap */
443#define ETHTOOL_SPFLAGS 0x00000028 /* Set driver-private flags bitmap */ 451#define ETHTOOL_SPFLAGS 0x00000028 /* Set driver-private flags bitmap */
444 452
453#define ETHTOOL_GRXFH 0x00000029 /* Get RX flow hash configuration */
454#define ETHTOOL_SRXFH 0x0000002a /* Set RX flow hash configuration */
455
445/* compatibility with older code */ 456/* compatibility with older code */
446#define SPARC_ETH_GSET ETHTOOL_GSET 457#define SPARC_ETH_GSET ETHTOOL_GSET
447#define SPARC_ETH_SSET ETHTOOL_SSET 458#define SPARC_ETH_SSET ETHTOOL_SSET
@@ -528,4 +539,26 @@ struct ethtool_ops {
528#define WAKE_MAGIC (1 << 5) 539#define WAKE_MAGIC (1 << 5)
529#define WAKE_MAGICSECURE (1 << 6) /* only meaningful if WAKE_MAGIC */ 540#define WAKE_MAGICSECURE (1 << 6) /* only meaningful if WAKE_MAGIC */
530 541
542/* L3-L4 network traffic flow types */
543#define TCP_V4_FLOW 0x01
544#define UDP_V4_FLOW 0x02
545#define SCTP_V4_FLOW 0x03
546#define AH_ESP_V4_FLOW 0x04
547#define TCP_V6_FLOW 0x05
548#define UDP_V6_FLOW 0x06
549#define SCTP_V6_FLOW 0x07
550#define AH_ESP_V6_FLOW 0x08
551
552/* L3-L4 network traffic flow hash options */
553#define RXH_DEV_PORT (1 << 0)
554#define RXH_L2DA (1 << 1)
555#define RXH_VLAN (1 << 2)
556#define RXH_L3_PROTO (1 << 3)
557#define RXH_IP_SRC (1 << 4)
558#define RXH_IP_DST (1 << 5)
559#define RXH_L4_B_0_1 (1 << 6) /* src port in case of TCP/UDP/SCTP */
560#define RXH_L4_B_2_3 (1 << 7) /* dst port in case of TCP/UDP/SCTP */
561#define RXH_DISCARD (1 << 31)
562
563
531#endif /* _LINUX_ETHTOOL_H */ 564#endif /* _LINUX_ETHTOOL_H */
diff --git a/include/linux/hdlc.h b/include/linux/hdlc.h
index 6115545a5b9c..c59769693bee 100644
--- a/include/linux/hdlc.h
+++ b/include/linux/hdlc.h
@@ -45,7 +45,6 @@ struct hdlc_proto {
45 45
46/* Pointed to by dev->priv */ 46/* Pointed to by dev->priv */
47typedef struct hdlc_device { 47typedef struct hdlc_device {
48 struct net_device_stats stats;
49 /* used by HDLC layer to take control over HDLC device from hw driver*/ 48 /* used by HDLC layer to take control over HDLC device from hw driver*/
50 int (*attach)(struct net_device *dev, 49 int (*attach)(struct net_device *dev,
51 unsigned short encoding, unsigned short parity); 50 unsigned short encoding, unsigned short parity);
@@ -109,12 +108,6 @@ int attach_hdlc_protocol(struct net_device *dev, struct hdlc_proto *proto,
109/* May be used by hardware driver to gain control over HDLC device */ 108/* May be used by hardware driver to gain control over HDLC device */
110void detach_hdlc_protocol(struct net_device *dev); 109void detach_hdlc_protocol(struct net_device *dev);
111 110
112static __inline__ struct net_device_stats *hdlc_stats(struct net_device *dev)
113{
114 return &dev_to_hdlc(dev)->stats;
115}
116
117
118static __inline__ __be16 hdlc_type_trans(struct sk_buff *skb, 111static __inline__ __be16 hdlc_type_trans(struct sk_buff *skb,
119 struct net_device *dev) 112 struct net_device *dev)
120{ 113{
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 0b5e03eae6d2..cffd6d0094f9 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -98,6 +98,7 @@
98 98
99#define IEEE80211_MAX_SSID_LEN 32 99#define IEEE80211_MAX_SSID_LEN 32
100#define IEEE80211_MAX_MESH_ID_LEN 32 100#define IEEE80211_MAX_MESH_ID_LEN 32
101#define IEEE80211_QOS_CTL_LEN 2
101 102
102struct ieee80211_hdr { 103struct ieee80211_hdr {
103 __le16 frame_control; 104 __le16 frame_control;
@@ -109,6 +110,355 @@ struct ieee80211_hdr {
109 u8 addr4[6]; 110 u8 addr4[6];
110} __attribute__ ((packed)); 111} __attribute__ ((packed));
111 112
113/**
114 * ieee80211_has_tods - check if IEEE80211_FCTL_TODS is set
115 * @fc: frame control bytes in little-endian byteorder
116 */
117static inline int ieee80211_has_tods(__le16 fc)
118{
119 return (fc & cpu_to_le16(IEEE80211_FCTL_TODS)) != 0;
120}
121
122/**
123 * ieee80211_has_fromds - check if IEEE80211_FCTL_FROMDS is set
124 * @fc: frame control bytes in little-endian byteorder
125 */
126static inline int ieee80211_has_fromds(__le16 fc)
127{
128 return (fc & cpu_to_le16(IEEE80211_FCTL_FROMDS)) != 0;
129}
130
131/**
132 * ieee80211_has_a4 - check if IEEE80211_FCTL_TODS and IEEE80211_FCTL_FROMDS are set
133 * @fc: frame control bytes in little-endian byteorder
134 */
135static inline int ieee80211_has_a4(__le16 fc)
136{
137 __le16 tmp = cpu_to_le16(IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS);
138 return (fc & tmp) == tmp;
139}
140
141/**
142 * ieee80211_has_morefrags - check if IEEE80211_FCTL_MOREFRAGS is set
143 * @fc: frame control bytes in little-endian byteorder
144 */
145static inline int ieee80211_has_morefrags(__le16 fc)
146{
147 return (fc & cpu_to_le16(IEEE80211_FCTL_MOREFRAGS)) != 0;
148}
149
150/**
151 * ieee80211_has_retry - check if IEEE80211_FCTL_RETRY is set
152 * @fc: frame control bytes in little-endian byteorder
153 */
154static inline int ieee80211_has_retry(__le16 fc)
155{
156 return (fc & cpu_to_le16(IEEE80211_FCTL_RETRY)) != 0;
157}
158
159/**
160 * ieee80211_has_pm - check if IEEE80211_FCTL_PM is set
161 * @fc: frame control bytes in little-endian byteorder
162 */
163static inline int ieee80211_has_pm(__le16 fc)
164{
165 return (fc & cpu_to_le16(IEEE80211_FCTL_PM)) != 0;
166}
167
168/**
169 * ieee80211_has_moredata - check if IEEE80211_FCTL_MOREDATA is set
170 * @fc: frame control bytes in little-endian byteorder
171 */
172static inline int ieee80211_has_moredata(__le16 fc)
173{
174 return (fc & cpu_to_le16(IEEE80211_FCTL_MOREDATA)) != 0;
175}
176
177/**
178 * ieee80211_has_protected - check if IEEE80211_FCTL_PROTECTED is set
179 * @fc: frame control bytes in little-endian byteorder
180 */
181static inline int ieee80211_has_protected(__le16 fc)
182{
183 return (fc & cpu_to_le16(IEEE80211_FCTL_PROTECTED)) != 0;
184}
185
186/**
187 * ieee80211_has_order - check if IEEE80211_FCTL_ORDER is set
188 * @fc: frame control bytes in little-endian byteorder
189 */
190static inline int ieee80211_has_order(__le16 fc)
191{
192 return (fc & cpu_to_le16(IEEE80211_FCTL_ORDER)) != 0;
193}
194
195/**
196 * ieee80211_is_mgmt - check if type is IEEE80211_FTYPE_MGMT
197 * @fc: frame control bytes in little-endian byteorder
198 */
199static inline int ieee80211_is_mgmt(__le16 fc)
200{
201 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE)) ==
202 cpu_to_le16(IEEE80211_FTYPE_MGMT);
203}
204
205/**
206 * ieee80211_is_ctl - check if type is IEEE80211_FTYPE_CTL
207 * @fc: frame control bytes in little-endian byteorder
208 */
209static inline int ieee80211_is_ctl(__le16 fc)
210{
211 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE)) ==
212 cpu_to_le16(IEEE80211_FTYPE_CTL);
213}
214
215/**
216 * ieee80211_is_data - check if type is IEEE80211_FTYPE_DATA
217 * @fc: frame control bytes in little-endian byteorder
218 */
219static inline int ieee80211_is_data(__le16 fc)
220{
221 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE)) ==
222 cpu_to_le16(IEEE80211_FTYPE_DATA);
223}
224
225/**
226 * ieee80211_is_data_qos - check if type is IEEE80211_FTYPE_DATA and IEEE80211_STYPE_QOS_DATA is set
227 * @fc: frame control bytes in little-endian byteorder
228 */
229static inline int ieee80211_is_data_qos(__le16 fc)
230{
231 /*
232 * mask with QOS_DATA rather than IEEE80211_FCTL_STYPE as we just need
233 * to check the one bit
234 */
235 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_STYPE_QOS_DATA)) ==
236 cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_DATA);
237}
238
239/**
240 * ieee80211_is_data_present - check if type is IEEE80211_FTYPE_DATA and has data
241 * @fc: frame control bytes in little-endian byteorder
242 */
243static inline int ieee80211_is_data_present(__le16 fc)
244{
245 /*
246 * mask with 0x40 and test that that bit is clear to only return true
247 * for the data-containing substypes.
248 */
249 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | 0x40)) ==
250 cpu_to_le16(IEEE80211_FTYPE_DATA);
251}
252
253/**
254 * ieee80211_is_assoc_req - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ASSOC_REQ
255 * @fc: frame control bytes in little-endian byteorder
256 */
257static inline int ieee80211_is_assoc_req(__le16 fc)
258{
259 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
260 cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ASSOC_REQ);
261}
262
263/**
264 * ieee80211_is_assoc_resp - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ASSOC_RESP
265 * @fc: frame control bytes in little-endian byteorder
266 */
267static inline int ieee80211_is_assoc_resp(__le16 fc)
268{
269 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
270 cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ASSOC_RESP);
271}
272
273/**
274 * ieee80211_is_reassoc_req - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_REASSOC_REQ
275 * @fc: frame control bytes in little-endian byteorder
276 */
277static inline int ieee80211_is_reassoc_req(__le16 fc)
278{
279 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
280 cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_REASSOC_REQ);
281}
282
283/**
284 * ieee80211_is_reassoc_resp - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_REASSOC_RESP
285 * @fc: frame control bytes in little-endian byteorder
286 */
287static inline int ieee80211_is_reassoc_resp(__le16 fc)
288{
289 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
290 cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_REASSOC_RESP);
291}
292
293/**
294 * ieee80211_is_probe_req - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_PROBE_REQ
295 * @fc: frame control bytes in little-endian byteorder
296 */
297static inline int ieee80211_is_probe_req(__le16 fc)
298{
299 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
300 cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_REQ);
301}
302
303/**
304 * ieee80211_is_probe_resp - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_PROBE_RESP
305 * @fc: frame control bytes in little-endian byteorder
306 */
307static inline int ieee80211_is_probe_resp(__le16 fc)
308{
309 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
310 cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_RESP);
311}
312
313/**
314 * ieee80211_is_beacon - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_BEACON
315 * @fc: frame control bytes in little-endian byteorder
316 */
317static inline int ieee80211_is_beacon(__le16 fc)
318{
319 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
320 cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON);
321}
322
323/**
324 * ieee80211_is_atim - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ATIM
325 * @fc: frame control bytes in little-endian byteorder
326 */
327static inline int ieee80211_is_atim(__le16 fc)
328{
329 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
330 cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ATIM);
331}
332
333/**
334 * ieee80211_is_disassoc - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_DISASSOC
335 * @fc: frame control bytes in little-endian byteorder
336 */
337static inline int ieee80211_is_disassoc(__le16 fc)
338{
339 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
340 cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_DISASSOC);
341}
342
343/**
344 * ieee80211_is_auth - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_AUTH
345 * @fc: frame control bytes in little-endian byteorder
346 */
347static inline int ieee80211_is_auth(__le16 fc)
348{
349 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
350 cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_AUTH);
351}
352
353/**
354 * ieee80211_is_deauth - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_DEAUTH
355 * @fc: frame control bytes in little-endian byteorder
356 */
357static inline int ieee80211_is_deauth(__le16 fc)
358{
359 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
360 cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_DEAUTH);
361}
362
363/**
364 * ieee80211_is_action - check if IEEE80211_FTYPE_MGMT && IEEE80211_STYPE_ACTION
365 * @fc: frame control bytes in little-endian byteorder
366 */
367static inline int ieee80211_is_action(__le16 fc)
368{
369 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
370 cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ACTION);
371}
372
373/**
374 * ieee80211_is_back_req - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_BACK_REQ
375 * @fc: frame control bytes in little-endian byteorder
376 */
377static inline int ieee80211_is_back_req(__le16 fc)
378{
379 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
380 cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_BACK_REQ);
381}
382
383/**
384 * ieee80211_is_back - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_BACK
385 * @fc: frame control bytes in little-endian byteorder
386 */
387static inline int ieee80211_is_back(__le16 fc)
388{
389 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
390 cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_BACK);
391}
392
393/**
394 * ieee80211_is_pspoll - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_PSPOLL
395 * @fc: frame control bytes in little-endian byteorder
396 */
397static inline int ieee80211_is_pspoll(__le16 fc)
398{
399 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
400 cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_PSPOLL);
401}
402
403/**
404 * ieee80211_is_rts - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_RTS
405 * @fc: frame control bytes in little-endian byteorder
406 */
407static inline int ieee80211_is_rts(__le16 fc)
408{
409 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
410 cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_RTS);
411}
412
413/**
414 * ieee80211_is_cts - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CTS
415 * @fc: frame control bytes in little-endian byteorder
416 */
417static inline int ieee80211_is_cts(__le16 fc)
418{
419 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
420 cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTS);
421}
422
423/**
424 * ieee80211_is_ack - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_ACK
425 * @fc: frame control bytes in little-endian byteorder
426 */
427static inline int ieee80211_is_ack(__le16 fc)
428{
429 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
430 cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_ACK);
431}
432
433/**
434 * ieee80211_is_cfend - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CFEND
435 * @fc: frame control bytes in little-endian byteorder
436 */
437static inline int ieee80211_is_cfend(__le16 fc)
438{
439 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
440 cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CFEND);
441}
442
443/**
444 * ieee80211_is_cfendack - check if IEEE80211_FTYPE_CTL && IEEE80211_STYPE_CFENDACK
445 * @fc: frame control bytes in little-endian byteorder
446 */
447static inline int ieee80211_is_cfendack(__le16 fc)
448{
449 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
450 cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CFENDACK);
451}
452
453/**
454 * ieee80211_is_nullfunc - check if FTYPE=IEEE80211_FTYPE_DATA and STYPE=IEEE80211_STYPE_NULLFUNC
455 * @fc: frame control bytes in little-endian byteorder
456 */
457static inline int ieee80211_is_nullfunc(__le16 fc)
458{
459 return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) ==
460 cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_NULLFUNC);
461}
112 462
113struct ieee80211s_hdr { 463struct ieee80211s_hdr {
114 u8 flags; 464 u8 flags;
@@ -119,6 +469,40 @@ struct ieee80211s_hdr {
119 u8 eaddr3[6]; 469 u8 eaddr3[6];
120} __attribute__ ((packed)); 470} __attribute__ ((packed));
121 471
472/**
473 * struct ieee80211_quiet_ie
474 *
475 * This structure refers to "Quiet information element"
476 */
477struct ieee80211_quiet_ie {
478 u8 count;
479 u8 period;
480 __le16 duration;
481 __le16 offset;
482} __attribute__ ((packed));
483
484/**
485 * struct ieee80211_msrment_ie
486 *
487 * This structure refers to "Measurement Request/Report information element"
488 */
489struct ieee80211_msrment_ie {
490 u8 token;
491 u8 mode;
492 u8 type;
493 u8 request[0];
494} __attribute__ ((packed));
495
496/**
497 * struct ieee80211_channel_sw_ie
498 *
499 * This structure refers to "Channel Switch Announcement information element"
500 */
501struct ieee80211_channel_sw_ie {
502 u8 mode;
503 u8 new_ch_num;
504 u8 count;
505} __attribute__ ((packed));
122 506
123struct ieee80211_mgmt { 507struct ieee80211_mgmt {
124 __le16 frame_control; 508 __le16 frame_control;
@@ -194,13 +578,18 @@ struct ieee80211_mgmt {
194 u8 action_code; 578 u8 action_code;
195 u8 element_id; 579 u8 element_id;
196 u8 length; 580 u8 length;
197 u8 switch_mode; 581 struct ieee80211_channel_sw_ie sw_elem;
198 u8 new_chan;
199 u8 switch_count;
200 } __attribute__((packed)) chan_switch; 582 } __attribute__((packed)) chan_switch;
201 struct{ 583 struct{
202 u8 action_code; 584 u8 action_code;
203 u8 dialog_token; 585 u8 dialog_token;
586 u8 element_id;
587 u8 length;
588 struct ieee80211_msrment_ie msr_elem;
589 } __attribute__((packed)) measurement;
590 struct{
591 u8 action_code;
592 u8 dialog_token;
204 __le16 capab; 593 __le16 capab;
205 __le16 timeout; 594 __le16 timeout;
206 __le16 start_seq_num; 595 __le16 start_seq_num;
@@ -306,20 +695,33 @@ struct ieee80211_ht_addt_info {
306#define IEEE80211_HT_CAP_SGI_40 0x0040 695#define IEEE80211_HT_CAP_SGI_40 0x0040
307#define IEEE80211_HT_CAP_DELAY_BA 0x0400 696#define IEEE80211_HT_CAP_DELAY_BA 0x0400
308#define IEEE80211_HT_CAP_MAX_AMSDU 0x0800 697#define IEEE80211_HT_CAP_MAX_AMSDU 0x0800
698/* 802.11n HT capability AMPDU settings */
309#define IEEE80211_HT_CAP_AMPDU_FACTOR 0x03 699#define IEEE80211_HT_CAP_AMPDU_FACTOR 0x03
310#define IEEE80211_HT_CAP_AMPDU_DENSITY 0x1C 700#define IEEE80211_HT_CAP_AMPDU_DENSITY 0x1C
701/* 802.11n HT capability MSC set */
702#define IEEE80211_SUPP_MCS_SET_UEQM 4
703#define IEEE80211_HT_CAP_MAX_STREAMS 4
704#define IEEE80211_SUPP_MCS_SET_LEN 10
705/* maximum streams the spec allows */
706#define IEEE80211_HT_CAP_MCS_TX_DEFINED 0x01
707#define IEEE80211_HT_CAP_MCS_TX_RX_DIFF 0x02
708#define IEEE80211_HT_CAP_MCS_TX_STREAMS 0x0C
709#define IEEE80211_HT_CAP_MCS_TX_UEQM 0x10
311/* 802.11n HT IE masks */ 710/* 802.11n HT IE masks */
312#define IEEE80211_HT_IE_CHA_SEC_OFFSET 0x03 711#define IEEE80211_HT_IE_CHA_SEC_OFFSET 0x03
712#define IEEE80211_HT_IE_CHA_SEC_NONE 0x00
713#define IEEE80211_HT_IE_CHA_SEC_ABOVE 0x01
714#define IEEE80211_HT_IE_CHA_SEC_BELOW 0x03
313#define IEEE80211_HT_IE_CHA_WIDTH 0x04 715#define IEEE80211_HT_IE_CHA_WIDTH 0x04
314#define IEEE80211_HT_IE_HT_PROTECTION 0x0003 716#define IEEE80211_HT_IE_HT_PROTECTION 0x0003
315#define IEEE80211_HT_IE_NON_GF_STA_PRSNT 0x0004 717#define IEEE80211_HT_IE_NON_GF_STA_PRSNT 0x0004
316#define IEEE80211_HT_IE_NON_HT_STA_PRSNT 0x0010 718#define IEEE80211_HT_IE_NON_HT_STA_PRSNT 0x0010
317 719
318/* MIMO Power Save Modes */ 720/* MIMO Power Save Modes */
319#define WLAN_HT_CAP_MIMO_PS_STATIC 0 721#define WLAN_HT_CAP_MIMO_PS_STATIC 0
320#define WLAN_HT_CAP_MIMO_PS_DYNAMIC 1 722#define WLAN_HT_CAP_MIMO_PS_DYNAMIC 1
321#define WLAN_HT_CAP_MIMO_PS_INVALID 2 723#define WLAN_HT_CAP_MIMO_PS_INVALID 2
322#define WLAN_HT_CAP_MIMO_PS_DISABLED 3 724#define WLAN_HT_CAP_MIMO_PS_DISABLED 3
323 725
324/* Authentication algorithms */ 726/* Authentication algorithms */
325#define WLAN_AUTH_OPEN 0 727#define WLAN_AUTH_OPEN 0
@@ -337,11 +739,21 @@ struct ieee80211_ht_addt_info {
337#define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5) 739#define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
338#define WLAN_CAPABILITY_PBCC (1<<6) 740#define WLAN_CAPABILITY_PBCC (1<<6)
339#define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7) 741#define WLAN_CAPABILITY_CHANNEL_AGILITY (1<<7)
742
340/* 802.11h */ 743/* 802.11h */
341#define WLAN_CAPABILITY_SPECTRUM_MGMT (1<<8) 744#define WLAN_CAPABILITY_SPECTRUM_MGMT (1<<8)
342#define WLAN_CAPABILITY_QOS (1<<9) 745#define WLAN_CAPABILITY_QOS (1<<9)
343#define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10) 746#define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10)
344#define WLAN_CAPABILITY_DSSS_OFDM (1<<13) 747#define WLAN_CAPABILITY_DSSS_OFDM (1<<13)
748/* measurement */
749#define IEEE80211_SPCT_MSR_RPRT_MODE_LATE (1<<0)
750#define IEEE80211_SPCT_MSR_RPRT_MODE_INCAPABLE (1<<1)
751#define IEEE80211_SPCT_MSR_RPRT_MODE_REFUSED (1<<2)
752
753#define IEEE80211_SPCT_MSR_RPRT_TYPE_BASIC 0
754#define IEEE80211_SPCT_MSR_RPRT_TYPE_CCA 1
755#define IEEE80211_SPCT_MSR_RPRT_TYPE_RPI 2
756
345 757
346/* 802.11g ERP information element */ 758/* 802.11g ERP information element */
347#define WLAN_ERP_NON_ERP_PRESENT (1<<0) 759#define WLAN_ERP_NON_ERP_PRESENT (1<<0)
@@ -512,6 +924,15 @@ enum ieee80211_category {
512 WLAN_CATEGORY_WMM = 17, 924 WLAN_CATEGORY_WMM = 17,
513}; 925};
514 926
927/* SPECTRUM_MGMT action code */
928enum ieee80211_spectrum_mgmt_actioncode {
929 WLAN_ACTION_SPCT_MSR_REQ = 0,
930 WLAN_ACTION_SPCT_MSR_RPRT = 1,
931 WLAN_ACTION_SPCT_TPC_REQ = 2,
932 WLAN_ACTION_SPCT_TPC_RPRT = 3,
933 WLAN_ACTION_SPCT_CHL_SWITCH = 4,
934};
935
515/* BACK action code */ 936/* BACK action code */
516enum ieee80211_back_actioncode { 937enum ieee80211_back_actioncode {
517 WLAN_ACTION_ADDBA_REQ = 0, 938 WLAN_ACTION_ADDBA_REQ = 0,
@@ -540,63 +961,57 @@ enum ieee80211_back_parties {
540#define WLAN_MAX_KEY_LEN 32 961#define WLAN_MAX_KEY_LEN 32
541 962
542/** 963/**
964 * ieee80211_get_qos_ctl - get pointer to qos control bytes
965 * @hdr: the frame
966 *
967 * The qos ctrl bytes come after the frame_control, duration, seq_num
968 * and 3 or 4 addresses of length ETH_ALEN.
969 * 3 addr: 2 + 2 + 2 + 3*6 = 24
970 * 4 addr: 2 + 2 + 2 + 4*6 = 30
971 */
972static inline u8 *ieee80211_get_qos_ctl(struct ieee80211_hdr *hdr)
973{
974 if (ieee80211_has_a4(hdr->frame_control))
975 return (u8 *)hdr + 30;
976 else
977 return (u8 *)hdr + 24;
978}
979
980/**
543 * ieee80211_get_SA - get pointer to SA 981 * ieee80211_get_SA - get pointer to SA
982 * @hdr: the frame
544 * 983 *
545 * Given an 802.11 frame, this function returns the offset 984 * Given an 802.11 frame, this function returns the offset
546 * to the source address (SA). It does not verify that the 985 * to the source address (SA). It does not verify that the
547 * header is long enough to contain the address, and the 986 * header is long enough to contain the address, and the
548 * header must be long enough to contain the frame control 987 * header must be long enough to contain the frame control
549 * field. 988 * field.
550 *
551 * @hdr: the frame
552 */ 989 */
553static inline u8 *ieee80211_get_SA(struct ieee80211_hdr *hdr) 990static inline u8 *ieee80211_get_SA(struct ieee80211_hdr *hdr)
554{ 991{
555 u8 *raw = (u8 *) hdr; 992 if (ieee80211_has_a4(hdr->frame_control))
556 u8 tofrom = (*(raw+1)) & 3; /* get the TODS and FROMDS bits */ 993 return hdr->addr4;
557 994 if (ieee80211_has_fromds(hdr->frame_control))
558 switch (tofrom) { 995 return hdr->addr3;
559 case 2:
560 return hdr->addr3;
561 case 3:
562 return hdr->addr4;
563 }
564 return hdr->addr2; 996 return hdr->addr2;
565} 997}
566 998
567/** 999/**
568 * ieee80211_get_DA - get pointer to DA 1000 * ieee80211_get_DA - get pointer to DA
1001 * @hdr: the frame
569 * 1002 *
570 * Given an 802.11 frame, this function returns the offset 1003 * Given an 802.11 frame, this function returns the offset
571 * to the destination address (DA). It does not verify that 1004 * to the destination address (DA). It does not verify that
572 * the header is long enough to contain the address, and the 1005 * the header is long enough to contain the address, and the
573 * header must be long enough to contain the frame control 1006 * header must be long enough to contain the frame control
574 * field. 1007 * field.
575 *
576 * @hdr: the frame
577 */ 1008 */
578static inline u8 *ieee80211_get_DA(struct ieee80211_hdr *hdr) 1009static inline u8 *ieee80211_get_DA(struct ieee80211_hdr *hdr)
579{ 1010{
580 u8 *raw = (u8 *) hdr; 1011 if (ieee80211_has_tods(hdr->frame_control))
581 u8 to_ds = (*(raw+1)) & 1; /* get the TODS bit */
582
583 if (to_ds)
584 return hdr->addr3; 1012 return hdr->addr3;
585 return hdr->addr1; 1013 else
586} 1014 return hdr->addr1;
587
588/**
589 * ieee80211_get_morefrag - determine whether the MOREFRAGS bit is set
590 *
591 * This function determines whether the "more fragments" bit is set
592 * in the frame.
593 *
594 * @hdr: the frame
595 */
596static inline int ieee80211_get_morefrag(struct ieee80211_hdr *hdr)
597{
598 return (le16_to_cpu(hdr->frame_control) &
599 IEEE80211_FCTL_MOREFRAGS) != 0;
600} 1015}
601 1016
602#endif /* IEEE80211_H */ 1017#endif /* IEEE80211_H */
diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h
index 950e13d09e06..6badb3e2c4e4 100644
--- a/include/linux/if_bridge.h
+++ b/include/linux/if_bridge.h
@@ -4,8 +4,6 @@
4 * Authors: 4 * Authors:
5 * Lennert Buytenhek <buytenh@gnu.org> 5 * Lennert Buytenhek <buytenh@gnu.org>
6 * 6 *
7 * $Id: if_bridge.h,v 1.1 2000/02/18 16:47:01 davem Exp $
8 *
9 * This program is free software; you can redistribute it and/or 7 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License 8 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 9 * as published by the Free Software Foundation; either version
diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h
index 0f2f70d4e48c..c3b1f8562709 100644
--- a/include/linux/if_ppp.h
+++ b/include/linux/if_ppp.h
@@ -1,5 +1,3 @@
1/* $Id: if_ppp.h,v 1.21 2000/03/27 06:03:36 paulus Exp $ */
2
3/* 1/*
4 * if_ppp.h - Point-to-Point Protocol definitions. 2 * if_ppp.h - Point-to-Point Protocol definitions.
5 * 3 *
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h
index 8c71fe2fb1f5..563fae542da6 100644
--- a/include/linux/if_tun.h
+++ b/include/linux/if_tun.h
@@ -11,8 +11,6 @@
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details. 13 * GNU General Public License for more details.
14 *
15 * $Id: if_tun.h,v 1.2 2001/06/01 18:39:47 davem Exp $
16 */ 14 */
17 15
18#ifndef __IF_TUN_H 16#ifndef __IF_TUN_H
@@ -33,6 +31,7 @@
33#define TUN_NO_PI 0x0040 31#define TUN_NO_PI 0x0040
34#define TUN_ONE_QUEUE 0x0080 32#define TUN_ONE_QUEUE 0x0080
35#define TUN_PERSIST 0x0100 33#define TUN_PERSIST 0x0100
34#define TUN_VNET_HDR 0x0200
36 35
37/* Ioctl defines */ 36/* Ioctl defines */
38#define TUNSETNOCSUM _IOW('T', 200, int) 37#define TUNSETNOCSUM _IOW('T', 200, int)
@@ -42,12 +41,21 @@
42#define TUNSETOWNER _IOW('T', 204, int) 41#define TUNSETOWNER _IOW('T', 204, int)
43#define TUNSETLINK _IOW('T', 205, int) 42#define TUNSETLINK _IOW('T', 205, int)
44#define TUNSETGROUP _IOW('T', 206, int) 43#define TUNSETGROUP _IOW('T', 206, int)
44#define TUNGETFEATURES _IOR('T', 207, unsigned int)
45#define TUNSETOFFLOAD _IOW('T', 208, unsigned int)
45 46
46/* TUNSETIFF ifr flags */ 47/* TUNSETIFF ifr flags */
47#define IFF_TUN 0x0001 48#define IFF_TUN 0x0001
48#define IFF_TAP 0x0002 49#define IFF_TAP 0x0002
49#define IFF_NO_PI 0x1000 50#define IFF_NO_PI 0x1000
50#define IFF_ONE_QUEUE 0x2000 51#define IFF_ONE_QUEUE 0x2000
52#define IFF_VNET_HDR 0x4000
53
54/* Features for GSO (TUNSETOFFLOAD). */
55#define TUN_F_CSUM 0x01 /* You can hand me unchecksummed packets. */
56#define TUN_F_TSO4 0x02 /* I can handle TSO for IPv4 packets */
57#define TUN_F_TSO6 0x04 /* I can handle TSO for IPv6 packets */
58#define TUN_F_TSO_ECN 0x08 /* I can handle TSO with ECN bits. */
51 59
52struct tun_pi { 60struct tun_pi {
53 unsigned short flags; 61 unsigned short flags;
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 15ace02b7b24..5190452ac7dc 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -402,6 +402,7 @@ enum vlan_ioctl_cmds {
402 402
403enum vlan_flags { 403enum vlan_flags {
404 VLAN_FLAG_REORDER_HDR = 0x1, 404 VLAN_FLAG_REORDER_HDR = 0x1,
405 VLAN_FLAG_GVRP = 0x2,
405}; 406};
406 407
407enum vlan_name_types { 408enum vlan_name_types {
diff --git a/include/linux/igmp.h b/include/linux/igmp.h
index f5a1a0db2e8e..7bb3c095c15b 100644
--- a/include/linux/igmp.h
+++ b/include/linux/igmp.h
@@ -228,7 +228,6 @@ extern int ip_mc_msfget(struct sock *sk, struct ip_msfilter *msf,
228extern int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf, 228extern int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf,
229 struct group_filter __user *optval, int __user *optlen); 229 struct group_filter __user *optval, int __user *optlen);
230extern int ip_mc_sf_allow(struct sock *sk, __be32 local, __be32 rmt, int dif); 230extern int ip_mc_sf_allow(struct sock *sk, __be32 local, __be32 rmt, int dif);
231extern void ip_mr_init(void);
232extern void ip_mc_init_dev(struct in_device *); 231extern void ip_mc_init_dev(struct in_device *);
233extern void ip_mc_destroy_dev(struct in_device *); 232extern void ip_mc_destroy_dev(struct in_device *);
234extern void ip_mc_up(struct in_device *); 233extern void ip_mc_up(struct in_device *);
diff --git a/include/linux/ip6_tunnel.h b/include/linux/ip6_tunnel.h
index af3f4a70f3df..1e7cc4af40de 100644
--- a/include/linux/ip6_tunnel.h
+++ b/include/linux/ip6_tunnel.h
@@ -1,7 +1,3 @@
1/*
2 * $Id$
3 */
4
5#ifndef _IP6_TUNNEL_H 1#ifndef _IP6_TUNNEL_H
6#define _IP6_TUNNEL_H 2#define _IP6_TUNNEL_H
7 3
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index cde056e08181..391ad0843a46 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -163,6 +163,8 @@ struct ipv6_devconf {
163#ifdef CONFIG_IPV6_MROUTE 163#ifdef CONFIG_IPV6_MROUTE
164 __s32 mc_forwarding; 164 __s32 mc_forwarding;
165#endif 165#endif
166 __s32 disable_ipv6;
167 __s32 accept_dad;
166 void *sysctl; 168 void *sysctl;
167}; 169};
168 170
@@ -194,6 +196,8 @@ enum {
194 DEVCONF_OPTIMISTIC_DAD, 196 DEVCONF_OPTIMISTIC_DAD,
195 DEVCONF_ACCEPT_SOURCE_ROUTE, 197 DEVCONF_ACCEPT_SOURCE_ROUTE,
196 DEVCONF_MC_FORWARDING, 198 DEVCONF_MC_FORWARDING,
199 DEVCONF_DISABLE_IPV6,
200 DEVCONF_ACCEPT_DAD,
197 DEVCONF_MAX 201 DEVCONF_MAX
198}; 202};
199 203
diff --git a/include/linux/mroute.h b/include/linux/mroute.h
index de4decfa1bfc..07112ee9293a 100644
--- a/include/linux/mroute.h
+++ b/include/linux/mroute.h
@@ -144,11 +144,37 @@ static inline int ip_mroute_opt(int opt)
144} 144}
145#endif 145#endif
146 146
147#ifdef CONFIG_IP_MROUTE
147extern int ip_mroute_setsockopt(struct sock *, int, char __user *, int); 148extern int ip_mroute_setsockopt(struct sock *, int, char __user *, int);
148extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *); 149extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *);
149extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg); 150extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg);
150extern void ip_mr_init(void); 151extern int ip_mr_init(void);
152#else
153static inline
154int ip_mroute_setsockopt(struct sock *sock,
155 int optname, char __user *optval, int optlen)
156{
157 return -ENOPROTOOPT;
158}
159
160static inline
161int ip_mroute_getsockopt(struct sock *sock,
162 int optname, char __user *optval, int __user *optlen)
163{
164 return -ENOPROTOOPT;
165}
151 166
167static inline
168int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg)
169{
170 return -ENOIOCTLCMD;
171}
172
173static inline int ip_mr_init(void)
174{
175 return 0;
176}
177#endif
152 178
153struct vif_device 179struct vif_device
154{ 180{
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h
index e7989593142b..5cf50473a10f 100644
--- a/include/linux/mroute6.h
+++ b/include/linux/mroute6.h
@@ -131,11 +131,44 @@ static inline int ip6_mroute_opt(int opt)
131 131
132struct sock; 132struct sock;
133 133
134#ifdef CONFIG_IPV6_MROUTE
134extern int ip6_mroute_setsockopt(struct sock *, int, char __user *, int); 135extern int ip6_mroute_setsockopt(struct sock *, int, char __user *, int);
135extern int ip6_mroute_getsockopt(struct sock *, int, char __user *, int __user *); 136extern int ip6_mroute_getsockopt(struct sock *, int, char __user *, int __user *);
136extern int ip6_mr_input(struct sk_buff *skb); 137extern int ip6_mr_input(struct sk_buff *skb);
137extern int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg); 138extern int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg);
138extern void ip6_mr_init(void); 139extern int ip6_mr_init(void);
140extern void ip6_mr_cleanup(void);
141#else
142static inline
143int ip6_mroute_setsockopt(struct sock *sock,
144 int optname, char __user *optval, int optlen)
145{
146 return -ENOPROTOOPT;
147}
148
149static inline
150int ip6_mroute_getsockopt(struct sock *sock,
151 int optname, char __user *optval, int __user *optlen)
152{
153 return -ENOPROTOOPT;
154}
155
156static inline
157int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg)
158{
159 return -ENOIOCTLCMD;
160}
161
162static inline int ip6_mr_init(void)
163{
164 return 0;
165}
166
167static inline void ip6_mr_cleanup(void)
168{
169 return;
170}
171#endif
139 172
140struct mif_device 173struct mif_device
141{ 174{
diff --git a/include/linux/mv643xx_eth.h b/include/linux/mv643xx_eth.h
index a15cdd4a8e58..12078577aef6 100644
--- a/include/linux/mv643xx_eth.h
+++ b/include/linux/mv643xx_eth.h
@@ -17,30 +17,59 @@
17 17
18struct mv643xx_eth_shared_platform_data { 18struct mv643xx_eth_shared_platform_data {
19 struct mbus_dram_target_info *dram; 19 struct mbus_dram_target_info *dram;
20 unsigned int t_clk; 20 unsigned int t_clk;
21}; 21};
22 22
23struct mv643xx_eth_platform_data { 23struct mv643xx_eth_platform_data {
24 /*
25 * Pointer back to our parent instance, and our port number.
26 */
24 struct platform_device *shared; 27 struct platform_device *shared;
25 int port_number; 28 int port_number;
26 29
30 /*
31 * Whether a PHY is present, and if yes, at which address.
32 */
27 struct platform_device *shared_smi; 33 struct platform_device *shared_smi;
34 int force_phy_addr;
35 int phy_addr;
28 36
29 u16 force_phy_addr; /* force override if phy_addr == 0 */ 37 /*
30 u16 phy_addr; 38 * Use this MAC address if it is valid, overriding the
31 39 * address that is already in the hardware.
32 /* If speed is 0, then speed and duplex are autonegotiated. */ 40 */
33 int speed; /* 0, SPEED_10, SPEED_100, SPEED_1000 */ 41 u8 mac_addr[6];
34 int duplex; /* DUPLEX_HALF or DUPLEX_FULL */ 42
35 43 /*
36 /* non-zero values of the following fields override defaults */ 44 * If speed is 0, autonegotiation is enabled.
37 u32 tx_queue_size; 45 * Valid values for speed: 0, SPEED_10, SPEED_100, SPEED_1000.
38 u32 rx_queue_size; 46 * Valid values for duplex: DUPLEX_HALF, DUPLEX_FULL.
39 u32 tx_sram_addr; 47 */
40 u32 tx_sram_size; 48 int speed;
41 u32 rx_sram_addr; 49 int duplex;
42 u32 rx_sram_size; 50
43 u8 mac_addr[6]; /* mac address if non-zero*/ 51 /*
52 * Which RX/TX queues to use.
53 */
54 int rx_queue_mask;
55 int tx_queue_mask;
56
57 /*
58 * Override default RX/TX queue sizes if nonzero.
59 */
60 int rx_queue_size;
61 int tx_queue_size;
62
63 /*
64 * Use on-chip SRAM for RX/TX descriptors if size is nonzero
65 * and sufficient to contain all descriptors for the requested
66 * ring sizes.
67 */
68 unsigned long rx_sram_addr;
69 int rx_sram_size;
70 unsigned long tx_sram_addr;
71 int tx_sram_size;
44}; 72};
45 73
46#endif /* __LINUX_MV643XX_ETH_H */ 74
75#endif
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 25f87102ab66..e009c6fbf5cd 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -599,8 +599,8 @@ struct net_device
599 int uc_promisc; 599 int uc_promisc;
600 struct dev_addr_list *mc_list; /* Multicast mac addresses */ 600 struct dev_addr_list *mc_list; /* Multicast mac addresses */
601 int mc_count; /* Number of installed mcasts */ 601 int mc_count; /* Number of installed mcasts */
602 int promiscuity; 602 unsigned int promiscuity;
603 int allmulti; 603 unsigned int allmulti;
604 604
605 605
606 /* Protocol specific pointers */ 606 /* Protocol specific pointers */
@@ -740,6 +740,8 @@ struct net_device
740 struct net_bridge_port *br_port; 740 struct net_bridge_port *br_port;
741 /* macvlan */ 741 /* macvlan */
742 struct macvlan_port *macvlan_port; 742 struct macvlan_port *macvlan_port;
743 /* GARP */
744 struct garp_port *garp_port;
743 745
744 /* class/net/name entry */ 746 /* class/net/name entry */
745 struct device dev; 747 struct device dev;
@@ -890,6 +892,7 @@ extern struct net_device *__dev_get_by_name(struct net *net, const char *name);
890extern int dev_alloc_name(struct net_device *dev, const char *name); 892extern int dev_alloc_name(struct net_device *dev, const char *name);
891extern int dev_open(struct net_device *dev); 893extern int dev_open(struct net_device *dev);
892extern int dev_close(struct net_device *dev); 894extern int dev_close(struct net_device *dev);
895extern void dev_disable_lro(struct net_device *dev);
893extern int dev_queue_xmit(struct sk_buff *skb); 896extern int dev_queue_xmit(struct sk_buff *skb);
894extern int register_netdevice(struct net_device *dev); 897extern int register_netdevice(struct net_device *dev);
895extern void unregister_netdevice(struct net_device *dev); 898extern void unregister_netdevice(struct net_device *dev);
@@ -1480,9 +1483,10 @@ extern int __dev_addr_delete(struct dev_addr_list **list, int *count, void *ad
1480extern int __dev_addr_add(struct dev_addr_list **list, int *count, void *addr, int alen, int newonly); 1483extern int __dev_addr_add(struct dev_addr_list **list, int *count, void *addr, int alen, int newonly);
1481extern int __dev_addr_sync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count); 1484extern int __dev_addr_sync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count);
1482extern void __dev_addr_unsync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count); 1485extern void __dev_addr_unsync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count);
1483extern void dev_set_promiscuity(struct net_device *dev, int inc); 1486extern int dev_set_promiscuity(struct net_device *dev, int inc);
1484extern void dev_set_allmulti(struct net_device *dev, int inc); 1487extern int dev_set_allmulti(struct net_device *dev, int inc);
1485extern void netdev_state_change(struct net_device *dev); 1488extern void netdev_state_change(struct net_device *dev);
1489extern void netdev_bonding_change(struct net_device *dev);
1486extern void netdev_features_change(struct net_device *dev); 1490extern void netdev_features_change(struct net_device *dev);
1487/* Load a device via the kmod */ 1491/* Load a device via the kmod */
1488extern void dev_load(struct net *net, const char *name); 1492extern void dev_load(struct net *net, const char *name);
@@ -1509,6 +1513,9 @@ extern void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos);
1509extern void dev_seq_stop(struct seq_file *seq, void *v); 1513extern void dev_seq_stop(struct seq_file *seq, void *v);
1510#endif 1514#endif
1511 1515
1516extern int netdev_class_create_file(struct class_attribute *class_attr);
1517extern void netdev_class_remove_file(struct class_attribute *class_attr);
1518
1512extern void linkwatch_run_queue(void); 1519extern void linkwatch_run_queue(void);
1513 1520
1514extern int netdev_compute_features(unsigned long all, unsigned long one); 1521extern int netdev_compute_features(unsigned long all, unsigned long one);
diff --git a/include/linux/netfilter/nfnetlink_conntrack.h b/include/linux/netfilter/nfnetlink_conntrack.h
index 0a383ac083cb..759bc043dc65 100644
--- a/include/linux/netfilter/nfnetlink_conntrack.h
+++ b/include/linux/netfilter/nfnetlink_conntrack.h
@@ -81,6 +81,7 @@ enum ctattr_protoinfo {
81 CTA_PROTOINFO_UNSPEC, 81 CTA_PROTOINFO_UNSPEC,
82 CTA_PROTOINFO_TCP, 82 CTA_PROTOINFO_TCP,
83 CTA_PROTOINFO_DCCP, 83 CTA_PROTOINFO_DCCP,
84 CTA_PROTOINFO_SCTP,
84 __CTA_PROTOINFO_MAX 85 __CTA_PROTOINFO_MAX
85}; 86};
86#define CTA_PROTOINFO_MAX (__CTA_PROTOINFO_MAX - 1) 87#define CTA_PROTOINFO_MAX (__CTA_PROTOINFO_MAX - 1)
@@ -103,6 +104,15 @@ enum ctattr_protoinfo_dccp {
103}; 104};
104#define CTA_PROTOINFO_DCCP_MAX (__CTA_PROTOINFO_DCCP_MAX - 1) 105#define CTA_PROTOINFO_DCCP_MAX (__CTA_PROTOINFO_DCCP_MAX - 1)
105 106
107enum ctattr_protoinfo_sctp {
108 CTA_PROTOINFO_SCTP_UNSPEC,
109 CTA_PROTOINFO_SCTP_STATE,
110 CTA_PROTOINFO_SCTP_VTAG_ORIGINAL,
111 CTA_PROTOINFO_SCTP_VTAG_REPLY,
112 __CTA_PROTOINFO_SCTP_MAX
113};
114#define CTA_PROTOINFO_SCTP_MAX (__CTA_PROTOINFO_SCTP_MAX - 1)
115
106enum ctattr_counters { 116enum ctattr_counters {
107 CTA_COUNTERS_UNSPEC, 117 CTA_COUNTERS_UNSPEC,
108 CTA_COUNTERS_PACKETS, /* old 64bit counters */ 118 CTA_COUNTERS_PACKETS, /* old 64bit counters */
diff --git a/include/linux/netfilter_bridge/ebt_ip6.h b/include/linux/netfilter_bridge/ebt_ip6.h
new file mode 100644
index 000000000000..2273c3ae33ca
--- /dev/null
+++ b/include/linux/netfilter_bridge/ebt_ip6.h
@@ -0,0 +1,40 @@
1/*
2 * ebt_ip6
3 *
4 * Authors:
5 * Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
6 * Manohar Castelino <manohar.r.castelino@intel.com>
7 *
8 * Jan 11, 2008
9 *
10 */
11
12#ifndef __LINUX_BRIDGE_EBT_IP6_H
13#define __LINUX_BRIDGE_EBT_IP6_H
14
15#define EBT_IP6_SOURCE 0x01
16#define EBT_IP6_DEST 0x02
17#define EBT_IP6_TCLASS 0x04
18#define EBT_IP6_PROTO 0x08
19#define EBT_IP6_SPORT 0x10
20#define EBT_IP6_DPORT 0x20
21#define EBT_IP6_MASK (EBT_IP6_SOURCE | EBT_IP6_DEST | EBT_IP6_TCLASS |\
22 EBT_IP6_PROTO | EBT_IP6_SPORT | EBT_IP6_DPORT)
23#define EBT_IP6_MATCH "ip6"
24
25/* the same values are used for the invflags */
26struct ebt_ip6_info
27{
28 struct in6_addr saddr;
29 struct in6_addr daddr;
30 struct in6_addr smsk;
31 struct in6_addr dmsk;
32 uint8_t tclass;
33 uint8_t protocol;
34 uint8_t bitmask;
35 uint8_t invflags;
36 uint16_t sport[2];
37 uint16_t dport[2];
38};
39
40#endif
diff --git a/include/linux/netfilter_bridge/ebt_log.h b/include/linux/netfilter_bridge/ebt_log.h
index 96e231ae7554..b76e653157e5 100644
--- a/include/linux/netfilter_bridge/ebt_log.h
+++ b/include/linux/netfilter_bridge/ebt_log.h
@@ -4,7 +4,8 @@
4#define EBT_LOG_IP 0x01 /* if the frame is made by ip, log the ip information */ 4#define EBT_LOG_IP 0x01 /* if the frame is made by ip, log the ip information */
5#define EBT_LOG_ARP 0x02 5#define EBT_LOG_ARP 0x02
6#define EBT_LOG_NFLOG 0x04 6#define EBT_LOG_NFLOG 0x04
7#define EBT_LOG_MASK (EBT_LOG_IP | EBT_LOG_ARP) 7#define EBT_LOG_IP6 0x08
8#define EBT_LOG_MASK (EBT_LOG_IP | EBT_LOG_ARP | EBT_LOG_IP6)
8#define EBT_LOG_PREFIX_SIZE 30 9#define EBT_LOG_PREFIX_SIZE 30
9#define EBT_LOG_WATCHER "log" 10#define EBT_LOG_WATCHER "log"
10 11
diff --git a/include/linux/netfilter_ipv4.h b/include/linux/netfilter_ipv4.h
index 650318b0c405..29c7727ff0e8 100644
--- a/include/linux/netfilter_ipv4.h
+++ b/include/linux/netfilter_ipv4.h
@@ -60,6 +60,7 @@ enum nf_ip_hook_priorities {
60 NF_IP_PRI_MANGLE = -150, 60 NF_IP_PRI_MANGLE = -150,
61 NF_IP_PRI_NAT_DST = -100, 61 NF_IP_PRI_NAT_DST = -100,
62 NF_IP_PRI_FILTER = 0, 62 NF_IP_PRI_FILTER = 0,
63 NF_IP_PRI_SECURITY = 50,
63 NF_IP_PRI_NAT_SRC = 100, 64 NF_IP_PRI_NAT_SRC = 100,
64 NF_IP_PRI_SELINUX_LAST = 225, 65 NF_IP_PRI_SELINUX_LAST = 225,
65 NF_IP_PRI_CONNTRACK_CONFIRM = INT_MAX, 66 NF_IP_PRI_CONNTRACK_CONFIRM = INT_MAX,
diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h
index 3475a65dae9b..fd50988b83ec 100644
--- a/include/linux/netfilter_ipv6.h
+++ b/include/linux/netfilter_ipv6.h
@@ -64,6 +64,7 @@ enum nf_ip6_hook_priorities {
64 NF_IP6_PRI_MANGLE = -150, 64 NF_IP6_PRI_MANGLE = -150,
65 NF_IP6_PRI_NAT_DST = -100, 65 NF_IP6_PRI_NAT_DST = -100,
66 NF_IP6_PRI_FILTER = 0, 66 NF_IP6_PRI_FILTER = 0,
67 NF_IP6_PRI_SECURITY = 50,
67 NF_IP6_PRI_NAT_SRC = 100, 68 NF_IP6_PRI_NAT_SRC = 100,
68 NF_IP6_PRI_SELINUX_LAST = 225, 69 NF_IP6_PRI_SELINUX_LAST = 225,
69 NF_IP6_PRI_LAST = INT_MAX, 70 NF_IP6_PRI_LAST = INT_MAX,
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index bec1062a25a1..9ff1b54908f3 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -193,7 +193,7 @@ extern int netlink_unregister_notifier(struct notifier_block *nb);
193 193
194/* finegrained unicast helpers: */ 194/* finegrained unicast helpers: */
195struct sock *netlink_getsockbyfilp(struct file *filp); 195struct sock *netlink_getsockbyfilp(struct file *filp);
196int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, 196int netlink_attachskb(struct sock *sk, struct sk_buff *skb,
197 long *timeo, struct sock *ssk); 197 long *timeo, struct sock *ssk);
198void netlink_detachskb(struct sock *sk, struct sk_buff *skb); 198void netlink_detachskb(struct sock *sk, struct sk_buff *skb);
199int netlink_sendskb(struct sock *sk, struct sk_buff *skb); 199int netlink_sendskb(struct sock *sk, struct sk_buff *skb);
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index ea6517e58b04..2be7c63bc0f2 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -122,13 +122,13 @@ enum nl80211_commands {
122 NL80211_CMD_NEW_STATION, 122 NL80211_CMD_NEW_STATION,
123 NL80211_CMD_DEL_STATION, 123 NL80211_CMD_DEL_STATION,
124 124
125 /* add commands here */
126
127 NL80211_CMD_GET_MPATH, 125 NL80211_CMD_GET_MPATH,
128 NL80211_CMD_SET_MPATH, 126 NL80211_CMD_SET_MPATH,
129 NL80211_CMD_NEW_MPATH, 127 NL80211_CMD_NEW_MPATH,
130 NL80211_CMD_DEL_MPATH, 128 NL80211_CMD_DEL_MPATH,
131 129
130 /* add commands here */
131
132 /* used to define NL80211_CMD_MAX below */ 132 /* used to define NL80211_CMD_MAX below */
133 __NL80211_CMD_AFTER_LAST, 133 __NL80211_CMD_AFTER_LAST,
134 NL80211_CMD_MAX = __NL80211_CMD_AFTER_LAST - 1 134 NL80211_CMD_MAX = __NL80211_CMD_AFTER_LAST - 1
@@ -230,18 +230,21 @@ enum nl80211_attrs {
230 230
231 NL80211_ATTR_MNTR_FLAGS, 231 NL80211_ATTR_MNTR_FLAGS,
232 232
233 /* add attributes here, update the policy in nl80211.c */
234
235 NL80211_ATTR_MESH_ID, 233 NL80211_ATTR_MESH_ID,
236 NL80211_ATTR_STA_PLINK_ACTION, 234 NL80211_ATTR_STA_PLINK_ACTION,
237 NL80211_ATTR_MPATH_NEXT_HOP, 235 NL80211_ATTR_MPATH_NEXT_HOP,
238 NL80211_ATTR_MPATH_INFO, 236 NL80211_ATTR_MPATH_INFO,
239 237
238 /* add attributes here, update the policy in nl80211.c */
239
240 __NL80211_ATTR_AFTER_LAST, 240 __NL80211_ATTR_AFTER_LAST,
241 NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1 241 NL80211_ATTR_MAX = __NL80211_ATTR_AFTER_LAST - 1
242}; 242};
243 243
244#define NL80211_MAX_SUPP_RATES 32 244#define NL80211_MAX_SUPP_RATES 32
245#define NL80211_TKIP_DATA_OFFSET_ENCR_KEY 0
246#define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16
247#define NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY 24
245 248
246/** 249/**
247 * enum nl80211_iftype - (virtual) interface types 250 * enum nl80211_iftype - (virtual) interface types
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index 0ff6224d172a..bd3d72ddf333 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -197,6 +197,7 @@ static inline int notifier_to_errno(int ret)
197#define NETDEV_GOING_DOWN 0x0009 197#define NETDEV_GOING_DOWN 0x0009
198#define NETDEV_CHANGENAME 0x000A 198#define NETDEV_CHANGENAME 0x000A
199#define NETDEV_FEAT_CHANGE 0x000B 199#define NETDEV_FEAT_CHANGE 0x000B
200#define NETDEV_BONDING_FAILOVER 0x000C
200 201
201#define SYS_DOWN 0x0001 /* Notify of system down */ 202#define SYS_DOWN 0x0001 /* Notify of system down */
202#define SYS_RESTART SYS_DOWN 203#define SYS_RESTART SYS_DOWN
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index eafc9d6d2b35..e74b14acf8e0 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1949,6 +1949,8 @@
1949#define PCI_DEVICE_ID_NX2_5708 0x164c 1949#define PCI_DEVICE_ID_NX2_5708 0x164c
1950#define PCI_DEVICE_ID_TIGON3_5702FE 0x164d 1950#define PCI_DEVICE_ID_TIGON3_5702FE 0x164d
1951#define PCI_DEVICE_ID_NX2_57710 0x164e 1951#define PCI_DEVICE_ID_NX2_57710 0x164e
1952#define PCI_DEVICE_ID_NX2_57711 0x164f
1953#define PCI_DEVICE_ID_NX2_57711E 0x1650
1952#define PCI_DEVICE_ID_TIGON3_5705 0x1653 1954#define PCI_DEVICE_ID_TIGON3_5705 0x1653
1953#define PCI_DEVICE_ID_TIGON3_5705_2 0x1654 1955#define PCI_DEVICE_ID_TIGON3_5705_2 0x1654
1954#define PCI_DEVICE_ID_TIGON3_5720 0x1658 1956#define PCI_DEVICE_ID_TIGON3_5720 0x1658
@@ -1981,6 +1983,7 @@
1981#define PCI_DEVICE_ID_TIGON3_5787M 0x1693 1983#define PCI_DEVICE_ID_TIGON3_5787M 0x1693
1982#define PCI_DEVICE_ID_TIGON3_5782 0x1696 1984#define PCI_DEVICE_ID_TIGON3_5782 0x1696
1983#define PCI_DEVICE_ID_TIGON3_5784 0x1698 1985#define PCI_DEVICE_ID_TIGON3_5784 0x1698
1986#define PCI_DEVICE_ID_TIGON3_5785 0x1699
1984#define PCI_DEVICE_ID_TIGON3_5786 0x169a 1987#define PCI_DEVICE_ID_TIGON3_5786 0x169a
1985#define PCI_DEVICE_ID_TIGON3_5787 0x169b 1988#define PCI_DEVICE_ID_TIGON3_5787 0x169b
1986#define PCI_DEVICE_ID_TIGON3_5788 0x169c 1989#define PCI_DEVICE_ID_TIGON3_5788 0x169c
diff --git a/include/linux/ppp-comp.h b/include/linux/ppp-comp.h
index e86a7a5cf355..b8d4ddd22736 100644
--- a/include/linux/ppp-comp.h
+++ b/include/linux/ppp-comp.h
@@ -23,8 +23,6 @@
23 * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO 23 * ON AN "AS IS" BASIS, AND THE AUSTRALIAN NATIONAL UNIVERSITY HAS NO
24 * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, 24 * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
25 * OR MODIFICATIONS. 25 * OR MODIFICATIONS.
26 *
27 * $Id: ppp-comp.h,v 1.6 1997/11/27 06:04:44 paulus Exp $
28 */ 26 */
29 27
30/* 28/*
diff --git a/include/linux/ppp_defs.h b/include/linux/ppp_defs.h
index c6b13ff85028..6e8adc77522c 100644
--- a/include/linux/ppp_defs.h
+++ b/include/linux/ppp_defs.h
@@ -1,5 +1,3 @@
1/* $Id: ppp_defs.h,v 1.2 1994/09/21 01:31:06 paulus Exp $ */
2
3/* 1/*
4 * ppp_defs.h - PPP definitions. 2 * ppp_defs.h - PPP definitions.
5 * 3 *
diff --git a/include/linux/rfkill.h b/include/linux/rfkill.h
index e3ab21d7fc7f..c5f6e54ec6ae 100644
--- a/include/linux/rfkill.h
+++ b/include/linux/rfkill.h
@@ -34,26 +34,37 @@
34 * RFKILL_TYPE_BLUETOOTH: switch is on a bluetooth device. 34 * RFKILL_TYPE_BLUETOOTH: switch is on a bluetooth device.
35 * RFKILL_TYPE_UWB: switch is on a ultra wideband device. 35 * RFKILL_TYPE_UWB: switch is on a ultra wideband device.
36 * RFKILL_TYPE_WIMAX: switch is on a WiMAX device. 36 * RFKILL_TYPE_WIMAX: switch is on a WiMAX device.
37 * RFKILL_TYPE_WWAN: switch is on a wireless WAN device.
37 */ 38 */
38enum rfkill_type { 39enum rfkill_type {
39 RFKILL_TYPE_WLAN , 40 RFKILL_TYPE_WLAN ,
40 RFKILL_TYPE_BLUETOOTH, 41 RFKILL_TYPE_BLUETOOTH,
41 RFKILL_TYPE_UWB, 42 RFKILL_TYPE_UWB,
42 RFKILL_TYPE_WIMAX, 43 RFKILL_TYPE_WIMAX,
44 RFKILL_TYPE_WWAN,
43 RFKILL_TYPE_MAX, 45 RFKILL_TYPE_MAX,
44}; 46};
45 47
46enum rfkill_state { 48enum rfkill_state {
47 RFKILL_STATE_OFF = 0, 49 RFKILL_STATE_SOFT_BLOCKED = 0, /* Radio output blocked */
48 RFKILL_STATE_ON = 1, 50 RFKILL_STATE_UNBLOCKED = 1, /* Radio output allowed */
51 RFKILL_STATE_HARD_BLOCKED = 2, /* Output blocked, non-overrideable */
49}; 52};
50 53
54/*
55 * These are DEPRECATED, drivers using them should be verified to
56 * comply with the rfkill usage guidelines in Documentation/rfkill.txt
57 * and then converted to use the new names for rfkill_state
58 */
59#define RFKILL_STATE_OFF RFKILL_STATE_SOFT_BLOCKED
60#define RFKILL_STATE_ON RFKILL_STATE_UNBLOCKED
61
51/** 62/**
52 * struct rfkill - rfkill control structure. 63 * struct rfkill - rfkill control structure.
53 * @name: Name of the switch. 64 * @name: Name of the switch.
54 * @type: Radio type which the button controls, the value stored 65 * @type: Radio type which the button controls, the value stored
55 * here should be a value from enum rfkill_type. 66 * here should be a value from enum rfkill_type.
56 * @state: State of the switch (on/off). 67 * @state: State of the switch, "UNBLOCKED" means radio can operate.
57 * @user_claim_unsupported: Whether the hardware supports exclusive 68 * @user_claim_unsupported: Whether the hardware supports exclusive
58 * RF-kill control by userspace. Set this before registering. 69 * RF-kill control by userspace. Set this before registering.
59 * @user_claim: Set when the switch is controlled exlusively by userspace. 70 * @user_claim: Set when the switch is controlled exlusively by userspace.
@@ -61,6 +72,12 @@ enum rfkill_state {
61 * @data: Pointer to the RF button drivers private data which will be 72 * @data: Pointer to the RF button drivers private data which will be
62 * passed along when toggling radio state. 73 * passed along when toggling radio state.
63 * @toggle_radio(): Mandatory handler to control state of the radio. 74 * @toggle_radio(): Mandatory handler to control state of the radio.
75 * only RFKILL_STATE_SOFT_BLOCKED and RFKILL_STATE_UNBLOCKED are
76 * valid parameters.
77 * @get_state(): handler to read current radio state from hardware,
78 * may be called from atomic context, should return 0 on success.
79 * Either this handler OR judicious use of rfkill_force_state() is
80 * MANDATORY for any driver capable of RFKILL_STATE_HARD_BLOCKED.
64 * @led_trigger: A LED trigger for this button's LED. 81 * @led_trigger: A LED trigger for this button's LED.
65 * @dev: Device structure integrating the switch into device tree. 82 * @dev: Device structure integrating the switch into device tree.
66 * @node: Used to place switch into list of all switches known to the 83 * @node: Used to place switch into list of all switches known to the
@@ -80,6 +97,7 @@ struct rfkill {
80 97
81 void *data; 98 void *data;
82 int (*toggle_radio)(void *data, enum rfkill_state state); 99 int (*toggle_radio)(void *data, enum rfkill_state state);
100 int (*get_state)(void *data, enum rfkill_state *state);
83 101
84#ifdef CONFIG_RFKILL_LEDS 102#ifdef CONFIG_RFKILL_LEDS
85 struct led_trigger led_trigger; 103 struct led_trigger led_trigger;
@@ -95,6 +113,21 @@ void rfkill_free(struct rfkill *rfkill);
95int rfkill_register(struct rfkill *rfkill); 113int rfkill_register(struct rfkill *rfkill);
96void rfkill_unregister(struct rfkill *rfkill); 114void rfkill_unregister(struct rfkill *rfkill);
97 115
116int rfkill_force_state(struct rfkill *rfkill, enum rfkill_state state);
117
118/**
119 * rfkill_state_complement - return complementar state
120 * @state: state to return the complement of
121 *
122 * Returns RFKILL_STATE_SOFT_BLOCKED if @state is RFKILL_STATE_UNBLOCKED,
123 * returns RFKILL_STATE_UNBLOCKED otherwise.
124 */
125static inline enum rfkill_state rfkill_state_complement(enum rfkill_state state)
126{
127 return (state == RFKILL_STATE_UNBLOCKED) ?
128 RFKILL_STATE_SOFT_BLOCKED : RFKILL_STATE_UNBLOCKED;
129}
130
98/** 131/**
99 * rfkill_get_led_name - Get the LED trigger name for the button's LED. 132 * rfkill_get_led_name - Get the LED trigger name for the button's LED.
100 * This function might return a NULL pointer if registering of the 133 * This function might return a NULL pointer if registering of the
@@ -110,4 +143,11 @@ static inline char *rfkill_get_led_name(struct rfkill *rfkill)
110#endif 143#endif
111} 144}
112 145
146/* rfkill notification chain */
147#define RFKILL_STATE_CHANGED 0x0001 /* state of a normal rfkill
148 switch has changed */
149
150int register_rfkill_notifier(struct notifier_block *nb);
151int unregister_rfkill_notifier(struct notifier_block *nb);
152
113#endif /* RFKILL_H */ 153#endif /* RFKILL_H */
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 299ec4b31412..2220b9e2dab0 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1702,6 +1702,20 @@ static inline int skb_is_gso_v6(const struct sk_buff *skb)
1702 return skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6; 1702 return skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6;
1703} 1703}
1704 1704
1705extern void __skb_warn_lro_forwarding(const struct sk_buff *skb);
1706
1707static inline bool skb_warn_if_lro(const struct sk_buff *skb)
1708{
1709 /* LRO sets gso_size but not gso_type, whereas if GSO is really
1710 * wanted then gso_type will be set. */
1711 struct skb_shared_info *shinfo = skb_shinfo(skb);
1712 if (shinfo->gso_size != 0 && unlikely(shinfo->gso_type == 0)) {
1713 __skb_warn_lro_forwarding(skb);
1714 return true;
1715 }
1716 return false;
1717}
1718
1705static inline void skb_forward_csum(struct sk_buff *skb) 1719static inline void skb_forward_csum(struct sk_buff *skb)
1706{ 1720{
1707 /* Unfortunately we don't support this one. Any brave souls? */ 1721 /* Unfortunately we don't support this one. Any brave souls? */
diff --git a/include/linux/smc911x.h b/include/linux/smc911x.h
new file mode 100644
index 000000000000..b58f54c24183
--- /dev/null
+++ b/include/linux/smc911x.h
@@ -0,0 +1,12 @@
1#ifndef __SMC911X_H__
2#define __SMC911X_H__
3
4#define SMC911X_USE_16BIT (1 << 0)
5#define SMC911X_USE_32BIT (1 << 1)
6
7struct smc911x_platdata {
8 unsigned long flags;
9 unsigned long irq_flags; /* IRQF_... */
10};
11
12#endif /* __SMC911X_H__ */
diff --git a/include/linux/sonet.h b/include/linux/sonet.h
index 753680296e17..67ad11fcf88b 100644
--- a/include/linux/sonet.h
+++ b/include/linux/sonet.h
@@ -34,7 +34,7 @@ struct sonet_stats {
34 /* clear error insertion */ 34 /* clear error insertion */
35#define SONET_GETDIAG _IOR('a',ATMIOC_PHYTYP+4,int) 35#define SONET_GETDIAG _IOR('a',ATMIOC_PHYTYP+4,int)
36 /* query error insertion */ 36 /* query error insertion */
37#define SONET_SETFRAMING _IO('a',ATMIOC_PHYTYP+5) 37#define SONET_SETFRAMING _IOW('a',ATMIOC_PHYTYP+5,int)
38 /* set framing mode (SONET/SDH) */ 38 /* set framing mode (SONET/SDH) */
39#define SONET_GETFRAMING _IOR('a',ATMIOC_PHYTYP+6,int) 39#define SONET_GETFRAMING _IOR('a',ATMIOC_PHYTYP+6,int)
40 /* get framing mode */ 40 /* get framing mode */
diff --git a/include/linux/ssb/ssb.h b/include/linux/ssb/ssb.h
index 50dfd0dc4093..0fe5a0ded3ea 100644
--- a/include/linux/ssb/ssb.h
+++ b/include/linux/ssb/ssb.h
@@ -137,9 +137,6 @@ struct ssb_device {
137 const struct ssb_bus_ops *ops; 137 const struct ssb_bus_ops *ops;
138 138
139 struct device *dev; 139 struct device *dev;
140 /* Pointer to the device that has to be used for
141 * any DMA related operation. */
142 struct device *dma_dev;
143 140
144 struct ssb_bus *bus; 141 struct ssb_bus *bus;
145 struct ssb_device_id id; 142 struct ssb_device_id id;
@@ -399,13 +396,151 @@ static inline void ssb_block_write(struct ssb_device *dev, const void *buffer,
399#endif /* CONFIG_SSB_BLOCKIO */ 396#endif /* CONFIG_SSB_BLOCKIO */
400 397
401 398
399/* The SSB DMA API. Use this API for any DMA operation on the device.
400 * This API basically is a wrapper that calls the correct DMA API for
401 * the host device type the SSB device is attached to. */
402
402/* Translation (routing) bits that need to be ORed to DMA 403/* Translation (routing) bits that need to be ORed to DMA
403 * addresses before they are given to a device. */ 404 * addresses before they are given to a device. */
404extern u32 ssb_dma_translation(struct ssb_device *dev); 405extern u32 ssb_dma_translation(struct ssb_device *dev);
405#define SSB_DMA_TRANSLATION_MASK 0xC0000000 406#define SSB_DMA_TRANSLATION_MASK 0xC0000000
406#define SSB_DMA_TRANSLATION_SHIFT 30 407#define SSB_DMA_TRANSLATION_SHIFT 30
407 408
408extern int ssb_dma_set_mask(struct ssb_device *ssb_dev, u64 mask); 409extern int ssb_dma_set_mask(struct ssb_device *dev, u64 mask);
410
411extern void * ssb_dma_alloc_consistent(struct ssb_device *dev, size_t size,
412 dma_addr_t *dma_handle, gfp_t gfp_flags);
413extern void ssb_dma_free_consistent(struct ssb_device *dev, size_t size,
414 void *vaddr, dma_addr_t dma_handle,
415 gfp_t gfp_flags);
416
417static inline void __cold __ssb_dma_not_implemented(struct ssb_device *dev)
418{
419#ifdef CONFIG_SSB_DEBUG
420 printk(KERN_ERR "SSB: BUG! Calling DMA API for "
421 "unsupported bustype %d\n", dev->bus->bustype);
422#endif /* DEBUG */
423}
424
425static inline int ssb_dma_mapping_error(struct ssb_device *dev, dma_addr_t addr)
426{
427 switch (dev->bus->bustype) {
428 case SSB_BUSTYPE_PCI:
429 return pci_dma_mapping_error(addr);
430 case SSB_BUSTYPE_SSB:
431 return dma_mapping_error(addr);
432 default:
433 __ssb_dma_not_implemented(dev);
434 }
435 return -ENOSYS;
436}
437
438static inline dma_addr_t ssb_dma_map_single(struct ssb_device *dev, void *p,
439 size_t size, enum dma_data_direction dir)
440{
441 switch (dev->bus->bustype) {
442 case SSB_BUSTYPE_PCI:
443 return pci_map_single(dev->bus->host_pci, p, size, dir);
444 case SSB_BUSTYPE_SSB:
445 return dma_map_single(dev->dev, p, size, dir);
446 default:
447 __ssb_dma_not_implemented(dev);
448 }
449 return 0;
450}
451
452static inline void ssb_dma_unmap_single(struct ssb_device *dev, dma_addr_t dma_addr,
453 size_t size, enum dma_data_direction dir)
454{
455 switch (dev->bus->bustype) {
456 case SSB_BUSTYPE_PCI:
457 pci_unmap_single(dev->bus->host_pci, dma_addr, size, dir);
458 return;
459 case SSB_BUSTYPE_SSB:
460 dma_unmap_single(dev->dev, dma_addr, size, dir);
461 return;
462 default:
463 __ssb_dma_not_implemented(dev);
464 }
465}
466
467static inline void ssb_dma_sync_single_for_cpu(struct ssb_device *dev,
468 dma_addr_t dma_addr,
469 size_t size,
470 enum dma_data_direction dir)
471{
472 switch (dev->bus->bustype) {
473 case SSB_BUSTYPE_PCI:
474 pci_dma_sync_single_for_cpu(dev->bus->host_pci, dma_addr,
475 size, dir);
476 return;
477 case SSB_BUSTYPE_SSB:
478 dma_sync_single_for_cpu(dev->dev, dma_addr, size, dir);
479 return;
480 default:
481 __ssb_dma_not_implemented(dev);
482 }
483}
484
485static inline void ssb_dma_sync_single_for_device(struct ssb_device *dev,
486 dma_addr_t dma_addr,
487 size_t size,
488 enum dma_data_direction dir)
489{
490 switch (dev->bus->bustype) {
491 case SSB_BUSTYPE_PCI:
492 pci_dma_sync_single_for_device(dev->bus->host_pci, dma_addr,
493 size, dir);
494 return;
495 case SSB_BUSTYPE_SSB:
496 dma_sync_single_for_device(dev->dev, dma_addr, size, dir);
497 return;
498 default:
499 __ssb_dma_not_implemented(dev);
500 }
501}
502
503static inline void ssb_dma_sync_single_range_for_cpu(struct ssb_device *dev,
504 dma_addr_t dma_addr,
505 unsigned long offset,
506 size_t size,
507 enum dma_data_direction dir)
508{
509 switch (dev->bus->bustype) {
510 case SSB_BUSTYPE_PCI:
511 /* Just sync everything. That's all the PCI API can do. */
512 pci_dma_sync_single_for_cpu(dev->bus->host_pci, dma_addr,
513 offset + size, dir);
514 return;
515 case SSB_BUSTYPE_SSB:
516 dma_sync_single_range_for_cpu(dev->dev, dma_addr, offset,
517 size, dir);
518 return;
519 default:
520 __ssb_dma_not_implemented(dev);
521 }
522}
523
524static inline void ssb_dma_sync_single_range_for_device(struct ssb_device *dev,
525 dma_addr_t dma_addr,
526 unsigned long offset,
527 size_t size,
528 enum dma_data_direction dir)
529{
530 switch (dev->bus->bustype) {
531 case SSB_BUSTYPE_PCI:
532 /* Just sync everything. That's all the PCI API can do. */
533 pci_dma_sync_single_for_device(dev->bus->host_pci, dma_addr,
534 offset + size, dir);
535 return;
536 case SSB_BUSTYPE_SSB:
537 dma_sync_single_range_for_device(dev->dev, dma_addr, offset,
538 size, dir);
539 return;
540 default:
541 __ssb_dma_not_implemented(dev);
542 }
543}
409 544
410 545
411#ifdef CONFIG_SSB_PCIHOST 546#ifdef CONFIG_SSB_PCIHOST
diff --git a/include/linux/sunrpc/auth_gss.h b/include/linux/sunrpc/auth_gss.h
index fec6899bf355..d48d4e605f74 100644
--- a/include/linux/sunrpc/auth_gss.h
+++ b/include/linux/sunrpc/auth_gss.h
@@ -7,8 +7,6 @@
7 * Andy Adamson <andros@umich.edu> 7 * Andy Adamson <andros@umich.edu>
8 * Bruce Fields <bfields@umich.edu> 8 * Bruce Fields <bfields@umich.edu>
9 * Copyright (c) 2000 The Regents of the University of Michigan 9 * Copyright (c) 2000 The Regents of the University of Michigan
10 *
11 * $Id$
12 */ 10 */
13 11
14#ifndef _LINUX_SUNRPC_AUTH_GSS_H 12#ifndef _LINUX_SUNRPC_AUTH_GSS_H
diff --git a/include/linux/sunrpc/gss_api.h b/include/linux/sunrpc/gss_api.h
index 459c5fc11d51..03f33330ece2 100644
--- a/include/linux/sunrpc/gss_api.h
+++ b/include/linux/sunrpc/gss_api.h
@@ -7,8 +7,6 @@
7 * Andy Adamson <andros@umich.edu> 7 * Andy Adamson <andros@umich.edu>
8 * Bruce Fields <bfields@umich.edu> 8 * Bruce Fields <bfields@umich.edu>
9 * Copyright (c) 2000 The Regents of the University of Michigan 9 * Copyright (c) 2000 The Regents of the University of Michigan
10 *
11 * $Id$
12 */ 10 */
13 11
14#ifndef _LINUX_SUNRPC_GSS_API_H 12#ifndef _LINUX_SUNRPC_GSS_API_H
diff --git a/include/linux/sunrpc/svcauth_gss.h b/include/linux/sunrpc/svcauth_gss.h
index 417a1def56db..c9165d9771a8 100644
--- a/include/linux/sunrpc/svcauth_gss.h
+++ b/include/linux/sunrpc/svcauth_gss.h
@@ -3,9 +3,6 @@
3 * 3 *
4 * Bruce Fields <bfields@umich.edu> 4 * Bruce Fields <bfields@umich.edu>
5 * Copyright (c) 2002 The Regents of the Unviersity of Michigan 5 * Copyright (c) 2002 The Regents of the Unviersity of Michigan
6 *
7 * $Id$
8 *
9 */ 6 */
10 7
11#ifndef _LINUX_SUNRPC_SVCAUTH_GSS_H 8#ifndef _LINUX_SUNRPC_SVCAUTH_GSS_H
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index b31b6b74aa28..07e79bdb9cdf 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -291,10 +291,9 @@ struct tcp_sock {
291 u32 rcv_ssthresh; /* Current window clamp */ 291 u32 rcv_ssthresh; /* Current window clamp */
292 292
293 u32 frto_highmark; /* snd_nxt when RTO occurred */ 293 u32 frto_highmark; /* snd_nxt when RTO occurred */
294 u8 reordering; /* Packet reordering metric. */ 294 u16 advmss; /* Advertised MSS */
295 u8 frto_counter; /* Number of new acks after RTO */ 295 u8 frto_counter; /* Number of new acks after RTO */
296 u8 nonagle; /* Disable Nagle algorithm? */ 296 u8 nonagle; /* Disable Nagle algorithm? */
297 u8 keepalive_probes; /* num of allowed keep alive probes */
298 297
299/* RTT measurement */ 298/* RTT measurement */
300 u32 srtt; /* smoothed round trip time << 3 */ 299 u32 srtt; /* smoothed round trip time << 3 */
@@ -305,6 +304,10 @@ struct tcp_sock {
305 304
306 u32 packets_out; /* Packets which are "in flight" */ 305 u32 packets_out; /* Packets which are "in flight" */
307 u32 retrans_out; /* Retransmitted packets out */ 306 u32 retrans_out; /* Retransmitted packets out */
307
308 u16 urg_data; /* Saved octet of OOB data and control flags */
309 u8 urg_mode; /* In urgent mode */
310 u8 ecn_flags; /* ECN status bits. */
308/* 311/*
309 * Options received (usually on last packet, some only on SYN packets). 312 * Options received (usually on last packet, some only on SYN packets).
310 */ 313 */
@@ -320,13 +323,24 @@ struct tcp_sock {
320 u32 snd_cwnd_used; 323 u32 snd_cwnd_used;
321 u32 snd_cwnd_stamp; 324 u32 snd_cwnd_stamp;
322 325
323 struct sk_buff_head out_of_order_queue; /* Out of order segments go here */
324
325 u32 rcv_wnd; /* Current receiver window */ 326 u32 rcv_wnd; /* Current receiver window */
326 u32 write_seq; /* Tail(+1) of data held in tcp send buffer */ 327 u32 write_seq; /* Tail(+1) of data held in tcp send buffer */
327 u32 pushed_seq; /* Last pushed seq, required to talk to windows */ 328 u32 pushed_seq; /* Last pushed seq, required to talk to windows */
329 u32 lost_out; /* Lost packets */
330 u32 sacked_out; /* SACK'd packets */
331 u32 fackets_out; /* FACK'd packets */
332 u32 tso_deferred;
333 u32 bytes_acked; /* Appropriate Byte Counting - RFC3465 */
328 334
329/* SACKs data */ 335 /* from STCP, retrans queue hinting */
336 struct sk_buff* lost_skb_hint;
337 struct sk_buff *scoreboard_skb_hint;
338 struct sk_buff *retransmit_skb_hint;
339 struct sk_buff *forward_skb_hint;
340
341 struct sk_buff_head out_of_order_queue; /* Out of order segments go here */
342
343 /* SACKs data, these 2 need to be together (see tcp_build_and_update_options) */
330 struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */ 344 struct tcp_sack_block duplicate_sack[1]; /* D-SACK block */
331 struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/ 345 struct tcp_sack_block selective_acks[4]; /* The SACKS themselves*/
332 346
@@ -337,23 +351,14 @@ struct tcp_sock {
337 * sacked_out > 0) 351 * sacked_out > 0)
338 */ 352 */
339 353
340 /* from STCP, retrans queue hinting */
341 struct sk_buff* lost_skb_hint;
342
343 struct sk_buff *scoreboard_skb_hint;
344 struct sk_buff *retransmit_skb_hint;
345 struct sk_buff *forward_skb_hint;
346
347 int lost_cnt_hint; 354 int lost_cnt_hint;
348 int retransmit_cnt_hint; 355 int retransmit_cnt_hint;
349 356
350 u32 lost_retrans_low; /* Sent seq after any rxmit (lowest) */ 357 u32 lost_retrans_low; /* Sent seq after any rxmit (lowest) */
351 358
352 u16 advmss; /* Advertised MSS */ 359 u8 reordering; /* Packet reordering metric. */
360 u8 keepalive_probes; /* num of allowed keep alive probes */
353 u32 prior_ssthresh; /* ssthresh saved at recovery start */ 361 u32 prior_ssthresh; /* ssthresh saved at recovery start */
354 u32 lost_out; /* Lost packets */
355 u32 sacked_out; /* SACK'd packets */
356 u32 fackets_out; /* FACK'd packets */
357 u32 high_seq; /* snd_nxt at onset of congestion */ 362 u32 high_seq; /* snd_nxt at onset of congestion */
358 363
359 u32 retrans_stamp; /* Timestamp of the last retransmit, 364 u32 retrans_stamp; /* Timestamp of the last retransmit,
@@ -361,23 +366,16 @@ struct tcp_sock {
361 * the first SYN. */ 366 * the first SYN. */
362 u32 undo_marker; /* tracking retrans started here. */ 367 u32 undo_marker; /* tracking retrans started here. */
363 int undo_retrans; /* number of undoable retransmissions. */ 368 int undo_retrans; /* number of undoable retransmissions. */
369 u32 total_retrans; /* Total retransmits for entire connection */
370
364 u32 urg_seq; /* Seq of received urgent pointer */ 371 u32 urg_seq; /* Seq of received urgent pointer */
365 u16 urg_data; /* Saved octet of OOB data and control flags */
366 u8 urg_mode; /* In urgent mode */
367 u8 ecn_flags; /* ECN status bits. */
368 u32 snd_up; /* Urgent pointer */ 372 u32 snd_up; /* Urgent pointer */
369 373
370 u32 total_retrans; /* Total retransmits for entire connection */
371 u32 bytes_acked; /* Appropriate Byte Counting - RFC3465 */
372
373 unsigned int keepalive_time; /* time before keep alive takes place */ 374 unsigned int keepalive_time; /* time before keep alive takes place */
374 unsigned int keepalive_intvl; /* time interval between keep alive probes */ 375 unsigned int keepalive_intvl; /* time interval between keep alive probes */
375 int linger2;
376 376
377 unsigned long last_synq_overflow; 377 unsigned long last_synq_overflow;
378 378
379 u32 tso_deferred;
380
381/* Receiver side RTT estimation */ 379/* Receiver side RTT estimation */
382 struct { 380 struct {
383 u32 rtt; 381 u32 rtt;
@@ -405,6 +403,8 @@ struct tcp_sock {
405/* TCP MD5 Signagure Option information */ 403/* TCP MD5 Signagure Option information */
406 struct tcp_md5sig_info *md5sig_info; 404 struct tcp_md5sig_info *md5sig_info;
407#endif 405#endif
406
407 int linger2;
408}; 408};
409 409
410static inline struct tcp_sock *tcp_sk(const struct sock *sk) 410static inline struct tcp_sock *tcp_sk(const struct sock *sk)
diff --git a/include/linux/tipc_config.h b/include/linux/tipc_config.h
index b0c916d1f375..2bc6fa4adeb5 100644
--- a/include/linux/tipc_config.h
+++ b/include/linux/tipc_config.h
@@ -2,7 +2,7 @@
2 * include/linux/tipc_config.h: Include file for TIPC configuration interface 2 * include/linux/tipc_config.h: Include file for TIPC configuration interface
3 * 3 *
4 * Copyright (c) 2003-2006, Ericsson AB 4 * Copyright (c) 2003-2006, Ericsson AB
5 * Copyright (c) 2005, Wind River Systems 5 * Copyright (c) 2005-2007, Wind River Systems
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
@@ -136,6 +136,14 @@
136#define TIPC_CMD_SET_NETID 0x800B /* tx unsigned, rx none */ 136#define TIPC_CMD_SET_NETID 0x800B /* tx unsigned, rx none */
137 137
138/* 138/*
139 * Reserved commands:
140 * May not be issued by any process.
141 * Used internally by TIPC.
142 */
143
144#define TIPC_CMD_NOT_NET_ADMIN 0xC001 /* tx none, rx none */
145
146/*
139 * TLV types defined for TIPC 147 * TLV types defined for TIPC
140 */ 148 */
141 149
diff --git a/include/linux/udp.h b/include/linux/udp.h
index 581ca2c14c52..0cf5c4c0ec81 100644
--- a/include/linux/udp.h
+++ b/include/linux/udp.h
@@ -38,6 +38,7 @@ struct udphdr {
38#ifdef __KERNEL__ 38#ifdef __KERNEL__
39#include <net/inet_sock.h> 39#include <net/inet_sock.h>
40#include <linux/skbuff.h> 40#include <linux/skbuff.h>
41#include <net/netns/hash.h>
41 42
42static inline struct udphdr *udp_hdr(const struct sk_buff *skb) 43static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
43{ 44{
@@ -46,6 +47,11 @@ static inline struct udphdr *udp_hdr(const struct sk_buff *skb)
46 47
47#define UDP_HTABLE_SIZE 128 48#define UDP_HTABLE_SIZE 128
48 49
50static inline int udp_hashfn(struct net *net, const unsigned num)
51{
52 return (num + net_hash_mix(net)) & (UDP_HTABLE_SIZE - 1);
53}
54
49struct udp_sock { 55struct udp_sock {
50 /* inet_sock has to be the first member */ 56 /* inet_sock has to be the first member */
51 struct inet_sock inet; 57 struct inet_sock inet;
diff --git a/include/linux/usb/rndis_host.h b/include/linux/usb/rndis_host.h
index 29d6458ecb8d..0a6e6d4b929a 100644
--- a/include/linux/usb/rndis_host.h
+++ b/include/linux/usb/rndis_host.h
@@ -260,7 +260,8 @@ struct rndis_keepalive_c { /* IN (optionally OUT) */
260 260
261 261
262extern void rndis_status(struct usbnet *dev, struct urb *urb); 262extern void rndis_status(struct usbnet *dev, struct urb *urb);
263extern int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf); 263extern int
264rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen);
264extern int 265extern int
265generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags); 266generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags);
266extern void rndis_unbind(struct usbnet *dev, struct usb_interface *intf); 267extern void rndis_unbind(struct usbnet *dev, struct usb_interface *intf);
diff --git a/include/linux/wanrouter.h b/include/linux/wanrouter.h
index 3add87465b1f..e0aa39612eba 100644
--- a/include/linux/wanrouter.h
+++ b/include/linux/wanrouter.h
@@ -522,7 +522,7 @@ extern int wanrouter_proc_init(void);
522extern void wanrouter_proc_cleanup(void); 522extern void wanrouter_proc_cleanup(void);
523extern int wanrouter_proc_add(struct wan_device *wandev); 523extern int wanrouter_proc_add(struct wan_device *wandev);
524extern int wanrouter_proc_delete(struct wan_device *wandev); 524extern int wanrouter_proc_delete(struct wan_device *wandev);
525extern int wanrouter_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); 525extern long wanrouter_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
526 526
527/* Public Data */ 527/* Public Data */
528/* list of registered devices */ 528/* list of registered devices */
diff --git a/include/linux/wireless.h b/include/linux/wireless.h
index 0a9b5b41ed67..d7958f9b52cb 100644
--- a/include/linux/wireless.h
+++ b/include/linux/wireless.h
@@ -611,6 +611,7 @@
611#define IW_ENCODE_ALG_WEP 1 611#define IW_ENCODE_ALG_WEP 1
612#define IW_ENCODE_ALG_TKIP 2 612#define IW_ENCODE_ALG_TKIP 2
613#define IW_ENCODE_ALG_CCMP 3 613#define IW_ENCODE_ALG_CCMP 3
614#define IW_ENCODE_ALG_PMK 4
614/* struct iw_encode_ext ->ext_flags */ 615/* struct iw_encode_ext ->ext_flags */
615#define IW_ENCODE_EXT_TX_SEQ_VALID 0x00000001 616#define IW_ENCODE_EXT_TX_SEQ_VALID 0x00000001
616#define IW_ENCODE_EXT_RX_SEQ_VALID 0x00000002 617#define IW_ENCODE_EXT_RX_SEQ_VALID 0x00000002
@@ -630,6 +631,7 @@
630#define IW_ENC_CAPA_WPA2 0x00000002 631#define IW_ENC_CAPA_WPA2 0x00000002
631#define IW_ENC_CAPA_CIPHER_TKIP 0x00000004 632#define IW_ENC_CAPA_CIPHER_TKIP 0x00000004
632#define IW_ENC_CAPA_CIPHER_CCMP 0x00000008 633#define IW_ENC_CAPA_CIPHER_CCMP 0x00000008
634#define IW_ENC_CAPA_4WAY_HANDSHAKE 0x00000010
633 635
634/* Event capability macros - in (struct iw_range *)->event_capa 636/* Event capability macros - in (struct iw_range *)->event_capa
635 * Because we have more than 32 possible events, we use an array of 637 * Because we have more than 32 possible events, we use an array of
@@ -675,6 +677,19 @@ struct iw_point
675 __u16 flags; /* Optional params */ 677 __u16 flags; /* Optional params */
676}; 678};
677 679
680#ifdef __KERNEL__
681#ifdef CONFIG_COMPAT
682
683#include <linux/compat.h>
684
685struct compat_iw_point {
686 compat_caddr_t pointer;
687 __u16 length;
688 __u16 flags;
689};
690#endif
691#endif
692
678/* 693/*
679 * A frequency 694 * A frequency
680 * For numbers lower than 10^9, we encode the number in 'm' and 695 * For numbers lower than 10^9, we encode the number in 'm' and
@@ -1098,6 +1113,21 @@ struct iw_event
1098#define IW_EV_POINT_LEN (IW_EV_LCP_LEN + sizeof(struct iw_point) - \ 1113#define IW_EV_POINT_LEN (IW_EV_LCP_LEN + sizeof(struct iw_point) - \
1099 IW_EV_POINT_OFF) 1114 IW_EV_POINT_OFF)
1100 1115
1116#ifdef __KERNEL__
1117#ifdef CONFIG_COMPAT
1118struct __compat_iw_event {
1119 __u16 len; /* Real length of this stuff */
1120 __u16 cmd; /* Wireless IOCTL */
1121 compat_caddr_t pointer;
1122};
1123#define IW_EV_COMPAT_LCP_LEN offsetof(struct __compat_iw_event, pointer)
1124#define IW_EV_COMPAT_POINT_OFF offsetof(struct compat_iw_point, length)
1125#define IW_EV_COMPAT_POINT_LEN \
1126 (IW_EV_COMPAT_LCP_LEN + sizeof(struct compat_iw_point) - \
1127 IW_EV_COMPAT_POINT_OFF)
1128#endif
1129#endif
1130
1101/* Size of the Event prefix when packed in stream */ 1131/* Size of the Event prefix when packed in stream */
1102#define IW_EV_LCP_PK_LEN (4) 1132#define IW_EV_LCP_PK_LEN (4)
1103/* Size of the various events when packed in stream */ 1133/* Size of the various events when packed in stream */
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index bbd3d583c6e6..06b28142b3ab 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -121,7 +121,8 @@ static inline int addrconf_finite_timeout(unsigned long timeout)
121 */ 121 */
122extern int ipv6_addr_label_init(void); 122extern int ipv6_addr_label_init(void);
123extern void ipv6_addr_label_rtnl_register(void); 123extern void ipv6_addr_label_rtnl_register(void);
124extern u32 ipv6_addr_label(const struct in6_addr *addr, 124extern u32 ipv6_addr_label(struct net *net,
125 const struct in6_addr *addr,
125 int type, int ifindex); 126 int type, int ifindex);
126 127
127/* 128/*
diff --git a/include/net/fib_rules.h b/include/net/fib_rules.h
index a5c6ccc5bb19..c2bb5cae6515 100644
--- a/include/net/fib_rules.h
+++ b/include/net/fib_rules.h
@@ -62,7 +62,7 @@ struct fib_rules_ops
62 62
63 /* Called after modifications to the rules set, must flush 63 /* Called after modifications to the rules set, must flush
64 * the route cache if one exists. */ 64 * the route cache if one exists. */
65 void (*flush_cache)(void); 65 void (*flush_cache)(struct fib_rules_ops *ops);
66 66
67 int nlgroup; 67 int nlgroup;
68 const struct nla_policy *policy; 68 const struct nla_policy *policy;
diff --git a/include/net/garp.h b/include/net/garp.h
new file mode 100644
index 000000000000..825f172caba9
--- /dev/null
+++ b/include/net/garp.h
@@ -0,0 +1,128 @@
1#ifndef _NET_GARP_H
2#define _NET_GARP_H
3
4#include <net/stp.h>
5
6#define GARP_PROTOCOL_ID 0x1
7#define GARP_END_MARK 0x0
8
9struct garp_pdu_hdr {
10 __be16 protocol;
11};
12
13struct garp_msg_hdr {
14 u8 attrtype;
15};
16
17enum garp_attr_event {
18 GARP_LEAVE_ALL,
19 GARP_JOIN_EMPTY,
20 GARP_JOIN_IN,
21 GARP_LEAVE_EMPTY,
22 GARP_LEAVE_IN,
23 GARP_EMPTY,
24};
25
26struct garp_attr_hdr {
27 u8 len;
28 u8 event;
29 u8 data[];
30};
31
32struct garp_skb_cb {
33 u8 cur_type;
34};
35
36static inline struct garp_skb_cb *garp_cb(struct sk_buff *skb)
37{
38 BUILD_BUG_ON(sizeof(struct garp_skb_cb) >
39 FIELD_SIZEOF(struct sk_buff, cb));
40 return (struct garp_skb_cb *)skb->cb;
41}
42
43enum garp_applicant_state {
44 GARP_APPLICANT_INVALID,
45 GARP_APPLICANT_VA,
46 GARP_APPLICANT_AA,
47 GARP_APPLICANT_QA,
48 GARP_APPLICANT_LA,
49 GARP_APPLICANT_VP,
50 GARP_APPLICANT_AP,
51 GARP_APPLICANT_QP,
52 GARP_APPLICANT_VO,
53 GARP_APPLICANT_AO,
54 GARP_APPLICANT_QO,
55 __GARP_APPLICANT_MAX
56};
57#define GARP_APPLICANT_MAX (__GARP_APPLICANT_MAX - 1)
58
59enum garp_event {
60 GARP_EVENT_REQ_JOIN,
61 GARP_EVENT_REQ_LEAVE,
62 GARP_EVENT_R_JOIN_IN,
63 GARP_EVENT_R_JOIN_EMPTY,
64 GARP_EVENT_R_EMPTY,
65 GARP_EVENT_R_LEAVE_IN,
66 GARP_EVENT_R_LEAVE_EMPTY,
67 GARP_EVENT_TRANSMIT_PDU,
68 __GARP_EVENT_MAX
69};
70#define GARP_EVENT_MAX (__GARP_EVENT_MAX - 1)
71
72enum garp_action {
73 GARP_ACTION_NONE,
74 GARP_ACTION_S_JOIN_IN,
75 GARP_ACTION_S_LEAVE_EMPTY,
76};
77
78struct garp_attr {
79 struct rb_node node;
80 enum garp_applicant_state state;
81 u8 type;
82 u8 dlen;
83 unsigned char data[];
84};
85
86enum garp_applications {
87 GARP_APPLICATION_GVRP,
88 __GARP_APPLICATION_MAX
89};
90#define GARP_APPLICATION_MAX (__GARP_APPLICATION_MAX - 1)
91
92struct garp_application {
93 enum garp_applications type;
94 unsigned int maxattr;
95 struct stp_proto proto;
96};
97
98struct garp_applicant {
99 struct garp_application *app;
100 struct net_device *dev;
101 struct timer_list join_timer;
102
103 spinlock_t lock;
104 struct sk_buff_head queue;
105 struct sk_buff *pdu;
106 struct rb_root gid;
107};
108
109struct garp_port {
110 struct garp_applicant *applicants[GARP_APPLICATION_MAX + 1];
111};
112
113extern int garp_register_application(struct garp_application *app);
114extern void garp_unregister_application(struct garp_application *app);
115
116extern int garp_init_applicant(struct net_device *dev,
117 struct garp_application *app);
118extern void garp_uninit_applicant(struct net_device *dev,
119 struct garp_application *app);
120
121extern int garp_request_join(const struct net_device *dev,
122 const struct garp_application *app,
123 const void *data, u8 len, u8 type);
124extern void garp_request_leave(const struct net_device *dev,
125 const struct garp_application *app,
126 const void *data, u8 len, u8 type);
127
128#endif /* _NET_GARP_H */
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h
index 529816bfbc52..b31399e1fd83 100644
--- a/include/net/ieee80211.h
+++ b/include/net/ieee80211.h
@@ -1262,9 +1262,6 @@ extern int ieee80211_set_encryption(struct ieee80211_device *ieee);
1262/* ieee80211_tx.c */ 1262/* ieee80211_tx.c */
1263extern int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev); 1263extern int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev);
1264extern void ieee80211_txb_free(struct ieee80211_txb *); 1264extern void ieee80211_txb_free(struct ieee80211_txb *);
1265extern int ieee80211_tx_frame(struct ieee80211_device *ieee,
1266 struct ieee80211_hdr *frame, int hdr_len,
1267 int total_len, int encrypt_mpdu);
1268 1265
1269/* ieee80211_rx.c */ 1266/* ieee80211_rx.c */
1270extern void ieee80211_rx_any(struct ieee80211_device *ieee, 1267extern void ieee80211_rx_any(struct ieee80211_device *ieee,
@@ -1312,14 +1309,6 @@ extern int ieee80211_wx_set_encodeext(struct ieee80211_device *ieee,
1312extern int ieee80211_wx_get_encodeext(struct ieee80211_device *ieee, 1309extern int ieee80211_wx_get_encodeext(struct ieee80211_device *ieee,
1313 struct iw_request_info *info, 1310 struct iw_request_info *info,
1314 union iwreq_data *wrqu, char *extra); 1311 union iwreq_data *wrqu, char *extra);
1315extern int ieee80211_wx_set_auth(struct net_device *dev,
1316 struct iw_request_info *info,
1317 union iwreq_data *wrqu,
1318 char *extra);
1319extern int ieee80211_wx_get_auth(struct net_device *dev,
1320 struct iw_request_info *info,
1321 union iwreq_data *wrqu,
1322 char *extra);
1323 1312
1324static inline void ieee80211_increment_scans(struct ieee80211_device *ieee) 1313static inline void ieee80211_increment_scans(struct ieee80211_device *ieee)
1325{ 1314{
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
index b2cfc4927257..db66c7927743 100644
--- a/include/net/if_inet6.h
+++ b/include/net/if_inet6.h
@@ -148,7 +148,6 @@ struct ifacaddr6
148#define IFA_HOST IPV6_ADDR_LOOPBACK 148#define IFA_HOST IPV6_ADDR_LOOPBACK
149#define IFA_LINK IPV6_ADDR_LINKLOCAL 149#define IFA_LINK IPV6_ADDR_LINKLOCAL
150#define IFA_SITE IPV6_ADDR_SITELOCAL 150#define IFA_SITE IPV6_ADDR_SITELOCAL
151#define IFA_GLOBAL 0x0000U
152 151
153struct ipv6_devstat { 152struct ipv6_devstat {
154 struct proc_dir_entry *proc_dir_entry; 153 struct proc_dir_entry *proc_dir_entry;
diff --git a/include/net/inet6_hashtables.h b/include/net/inet6_hashtables.h
index 62a5b691858e..e48989f04c24 100644
--- a/include/net/inet6_hashtables.h
+++ b/include/net/inet6_hashtables.h
@@ -24,18 +24,20 @@
24#include <net/inet_sock.h> 24#include <net/inet_sock.h>
25 25
26#include <net/ipv6.h> 26#include <net/ipv6.h>
27#include <net/netns/hash.h>
27 28
28struct inet_hashinfo; 29struct inet_hashinfo;
29 30
30/* I have no idea if this is a good hash for v6 or not. -DaveM */ 31/* I have no idea if this is a good hash for v6 or not. -DaveM */
31static inline unsigned int inet6_ehashfn(const struct in6_addr *laddr, const u16 lport, 32static inline unsigned int inet6_ehashfn(struct net *net,
33 const struct in6_addr *laddr, const u16 lport,
32 const struct in6_addr *faddr, const __be16 fport) 34 const struct in6_addr *faddr, const __be16 fport)
33{ 35{
34 u32 ports = (lport ^ (__force u16)fport); 36 u32 ports = (lport ^ (__force u16)fport);
35 37
36 return jhash_3words((__force u32)laddr->s6_addr32[3], 38 return jhash_3words((__force u32)laddr->s6_addr32[3],
37 (__force u32)faddr->s6_addr32[3], 39 (__force u32)faddr->s6_addr32[3],
38 ports, inet_ehash_secret); 40 ports, inet_ehash_secret + net_hash_mix(net));
39} 41}
40 42
41static inline int inet6_sk_ehashfn(const struct sock *sk) 43static inline int inet6_sk_ehashfn(const struct sock *sk)
@@ -46,7 +48,9 @@ static inline int inet6_sk_ehashfn(const struct sock *sk)
46 const struct in6_addr *faddr = &np->daddr; 48 const struct in6_addr *faddr = &np->daddr;
47 const __u16 lport = inet->num; 49 const __u16 lport = inet->num;
48 const __be16 fport = inet->dport; 50 const __be16 fport = inet->dport;
49 return inet6_ehashfn(laddr, lport, faddr, fport); 51 struct net *net = sock_net(sk);
52
53 return inet6_ehashfn(net, laddr, lport, faddr, fport);
50} 54}
51 55
52extern void __inet6_hash(struct sock *sk); 56extern void __inet6_hash(struct sock *sk);
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index 735b926a3497..bb619d80f2e2 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -29,6 +29,7 @@
29#include <net/inet_sock.h> 29#include <net/inet_sock.h>
30#include <net/sock.h> 30#include <net/sock.h>
31#include <net/tcp_states.h> 31#include <net/tcp_states.h>
32#include <net/netns/hash.h>
32 33
33#include <asm/atomic.h> 34#include <asm/atomic.h>
34#include <asm/byteorder.h> 35#include <asm/byteorder.h>
@@ -201,23 +202,24 @@ extern struct inet_bind_bucket *
201extern void inet_bind_bucket_destroy(struct kmem_cache *cachep, 202extern void inet_bind_bucket_destroy(struct kmem_cache *cachep,
202 struct inet_bind_bucket *tb); 203 struct inet_bind_bucket *tb);
203 204
204static inline int inet_bhashfn(const __u16 lport, const int bhash_size) 205static inline int inet_bhashfn(struct net *net,
206 const __u16 lport, const int bhash_size)
205{ 207{
206 return lport & (bhash_size - 1); 208 return (lport + net_hash_mix(net)) & (bhash_size - 1);
207} 209}
208 210
209extern void inet_bind_hash(struct sock *sk, struct inet_bind_bucket *tb, 211extern void inet_bind_hash(struct sock *sk, struct inet_bind_bucket *tb,
210 const unsigned short snum); 212 const unsigned short snum);
211 213
212/* These can have wildcards, don't try too hard. */ 214/* These can have wildcards, don't try too hard. */
213static inline int inet_lhashfn(const unsigned short num) 215static inline int inet_lhashfn(struct net *net, const unsigned short num)
214{ 216{
215 return num & (INET_LHTABLE_SIZE - 1); 217 return (num + net_hash_mix(net)) & (INET_LHTABLE_SIZE - 1);
216} 218}
217 219
218static inline int inet_sk_listen_hashfn(const struct sock *sk) 220static inline int inet_sk_listen_hashfn(const struct sock *sk)
219{ 221{
220 return inet_lhashfn(inet_sk(sk)->num); 222 return inet_lhashfn(sock_net(sk), inet_sk(sk)->num);
221} 223}
222 224
223/* Caller must disable local BH processing. */ 225/* Caller must disable local BH processing. */
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index 9fabe5b38912..643e26be058e 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -25,6 +25,7 @@
25#include <net/sock.h> 25#include <net/sock.h>
26#include <net/request_sock.h> 26#include <net/request_sock.h>
27#include <net/route.h> 27#include <net/route.h>
28#include <net/netns/hash.h>
28 29
29/** struct ip_options - IP Options 30/** struct ip_options - IP Options
30 * 31 *
@@ -171,13 +172,14 @@ extern int inet_sk_rebuild_header(struct sock *sk);
171extern u32 inet_ehash_secret; 172extern u32 inet_ehash_secret;
172extern void build_ehash_secret(void); 173extern void build_ehash_secret(void);
173 174
174static inline unsigned int inet_ehashfn(const __be32 laddr, const __u16 lport, 175static inline unsigned int inet_ehashfn(struct net *net,
176 const __be32 laddr, const __u16 lport,
175 const __be32 faddr, const __be16 fport) 177 const __be32 faddr, const __be16 fport)
176{ 178{
177 return jhash_3words((__force __u32) laddr, 179 return jhash_3words((__force __u32) laddr,
178 (__force __u32) faddr, 180 (__force __u32) faddr,
179 ((__u32) lport) << 16 | (__force __u32)fport, 181 ((__u32) lport) << 16 | (__force __u32)fport,
180 inet_ehash_secret); 182 inet_ehash_secret + net_hash_mix(net));
181} 183}
182 184
183static inline int inet_sk_ehashfn(const struct sock *sk) 185static inline int inet_sk_ehashfn(const struct sock *sk)
@@ -187,8 +189,9 @@ static inline int inet_sk_ehashfn(const struct sock *sk)
187 const __u16 lport = inet->num; 189 const __u16 lport = inet->num;
188 const __be32 faddr = inet->daddr; 190 const __be32 faddr = inet->daddr;
189 const __be16 fport = inet->dport; 191 const __be16 fport = inet->dport;
192 struct net *net = sock_net(sk);
190 193
191 return inet_ehashfn(laddr, lport, faddr, fport); 194 return inet_ehashfn(net, laddr, lport, faddr, fport);
192} 195}
193 196
194 197
diff --git a/include/net/inetpeer.h b/include/net/inetpeer.h
index ad8404b56113..15e1f8fe4c1f 100644
--- a/include/net/inetpeer.h
+++ b/include/net/inetpeer.h
@@ -1,8 +1,6 @@
1/* 1/*
2 * INETPEER - A storage for permanent information about peers 2 * INETPEER - A storage for permanent information about peers
3 * 3 *
4 * Version: $Id: inetpeer.h,v 1.2 2002/01/12 07:54:56 davem Exp $
5 *
6 * Authors: Andrey V. Savochkin <saw@msu.ru> 4 * Authors: Andrey V. Savochkin <saw@msu.ru>
7 */ 5 */
8 6
diff --git a/include/net/ip6_tunnel.h b/include/net/ip6_tunnel.h
index 6512d85f11b3..83b4e008b16d 100644
--- a/include/net/ip6_tunnel.h
+++ b/include/net/ip6_tunnel.h
@@ -1,7 +1,3 @@
1/*
2 * $Id$
3 */
4
5#ifndef _NET_IP6_TUNNEL_H 1#ifndef _NET_IP6_TUNNEL_H
6#define _NET_IP6_TUNNEL_H 2#define _NET_IP6_TUNNEL_H
7 3
@@ -19,7 +15,6 @@
19struct ip6_tnl { 15struct ip6_tnl {
20 struct ip6_tnl *next; /* next tunnel in list */ 16 struct ip6_tnl *next; /* next tunnel in list */
21 struct net_device *dev; /* virtual device associated with tunnel */ 17 struct net_device *dev; /* virtual device associated with tunnel */
22 struct net_device_stats stat; /* statistics for tunnel device */
23 int recursion; /* depth of hard_start_xmit recursion */ 18 int recursion; /* depth of hard_start_xmit recursion */
24 struct ip6_tnl_parm parms; /* tunnel configuration parameters */ 19 struct ip6_tnl_parm parms; /* tunnel configuration parameters */
25 struct flowi fl; /* flowi template for xmit */ 20 struct flowi fl; /* flowi template for xmit */
diff --git a/include/net/ipconfig.h b/include/net/ipconfig.h
index 3924d7d2cb11..c74cc1bd5a02 100644
--- a/include/net/ipconfig.h
+++ b/include/net/ipconfig.h
@@ -1,6 +1,4 @@
1/* 1/*
2 * $Id: ipconfig.h,v 1.4 2001/04/30 04:51:46 davem Exp $
3 *
4 * Copyright (C) 1997 Martin Mares 2 * Copyright (C) 1997 Martin Mares
5 * 3 *
6 * Automatic IP Layer Configuration 4 * Automatic IP Layer Configuration
diff --git a/include/net/ipip.h b/include/net/ipip.h
index 633ed4def8e3..a85bda64b852 100644
--- a/include/net/ipip.h
+++ b/include/net/ipip.h
@@ -11,7 +11,6 @@ struct ip_tunnel
11{ 11{
12 struct ip_tunnel *next; 12 struct ip_tunnel *next;
13 struct net_device *dev; 13 struct net_device *dev;
14 struct net_device_stats stat;
15 14
16 int recursion; /* Depth of hard_start_xmit recursion */ 15 int recursion; /* Depth of hard_start_xmit recursion */
17 int err_count; /* Number of arrived ICMP errors */ 16 int err_count; /* Number of arrived ICMP errors */
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index f422f7218e1c..c2222ee74d66 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -4,8 +4,6 @@
4 * Authors: 4 * Authors:
5 * Pedro Roque <roque@di.fc.ul.pt> 5 * Pedro Roque <roque@di.fc.ul.pt>
6 * 6 *
7 * $Id: ipv6.h,v 1.1 2002/05/20 15:13:07 jgrimm Exp $
8 *
9 * This program is free software; you can redistribute it and/or 7 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License 8 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 9 * as published by the Free Software Foundation; either version
diff --git a/include/net/iw_handler.h b/include/net/iw_handler.h
index 369d50e08b99..51b9a37de991 100644
--- a/include/net/iw_handler.h
+++ b/include/net/iw_handler.h
@@ -256,7 +256,7 @@
256#define EIWCOMMIT EINPROGRESS 256#define EIWCOMMIT EINPROGRESS
257 257
258/* Flags available in struct iw_request_info */ 258/* Flags available in struct iw_request_info */
259#define IW_REQUEST_FLAG_NONE 0x0000 /* No flag so far */ 259#define IW_REQUEST_FLAG_COMPAT 0x0001 /* Compat ioctl call */
260 260
261/* Type of headers we know about (basically union iwreq_data) */ 261/* Type of headers we know about (basically union iwreq_data) */
262#define IW_HEADER_TYPE_NULL 0 /* Not available */ 262#define IW_HEADER_TYPE_NULL 0 /* Not available */
@@ -478,105 +478,58 @@ extern void wireless_spy_update(struct net_device * dev,
478 * Function that are so simple that it's more efficient inlining them 478 * Function that are so simple that it's more efficient inlining them
479 */ 479 */
480 480
481/*------------------------------------------------------------------*/ 481static inline int iwe_stream_lcp_len(struct iw_request_info *info)
482/*
483 * Wrapper to add an Wireless Event to a stream of events.
484 */
485static inline char *
486iwe_stream_add_event(char * stream, /* Stream of events */
487 char * ends, /* End of stream */
488 struct iw_event *iwe, /* Payload */
489 int event_len) /* Real size of payload */
490{ 482{
491 /* Check if it's possible */ 483#ifdef CONFIG_COMPAT
492 if(likely((stream + event_len) < ends)) { 484 if (info->flags & IW_REQUEST_FLAG_COMPAT)
493 iwe->len = event_len; 485 return IW_EV_COMPAT_LCP_LEN;
494 /* Beware of alignement issues on 64 bits */ 486#endif
495 memcpy(stream, (char *) iwe, IW_EV_LCP_PK_LEN); 487 return IW_EV_LCP_LEN;
496 memcpy(stream + IW_EV_LCP_LEN,
497 ((char *) iwe) + IW_EV_LCP_LEN,
498 event_len - IW_EV_LCP_LEN);
499 stream += event_len;
500 }
501 return stream;
502} 488}
503 489
504/*------------------------------------------------------------------*/ 490static inline int iwe_stream_point_len(struct iw_request_info *info)
505/*
506 * Wrapper to add an short Wireless Event containing a pointer to a
507 * stream of events.
508 */
509static inline char *
510iwe_stream_add_point(char * stream, /* Stream of events */
511 char * ends, /* End of stream */
512 struct iw_event *iwe, /* Payload length + flags */
513 char * extra) /* More payload */
514{ 491{
515 int event_len = IW_EV_POINT_LEN + iwe->u.data.length; 492#ifdef CONFIG_COMPAT
516 /* Check if it's possible */ 493 if (info->flags & IW_REQUEST_FLAG_COMPAT)
517 if(likely((stream + event_len) < ends)) { 494 return IW_EV_COMPAT_POINT_LEN;
518 iwe->len = event_len; 495#endif
519 memcpy(stream, (char *) iwe, IW_EV_LCP_PK_LEN); 496 return IW_EV_POINT_LEN;
520 memcpy(stream + IW_EV_LCP_LEN,
521 ((char *) iwe) + IW_EV_LCP_LEN + IW_EV_POINT_OFF,
522 IW_EV_POINT_PK_LEN - IW_EV_LCP_PK_LEN);
523 memcpy(stream + IW_EV_POINT_LEN, extra, iwe->u.data.length);
524 stream += event_len;
525 }
526 return stream;
527} 497}
528 498
529/*------------------------------------------------------------------*/ 499static inline int iwe_stream_event_len_adjust(struct iw_request_info *info,
530/* 500 int event_len)
531 * Wrapper to add a value to a Wireless Event in a stream of events.
532 * Be careful, this one is tricky to use properly :
533 * At the first run, you need to have (value = event + IW_EV_LCP_LEN).
534 */
535static inline char *
536iwe_stream_add_value(char * event, /* Event in the stream */
537 char * value, /* Value in event */
538 char * ends, /* End of stream */
539 struct iw_event *iwe, /* Payload */
540 int event_len) /* Real size of payload */
541{ 501{
542 /* Don't duplicate LCP */ 502#ifdef CONFIG_COMPAT
543 event_len -= IW_EV_LCP_LEN; 503 if (info->flags & IW_REQUEST_FLAG_COMPAT) {
544 504 event_len -= IW_EV_LCP_LEN;
545 /* Check if it's possible */ 505 event_len += IW_EV_COMPAT_LCP_LEN;
546 if(likely((value + event_len) < ends)) {
547 /* Add new value */
548 memcpy(value, (char *) iwe + IW_EV_LCP_LEN, event_len);
549 value += event_len;
550 /* Patch LCP */
551 iwe->len = value - event;
552 memcpy(event, (char *) iwe, IW_EV_LCP_LEN);
553 } 506 }
554 return value; 507#endif
508
509 return event_len;
555} 510}
556 511
557/*------------------------------------------------------------------*/ 512/*------------------------------------------------------------------*/
558/* 513/*
559 * Wrapper to add an Wireless Event to a stream of events. 514 * Wrapper to add an Wireless Event to a stream of events.
560 * Same as above, with explicit error check...
561 */ 515 */
562static inline char * 516static inline char *
563iwe_stream_check_add_event(char * stream, /* Stream of events */ 517iwe_stream_add_event(struct iw_request_info *info, char *stream, char *ends,
564 char * ends, /* End of stream */ 518 struct iw_event *iwe, int event_len)
565 struct iw_event *iwe, /* Payload */
566 int event_len, /* Size of payload */
567 int * perr) /* Error report */
568{ 519{
569 /* Check if it's possible, set error if not */ 520 int lcp_len = iwe_stream_lcp_len(info);
521
522 event_len = iwe_stream_event_len_adjust(info, event_len);
523
524 /* Check if it's possible */
570 if(likely((stream + event_len) < ends)) { 525 if(likely((stream + event_len) < ends)) {
571 iwe->len = event_len; 526 iwe->len = event_len;
572 /* Beware of alignement issues on 64 bits */ 527 /* Beware of alignement issues on 64 bits */
573 memcpy(stream, (char *) iwe, IW_EV_LCP_PK_LEN); 528 memcpy(stream, (char *) iwe, IW_EV_LCP_PK_LEN);
574 memcpy(stream + IW_EV_LCP_LEN, 529 memcpy(stream + lcp_len, &iwe->u,
575 ((char *) iwe) + IW_EV_LCP_LEN, 530 event_len - lcp_len);
576 event_len - IW_EV_LCP_LEN);
577 stream += event_len; 531 stream += event_len;
578 } else 532 }
579 *perr = -E2BIG;
580 return stream; 533 return stream;
581} 534}
582 535
@@ -584,27 +537,25 @@ iwe_stream_check_add_event(char * stream, /* Stream of events */
584/* 537/*
585 * Wrapper to add an short Wireless Event containing a pointer to a 538 * Wrapper to add an short Wireless Event containing a pointer to a
586 * stream of events. 539 * stream of events.
587 * Same as above, with explicit error check...
588 */ 540 */
589static inline char * 541static inline char *
590iwe_stream_check_add_point(char * stream, /* Stream of events */ 542iwe_stream_add_point(struct iw_request_info *info, char *stream, char *ends,
591 char * ends, /* End of stream */ 543 struct iw_event *iwe, char *extra)
592 struct iw_event *iwe, /* Payload length + flags */
593 char * extra, /* More payload */
594 int * perr) /* Error report */
595{ 544{
596 int event_len = IW_EV_POINT_LEN + iwe->u.data.length; 545 int event_len = iwe_stream_point_len(info) + iwe->u.data.length;
546 int point_len = iwe_stream_point_len(info);
547 int lcp_len = iwe_stream_lcp_len(info);
548
597 /* Check if it's possible */ 549 /* Check if it's possible */
598 if(likely((stream + event_len) < ends)) { 550 if(likely((stream + event_len) < ends)) {
599 iwe->len = event_len; 551 iwe->len = event_len;
600 memcpy(stream, (char *) iwe, IW_EV_LCP_PK_LEN); 552 memcpy(stream, (char *) iwe, IW_EV_LCP_PK_LEN);
601 memcpy(stream + IW_EV_LCP_LEN, 553 memcpy(stream + lcp_len,
602 ((char *) iwe) + IW_EV_LCP_LEN + IW_EV_POINT_OFF, 554 ((char *) &iwe->u) + IW_EV_POINT_OFF,
603 IW_EV_POINT_PK_LEN - IW_EV_LCP_PK_LEN); 555 IW_EV_POINT_PK_LEN - IW_EV_LCP_PK_LEN);
604 memcpy(stream + IW_EV_POINT_LEN, extra, iwe->u.data.length); 556 memcpy(stream + point_len, extra, iwe->u.data.length);
605 stream += event_len; 557 stream += event_len;
606 } else 558 }
607 *perr = -E2BIG;
608 return stream; 559 return stream;
609} 560}
610 561
@@ -613,29 +564,25 @@ iwe_stream_check_add_point(char * stream, /* Stream of events */
613 * Wrapper to add a value to a Wireless Event in a stream of events. 564 * Wrapper to add a value to a Wireless Event in a stream of events.
614 * Be careful, this one is tricky to use properly : 565 * Be careful, this one is tricky to use properly :
615 * At the first run, you need to have (value = event + IW_EV_LCP_LEN). 566 * At the first run, you need to have (value = event + IW_EV_LCP_LEN).
616 * Same as above, with explicit error check...
617 */ 567 */
618static inline char * 568static inline char *
619iwe_stream_check_add_value(char * event, /* Event in the stream */ 569iwe_stream_add_value(struct iw_request_info *info, char *event, char *value,
620 char * value, /* Value in event */ 570 char *ends, struct iw_event *iwe, int event_len)
621 char * ends, /* End of stream */
622 struct iw_event *iwe, /* Payload */
623 int event_len, /* Size of payload */
624 int * perr) /* Error report */
625{ 571{
572 int lcp_len = iwe_stream_lcp_len(info);
573
626 /* Don't duplicate LCP */ 574 /* Don't duplicate LCP */
627 event_len -= IW_EV_LCP_LEN; 575 event_len -= IW_EV_LCP_LEN;
628 576
629 /* Check if it's possible */ 577 /* Check if it's possible */
630 if(likely((value + event_len) < ends)) { 578 if(likely((value + event_len) < ends)) {
631 /* Add new value */ 579 /* Add new value */
632 memcpy(value, (char *) iwe + IW_EV_LCP_LEN, event_len); 580 memcpy(value, &iwe->u, event_len);
633 value += event_len; 581 value += event_len;
634 /* Patch LCP */ 582 /* Patch LCP */
635 iwe->len = value - event; 583 iwe->len = value - event;
636 memcpy(event, (char *) iwe, IW_EV_LCP_LEN); 584 memcpy(event, (char *) iwe, lcp_len);
637 } else 585 }
638 *perr = -E2BIG;
639 return value; 586 return value;
640} 587}
641 588
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index bcd1623245cb..3a204acad901 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -98,6 +98,18 @@ struct ieee80211_ht_bss_info {
98}; 98};
99 99
100/** 100/**
101 * enum ieee80211_max_queues - maximum number of queues
102 *
103 * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues.
104 * @IEEE80211_MAX_AMPDU_QUEUES: Maximum number of queues usable
105 * for A-MPDU operation.
106 */
107enum ieee80211_max_queues {
108 IEEE80211_MAX_QUEUES = 16,
109 IEEE80211_MAX_AMPDU_QUEUES = 16,
110};
111
112/**
101 * struct ieee80211_tx_queue_params - transmit queue configuration 113 * struct ieee80211_tx_queue_params - transmit queue configuration
102 * 114 *
103 * The information provided in this structure is required for QoS 115 * The information provided in this structure is required for QoS
@@ -117,58 +129,18 @@ struct ieee80211_tx_queue_params {
117}; 129};
118 130
119/** 131/**
120 * struct ieee80211_tx_queue_stats_data - transmit queue statistics 132 * struct ieee80211_tx_queue_stats - transmit queue statistics
121 * 133 *
122 * @len: number of packets in queue 134 * @len: number of packets in queue
123 * @limit: queue length limit 135 * @limit: queue length limit
124 * @count: number of frames sent 136 * @count: number of frames sent
125 */ 137 */
126struct ieee80211_tx_queue_stats_data { 138struct ieee80211_tx_queue_stats {
127 unsigned int len; 139 unsigned int len;
128 unsigned int limit; 140 unsigned int limit;
129 unsigned int count; 141 unsigned int count;
130}; 142};
131 143
132/**
133 * enum ieee80211_tx_queue - transmit queue number
134 *
135 * These constants are used with some callbacks that take a
136 * queue number to set parameters for a queue.
137 *
138 * @IEEE80211_TX_QUEUE_DATA0: data queue 0
139 * @IEEE80211_TX_QUEUE_DATA1: data queue 1
140 * @IEEE80211_TX_QUEUE_DATA2: data queue 2
141 * @IEEE80211_TX_QUEUE_DATA3: data queue 3
142 * @IEEE80211_TX_QUEUE_DATA4: data queue 4
143 * @IEEE80211_TX_QUEUE_SVP: ??
144 * @NUM_TX_DATA_QUEUES: number of data queues
145 * @IEEE80211_TX_QUEUE_AFTER_BEACON: transmit queue for frames to be
146 * sent after a beacon
147 * @IEEE80211_TX_QUEUE_BEACON: transmit queue for beacon frames
148 * @NUM_TX_DATA_QUEUES_AMPDU: adding more queues for A-MPDU
149 */
150enum ieee80211_tx_queue {
151 IEEE80211_TX_QUEUE_DATA0,
152 IEEE80211_TX_QUEUE_DATA1,
153 IEEE80211_TX_QUEUE_DATA2,
154 IEEE80211_TX_QUEUE_DATA3,
155 IEEE80211_TX_QUEUE_DATA4,
156 IEEE80211_TX_QUEUE_SVP,
157
158 NUM_TX_DATA_QUEUES,
159
160/* due to stupidity in the sub-ioctl userspace interface, the items in
161 * this struct need to have fixed values. As soon as it is removed, we can
162 * fix these entries. */
163 IEEE80211_TX_QUEUE_AFTER_BEACON = 6,
164 IEEE80211_TX_QUEUE_BEACON = 7,
165 NUM_TX_DATA_QUEUES_AMPDU = 16
166};
167
168struct ieee80211_tx_queue_stats {
169 struct ieee80211_tx_queue_stats_data data[NUM_TX_DATA_QUEUES_AMPDU];
170};
171
172struct ieee80211_low_level_stats { 144struct ieee80211_low_level_stats {
173 unsigned int dot11ACKFailureCount; 145 unsigned int dot11ACKFailureCount;
174 unsigned int dot11RTSFailureCount; 146 unsigned int dot11RTSFailureCount;
@@ -229,91 +201,128 @@ struct ieee80211_bss_conf {
229}; 201};
230 202
231/** 203/**
232 * enum mac80211_tx_control_flags - flags to describe Tx configuration for 204 * enum mac80211_tx_flags - flags to transmission information/status
233 * the Tx frame 205 *
234 * 206 * These flags are used with the @flags member of &ieee80211_tx_info
235 * These flags are used with the @flags member of &ieee80211_tx_control 207 *
236 * 208 * @IEEE80211_TX_CTL_REQ_TX_STATUS: request TX status callback for this frame.
237 * @IEEE80211_TXCTL_REQ_TX_STATUS: request TX status callback for this frame. 209 * @IEEE80211_TX_CTL_DO_NOT_ENCRYPT: send this frame without encryption;
238 * @IEEE80211_TXCTL_DO_NOT_ENCRYPT: send this frame without encryption; 210 * e.g., for EAPOL frame
239 * e.g., for EAPOL frame 211 * @IEEE80211_TX_CTL_USE_RTS_CTS: use RTS-CTS before sending frame
240 * @IEEE80211_TXCTL_USE_RTS_CTS: use RTS-CTS before sending frame 212 * @IEEE80211_TX_CTL_USE_CTS_PROTECT: use CTS protection for the frame (e.g.,
241 * @IEEE80211_TXCTL_USE_CTS_PROTECT: use CTS protection for the frame (e.g., 213 * for combined 802.11g / 802.11b networks)
242 * for combined 802.11g / 802.11b networks) 214 * @IEEE80211_TX_CTL_NO_ACK: tell the low level not to wait for an ack
243 * @IEEE80211_TXCTL_NO_ACK: tell the low level not to wait for an ack 215 * @IEEE80211_TX_CTL_RATE_CTRL_PROBE
244 * @IEEE80211_TXCTL_RATE_CTRL_PROBE 216 * @IEEE80211_TX_CTL_CLEAR_PS_FILT: clear powersave filter for destination
245 * @EEE80211_TXCTL_CLEAR_PS_FILT: clear powersave filter 217 * station
246 * for destination station 218 * @IEEE80211_TX_CTL_REQUEUE:
247 * @IEEE80211_TXCTL_REQUEUE: 219 * @IEEE80211_TX_CTL_FIRST_FRAGMENT: this is a first fragment of the frame
248 * @IEEE80211_TXCTL_FIRST_FRAGMENT: this is a first fragment of the frame 220 * @IEEE80211_TX_CTL_LONG_RETRY_LIMIT: this frame should be send using the
249 * @IEEE80211_TXCTL_LONG_RETRY_LIMIT: this frame should be send using the 221 * through set_retry_limit configured long retry value
250 * through set_retry_limit configured long 222 * @IEEE80211_TX_CTL_EAPOL_FRAME: internal to mac80211
251 * retry value 223 * @IEEE80211_TX_CTL_SEND_AFTER_DTIM: send this frame after DTIM beacon
252 * @IEEE80211_TXCTL_EAPOL_FRAME: internal to mac80211 224 * @IEEE80211_TX_CTL_AMPDU: this frame should be sent as part of an A-MPDU
253 * @IEEE80211_TXCTL_SEND_AFTER_DTIM: send this frame after DTIM beacon 225 * @IEEE80211_TX_CTL_OFDM_HT: this frame can be sent in HT OFDM rates. number
254 * @IEEE80211_TXCTL_AMPDU: this frame should be sent as part of an A-MPDU 226 * of streams when this flag is on can be extracted from antenna_sel_tx,
255 * @IEEE80211_TXCTL_OFDM_HT: this frame can be sent in HT OFDM rates. number 227 * so if 1 antenna is marked use SISO, 2 antennas marked use MIMO, n
256 * of streams when this flag is on can be extracted 228 * antennas marked use MIMO_n.
257 * from antenna_sel_tx, so if 1 antenna is marked 229 * @IEEE80211_TX_CTL_GREEN_FIELD: use green field protection for this frame
258 * use SISO, 2 antennas marked use MIMO, n antennas 230 * @IEEE80211_TX_CTL_40_MHZ_WIDTH: send this frame using 40 Mhz channel width
259 * marked use MIMO_n. 231 * @IEEE80211_TX_CTL_DUP_DATA: duplicate data frame on both 20 Mhz channels
260 * @IEEE80211_TXCTL_GREEN_FIELD: use green field protection for this frame 232 * @IEEE80211_TX_CTL_SHORT_GI: send this frame using short guard interval
261 * @IEEE80211_TXCTL_40_MHZ_WIDTH: send this frame using 40 Mhz channel width 233 * @IEEE80211_TX_STAT_TX_FILTERED: The frame was not transmitted
262 * @IEEE80211_TXCTL_DUP_DATA: duplicate data frame on both 20 Mhz channels 234 * because the destination STA was in powersave mode.
263 * @IEEE80211_TXCTL_SHORT_GI: send this frame using short guard interval 235 * @IEEE80211_TX_STAT_ACK: Frame was acknowledged
236 * @IEEE80211_TX_STAT_AMPDU: The frame was aggregated, so status
237 * is for the whole aggregation.
264 */ 238 */
265enum mac80211_tx_control_flags { 239enum mac80211_tx_control_flags {
266 IEEE80211_TXCTL_REQ_TX_STATUS = (1<<0), 240 IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0),
267 IEEE80211_TXCTL_DO_NOT_ENCRYPT = (1<<1), 241 IEEE80211_TX_CTL_DO_NOT_ENCRYPT = BIT(1),
268 IEEE80211_TXCTL_USE_RTS_CTS = (1<<2), 242 IEEE80211_TX_CTL_USE_RTS_CTS = BIT(2),
269 IEEE80211_TXCTL_USE_CTS_PROTECT = (1<<3), 243 IEEE80211_TX_CTL_USE_CTS_PROTECT = BIT(3),
270 IEEE80211_TXCTL_NO_ACK = (1<<4), 244 IEEE80211_TX_CTL_NO_ACK = BIT(4),
271 IEEE80211_TXCTL_RATE_CTRL_PROBE = (1<<5), 245 IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(5),
272 IEEE80211_TXCTL_CLEAR_PS_FILT = (1<<6), 246 IEEE80211_TX_CTL_CLEAR_PS_FILT = BIT(6),
273 IEEE80211_TXCTL_REQUEUE = (1<<7), 247 IEEE80211_TX_CTL_REQUEUE = BIT(7),
274 IEEE80211_TXCTL_FIRST_FRAGMENT = (1<<8), 248 IEEE80211_TX_CTL_FIRST_FRAGMENT = BIT(8),
275 IEEE80211_TXCTL_SHORT_PREAMBLE = (1<<9), 249 IEEE80211_TX_CTL_SHORT_PREAMBLE = BIT(9),
276 IEEE80211_TXCTL_LONG_RETRY_LIMIT = (1<<10), 250 IEEE80211_TX_CTL_LONG_RETRY_LIMIT = BIT(10),
277 IEEE80211_TXCTL_EAPOL_FRAME = (1<<11), 251 IEEE80211_TX_CTL_EAPOL_FRAME = BIT(11),
278 IEEE80211_TXCTL_SEND_AFTER_DTIM = (1<<12), 252 IEEE80211_TX_CTL_SEND_AFTER_DTIM = BIT(12),
279 IEEE80211_TXCTL_AMPDU = (1<<13), 253 IEEE80211_TX_CTL_AMPDU = BIT(13),
280 IEEE80211_TXCTL_OFDM_HT = (1<<14), 254 IEEE80211_TX_CTL_OFDM_HT = BIT(14),
281 IEEE80211_TXCTL_GREEN_FIELD = (1<<15), 255 IEEE80211_TX_CTL_GREEN_FIELD = BIT(15),
282 IEEE80211_TXCTL_40_MHZ_WIDTH = (1<<16), 256 IEEE80211_TX_CTL_40_MHZ_WIDTH = BIT(16),
283 IEEE80211_TXCTL_DUP_DATA = (1<<17), 257 IEEE80211_TX_CTL_DUP_DATA = BIT(17),
284 IEEE80211_TXCTL_SHORT_GI = (1<<18), 258 IEEE80211_TX_CTL_SHORT_GI = BIT(18),
259 IEEE80211_TX_CTL_INJECTED = BIT(19),
260 IEEE80211_TX_STAT_TX_FILTERED = BIT(20),
261 IEEE80211_TX_STAT_ACK = BIT(21),
262 IEEE80211_TX_STAT_AMPDU = BIT(22),
285}; 263};
286 264
287/* Transmit control fields. This data structure is passed to low-level driver
288 * with each TX frame. The low-level driver is responsible for configuring
289 * the hardware to use given values (depending on what is supported). */
290 265
291struct ieee80211_tx_control { 266#define IEEE80211_TX_INFO_DRIVER_DATA_SIZE \
292 struct ieee80211_vif *vif; 267 (sizeof(((struct sk_buff *)0)->cb) - 8)
293 struct ieee80211_rate *tx_rate; 268#define IEEE80211_TX_INFO_DRIVER_DATA_PTRS \
294 269 (IEEE80211_TX_INFO_DRIVER_DATA_SIZE / sizeof(void *))
295 /* Transmit rate for RTS/CTS frame */ 270
296 struct ieee80211_rate *rts_cts_rate; 271/**
297 272 * struct ieee80211_tx_info - skb transmit information
298 /* retry rate for the last retries */ 273 *
299 struct ieee80211_rate *alt_retry_rate; 274 * This structure is placed in skb->cb for three uses:
300 275 * (1) mac80211 TX control - mac80211 tells the driver what to do
301 u32 flags; /* tx control flags defined above */ 276 * (2) driver internal use (if applicable)
302 u8 key_idx; /* keyidx from hw->set_key(), undefined if 277 * (3) TX status information - driver tells mac80211 what happened
303 * IEEE80211_TXCTL_DO_NOT_ENCRYPT is set */ 278 *
304 u8 retry_limit; /* 1 = only first attempt, 2 = one retry, .. 279 * @flags: transmit info flags, defined above
305 * This could be used when set_retry_limit 280 * @retry_count: number of retries
306 * is not implemented by the driver */ 281 * @excessive_retries: set to 1 if the frame was retried many times
307 u8 antenna_sel_tx; /* 0 = default/diversity, otherwise bit 282 * but not acknowledged
308 * position represents antenna number used */ 283 * @ampdu_ack_len: number of aggregated frames.
309 u8 icv_len; /* length of the ICV/MIC field in octets */ 284 * relevant only if IEEE80211_TX_STATUS_AMPDU was set.
310 u8 iv_len; /* length of the IV field in octets */ 285 * @ampdu_ack_map: block ack bit map for the aggregation.
311 u8 queue; /* hardware queue to use for this frame; 286 * relevant only if IEEE80211_TX_STATUS_AMPDU was set.
312 * 0 = highest, hw->queues-1 = lowest */ 287 * @ack_signal: signal strength of the ACK frame
313 u16 aid; /* Station AID */ 288 */
314 int type; /* internal */ 289struct ieee80211_tx_info {
290 /* common information */
291 u32 flags;
292 u8 band;
293 s8 tx_rate_idx;
294 u8 antenna_sel_tx;
295
296 /* 1 byte hole */
297
298 union {
299 struct {
300 struct ieee80211_vif *vif;
301 struct ieee80211_key_conf *hw_key;
302 unsigned long jiffies;
303 int ifindex;
304 u16 aid;
305 s8 rts_cts_rate_idx, alt_retry_rate_idx;
306 u8 retry_limit;
307 u8 icv_len;
308 u8 iv_len;
309 } control;
310 struct {
311 u64 ampdu_ack_map;
312 int ack_signal;
313 u8 retry_count;
314 bool excessive_retries;
315 u8 ampdu_ack_len;
316 } status;
317 void *driver_data[IEEE80211_TX_INFO_DRIVER_DATA_PTRS];
318 };
315}; 319};
316 320
321static inline struct ieee80211_tx_info *IEEE80211_SKB_CB(struct sk_buff *skb)
322{
323 return (struct ieee80211_tx_info *)skb->cb;
324}
325
317 326
318/** 327/**
319 * enum mac80211_rx_flags - receive flags 328 * enum mac80211_rx_flags - receive flags
@@ -353,13 +362,16 @@ enum mac80211_rx_flags {
353 * The low-level driver should provide this information (the subset 362 * The low-level driver should provide this information (the subset
354 * supported by hardware) to the 802.11 code with each received 363 * supported by hardware) to the 802.11 code with each received
355 * frame. 364 * frame.
365 *
356 * @mactime: value in microseconds of the 64-bit Time Synchronization Function 366 * @mactime: value in microseconds of the 64-bit Time Synchronization Function
357 * (TSF) timer when the first data symbol (MPDU) arrived at the hardware. 367 * (TSF) timer when the first data symbol (MPDU) arrived at the hardware.
358 * @band: the active band when this frame was received 368 * @band: the active band when this frame was received
359 * @freq: frequency the radio was tuned to when receiving this frame, in MHz 369 * @freq: frequency the radio was tuned to when receiving this frame, in MHz
360 * @ssi: signal strength when receiving this frame 370 * @signal: signal strength when receiving this frame, either in dBm, in dB or
361 * @signal: used as 'qual' in statistics reporting 371 * unspecified depending on the hardware capabilities flags
362 * @noise: PHY noise when receiving this frame 372 * @IEEE80211_HW_SIGNAL_*
373 * @noise: noise when receiving this frame, in dBm.
374 * @qual: overall signal quality indication, in percent (0-100).
363 * @antenna: antenna used 375 * @antenna: antenna used
364 * @rate_idx: index of data rate into band's supported rates 376 * @rate_idx: index of data rate into band's supported rates
365 * @flag: %RX_FLAG_* 377 * @flag: %RX_FLAG_*
@@ -368,64 +380,15 @@ struct ieee80211_rx_status {
368 u64 mactime; 380 u64 mactime;
369 enum ieee80211_band band; 381 enum ieee80211_band band;
370 int freq; 382 int freq;
371 int ssi;
372 int signal; 383 int signal;
373 int noise; 384 int noise;
385 int qual;
374 int antenna; 386 int antenna;
375 int rate_idx; 387 int rate_idx;
376 int flag; 388 int flag;
377}; 389};
378 390
379/** 391/**
380 * enum ieee80211_tx_status_flags - transmit status flags
381 *
382 * Status flags to indicate various transmit conditions.
383 *
384 * @IEEE80211_TX_STATUS_TX_FILTERED: The frame was not transmitted
385 * because the destination STA was in powersave mode.
386 * @IEEE80211_TX_STATUS_ACK: Frame was acknowledged
387 * @IEEE80211_TX_STATUS_AMPDU: The frame was aggregated, so status
388 * is for the whole aggregation.
389 */
390enum ieee80211_tx_status_flags {
391 IEEE80211_TX_STATUS_TX_FILTERED = 1<<0,
392 IEEE80211_TX_STATUS_ACK = 1<<1,
393 IEEE80211_TX_STATUS_AMPDU = 1<<2,
394};
395
396/**
397 * struct ieee80211_tx_status - transmit status
398 *
399 * As much information as possible should be provided for each transmitted
400 * frame with ieee80211_tx_status().
401 *
402 * @control: a copy of the &struct ieee80211_tx_control passed to the driver
403 * in the tx() callback.
404 * @flags: transmit status flags, defined above
405 * @retry_count: number of retries
406 * @excessive_retries: set to 1 if the frame was retried many times
407 * but not acknowledged
408 * @ampdu_ack_len: number of aggregated frames.
409 * relevant only if IEEE80211_TX_STATUS_AMPDU was set.
410 * @ampdu_ack_map: block ack bit map for the aggregation.
411 * relevant only if IEEE80211_TX_STATUS_AMPDU was set.
412 * @ack_signal: signal strength of the ACK frame
413 * @queue_length: ?? REMOVE
414 * @queue_number: ?? REMOVE
415 */
416struct ieee80211_tx_status {
417 struct ieee80211_tx_control control;
418 u8 flags;
419 u8 retry_count;
420 bool excessive_retries;
421 u8 ampdu_ack_len;
422 u64 ampdu_ack_map;
423 int ack_signal;
424 int queue_length;
425 int queue_number;
426};
427
428/**
429 * enum ieee80211_conf_flags - configuration flags 392 * enum ieee80211_conf_flags - configuration flags
430 * 393 *
431 * Flags to define PHY configuration options 394 * Flags to define PHY configuration options
@@ -580,7 +543,6 @@ struct ieee80211_if_conf {
580 u8 *ssid; 543 u8 *ssid;
581 size_t ssid_len; 544 size_t ssid_len;
582 struct sk_buff *beacon; 545 struct sk_buff *beacon;
583 struct ieee80211_tx_control *beacon_control;
584}; 546};
585 547
586/** 548/**
@@ -619,11 +581,14 @@ enum ieee80211_key_len {
619 * @IEEE80211_KEY_FLAG_GENERATE_MMIC: This flag should be set by 581 * @IEEE80211_KEY_FLAG_GENERATE_MMIC: This flag should be set by
620 * the driver for a TKIP key if it requires Michael MIC 582 * the driver for a TKIP key if it requires Michael MIC
621 * generation in software. 583 * generation in software.
584 * @IEEE80211_KEY_FLAG_PAIRWISE: Set by mac80211, this flag indicates
585 * that the key is pairwise rather then a shared key.
622 */ 586 */
623enum ieee80211_key_flags { 587enum ieee80211_key_flags {
624 IEEE80211_KEY_FLAG_WMM_STA = 1<<0, 588 IEEE80211_KEY_FLAG_WMM_STA = 1<<0,
625 IEEE80211_KEY_FLAG_GENERATE_IV = 1<<1, 589 IEEE80211_KEY_FLAG_GENERATE_IV = 1<<1,
626 IEEE80211_KEY_FLAG_GENERATE_MMIC= 1<<2, 590 IEEE80211_KEY_FLAG_GENERATE_MMIC= 1<<2,
591 IEEE80211_KEY_FLAG_PAIRWISE = 1<<3,
627}; 592};
628 593
629/** 594/**
@@ -639,7 +604,12 @@ enum ieee80211_key_flags {
639 * @flags: key flags, see &enum ieee80211_key_flags. 604 * @flags: key flags, see &enum ieee80211_key_flags.
640 * @keyidx: the key index (0-3) 605 * @keyidx: the key index (0-3)
641 * @keylen: key material length 606 * @keylen: key material length
642 * @key: key material 607 * @key: key material. For ALG_TKIP the key is encoded as a 256-bit (32 byte)
608 * data block:
609 * - Temporal Encryption Key (128 bits)
610 * - Temporal Authenticator Tx MIC Key (64 bits)
611 * - Temporal Authenticator Rx MIC Key (64 bits)
612 *
643 */ 613 */
644struct ieee80211_key_conf { 614struct ieee80211_key_conf {
645 enum ieee80211_key_alg alg; 615 enum ieee80211_key_alg alg;
@@ -730,6 +700,29 @@ enum ieee80211_tkip_key_type {
730 * @IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE: 700 * @IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE:
731 * Hardware is not capable of receiving frames with short preamble on 701 * Hardware is not capable of receiving frames with short preamble on
732 * the 2.4 GHz band. 702 * the 2.4 GHz band.
703 *
704 * @IEEE80211_HW_SIGNAL_UNSPEC:
705 * Hardware can provide signal values but we don't know its units. We
706 * expect values between 0 and @max_signal.
707 * If possible please provide dB or dBm instead.
708 *
709 * @IEEE80211_HW_SIGNAL_DB:
710 * Hardware gives signal values in dB, decibel difference from an
711 * arbitrary, fixed reference. We expect values between 0 and @max_signal.
712 * If possible please provide dBm instead.
713 *
714 * @IEEE80211_HW_SIGNAL_DBM:
715 * Hardware gives signal values in dBm, decibel difference from
716 * one milliwatt. This is the preferred method since it is standardized
717 * between different devices. @max_signal does not need to be set.
718 *
719 * @IEEE80211_HW_NOISE_DBM:
720 * Hardware can provide noise (radio interference) values in units dBm,
721 * decibel difference from one milliwatt.
722 *
723 * @IEEE80211_HW_SPECTRUM_MGMT:
724 * Hardware supports spectrum management defined in 802.11h
725 * Measurement, Channel Switch, Quieting, TPC
733 */ 726 */
734enum ieee80211_hw_flags { 727enum ieee80211_hw_flags {
735 IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE = 1<<0, 728 IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE = 1<<0,
@@ -737,6 +730,11 @@ enum ieee80211_hw_flags {
737 IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING = 1<<2, 730 IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING = 1<<2,
738 IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE = 1<<3, 731 IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE = 1<<3,
739 IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE = 1<<4, 732 IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE = 1<<4,
733 IEEE80211_HW_SIGNAL_UNSPEC = 1<<5,
734 IEEE80211_HW_SIGNAL_DB = 1<<6,
735 IEEE80211_HW_SIGNAL_DBM = 1<<7,
736 IEEE80211_HW_NOISE_DBM = 1<<8,
737 IEEE80211_HW_SPECTRUM_MGMT = 1<<9,
740}; 738};
741 739
742/** 740/**
@@ -754,8 +752,11 @@ enum ieee80211_hw_flags {
754 * @conf: &struct ieee80211_conf, device configuration, don't use. 752 * @conf: &struct ieee80211_conf, device configuration, don't use.
755 * 753 *
756 * @workqueue: single threaded workqueue available for driver use, 754 * @workqueue: single threaded workqueue available for driver use,
757 * allocated by mac80211 on registration and flushed on 755 * allocated by mac80211 on registration and flushed when an
758 * unregistration. 756 * interface is removed.
757 * NOTICE: All work performed on this workqueue should NEVER
758 * acquire the RTNL lock (i.e. Don't use the function
759 * ieee80211_iterate_active_interfaces())
759 * 760 *
760 * @priv: pointer to private area that was allocated for driver use 761 * @priv: pointer to private area that was allocated for driver use
761 * along with this structure. 762 * along with this structure.
@@ -767,15 +768,18 @@ enum ieee80211_hw_flags {
767 * 768 *
768 * @channel_change_time: time (in microseconds) it takes to change channels. 769 * @channel_change_time: time (in microseconds) it takes to change channels.
769 * 770 *
770 * @max_rssi: Maximum value for ssi in RX information, use 771 * @max_signal: Maximum value for signal (rssi) in RX information, used
771 * negative numbers for dBm and 0 to indicate no support. 772 * only when @IEEE80211_HW_SIGNAL_UNSPEC or @IEEE80211_HW_SIGNAL_DB
772 *
773 * @max_signal: like @max_rssi, but for the signal value.
774 *
775 * @max_noise: like @max_rssi, but for the noise value.
776 * 773 *
777 * @queues: number of available hardware transmit queues for 774 * @queues: number of available hardware transmit queues for
778 * data packets. WMM/QoS requires at least four. 775 * data packets. WMM/QoS requires at least four, these
776 * queues need to have configurable access parameters.
777 *
778 * @ampdu_queues: number of available hardware transmit queues
779 * for A-MPDU packets, these have no access parameters
780 * because they're used only for A-MPDU frames. Note that
781 * mac80211 will not currently use any of the regular queues
782 * for aggregation.
779 * 783 *
780 * @rate_control_algorithm: rate control algorithm for this hardware. 784 * @rate_control_algorithm: rate control algorithm for this hardware.
781 * If unset (NULL), the default algorithm will be used. Must be 785 * If unset (NULL), the default algorithm will be used. Must be
@@ -794,10 +798,8 @@ struct ieee80211_hw {
794 unsigned int extra_tx_headroom; 798 unsigned int extra_tx_headroom;
795 int channel_change_time; 799 int channel_change_time;
796 int vif_data_size; 800 int vif_data_size;
797 u8 queues; 801 u16 queues, ampdu_queues;
798 s8 max_rssi;
799 s8 max_signal; 802 s8 max_signal;
800 s8 max_noise;
801}; 803};
802 804
803/** 805/**
@@ -822,6 +824,51 @@ static inline void SET_IEEE80211_PERM_ADDR(struct ieee80211_hw *hw, u8 *addr)
822 memcpy(hw->wiphy->perm_addr, addr, ETH_ALEN); 824 memcpy(hw->wiphy->perm_addr, addr, ETH_ALEN);
823} 825}
824 826
827static inline int ieee80211_num_regular_queues(struct ieee80211_hw *hw)
828{
829#ifdef CONFIG_MAC80211_QOS
830 return hw->queues;
831#else
832 return 1;
833#endif
834}
835
836static inline int ieee80211_num_queues(struct ieee80211_hw *hw)
837{
838#ifdef CONFIG_MAC80211_QOS
839 return hw->queues + hw->ampdu_queues;
840#else
841 return 1;
842#endif
843}
844
845static inline struct ieee80211_rate *
846ieee80211_get_tx_rate(const struct ieee80211_hw *hw,
847 const struct ieee80211_tx_info *c)
848{
849 if (WARN_ON(c->tx_rate_idx < 0))
850 return NULL;
851 return &hw->wiphy->bands[c->band]->bitrates[c->tx_rate_idx];
852}
853
854static inline struct ieee80211_rate *
855ieee80211_get_rts_cts_rate(const struct ieee80211_hw *hw,
856 const struct ieee80211_tx_info *c)
857{
858 if (c->control.rts_cts_rate_idx < 0)
859 return NULL;
860 return &hw->wiphy->bands[c->band]->bitrates[c->control.rts_cts_rate_idx];
861}
862
863static inline struct ieee80211_rate *
864ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw,
865 const struct ieee80211_tx_info *c)
866{
867 if (c->control.alt_retry_rate_idx < 0)
868 return NULL;
869 return &hw->wiphy->bands[c->band]->bitrates[c->control.alt_retry_rate_idx];
870}
871
825/** 872/**
826 * DOC: Hardware crypto acceleration 873 * DOC: Hardware crypto acceleration
827 * 874 *
@@ -979,8 +1026,10 @@ enum ieee80211_ampdu_mlme_action {
979 * @tx: Handler that 802.11 module calls for each transmitted frame. 1026 * @tx: Handler that 802.11 module calls for each transmitted frame.
980 * skb contains the buffer starting from the IEEE 802.11 header. 1027 * skb contains the buffer starting from the IEEE 802.11 header.
981 * The low-level driver should send the frame out based on 1028 * The low-level driver should send the frame out based on
982 * configuration in the TX control data. Must be implemented and 1029 * configuration in the TX control data. This handler should,
983 * atomic. 1030 * preferably, never fail and stop queues appropriately, more
1031 * importantly, however, it must never fail for A-MPDU-queues.
1032 * Must be implemented and atomic.
984 * 1033 *
985 * @start: Called before the first netdevice attached to the hardware 1034 * @start: Called before the first netdevice attached to the hardware
986 * is enabled. This should turn on the hardware and must turn on 1035 * is enabled. This should turn on the hardware and must turn on
@@ -1072,15 +1121,13 @@ enum ieee80211_ampdu_mlme_action {
1072 * of assocaited station or AP. 1121 * of assocaited station or AP.
1073 * 1122 *
1074 * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max), 1123 * @conf_tx: Configure TX queue parameters (EDCF (aifs, cw_min, cw_max),
1075 * bursting) for a hardware TX queue. The @queue parameter uses the 1124 * bursting) for a hardware TX queue. Must be atomic.
1076 * %IEEE80211_TX_QUEUE_* constants. Must be atomic.
1077 * 1125 *
1078 * @get_tx_stats: Get statistics of the current TX queue status. This is used 1126 * @get_tx_stats: Get statistics of the current TX queue status. This is used
1079 * to get number of currently queued packets (queue length), maximum queue 1127 * to get number of currently queued packets (queue length), maximum queue
1080 * size (limit), and total number of packets sent using each TX queue 1128 * size (limit), and total number of packets sent using each TX queue
1081 * (count). This information is used for WMM to find out which TX 1129 * (count). The 'stats' pointer points to an array that has hw->queues +
1082 * queues have room for more packets and by hostapd to provide 1130 * hw->ampdu_queues items.
1083 * statistics about the current queueing state to external programs.
1084 * 1131 *
1085 * @get_tsf: Get the current TSF timer value from firmware/hardware. Currently, 1132 * @get_tsf: Get the current TSF timer value from firmware/hardware. Currently,
1086 * this is only used for IBSS mode debugging and, as such, is not a 1133 * this is only used for IBSS mode debugging and, as such, is not a
@@ -1116,8 +1163,7 @@ enum ieee80211_ampdu_mlme_action {
1116 * that TX/RX_STOP can pass NULL for this parameter. 1163 * that TX/RX_STOP can pass NULL for this parameter.
1117 */ 1164 */
1118struct ieee80211_ops { 1165struct ieee80211_ops {
1119 int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb, 1166 int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
1120 struct ieee80211_tx_control *control);
1121 int (*start)(struct ieee80211_hw *hw); 1167 int (*start)(struct ieee80211_hw *hw);
1122 void (*stop)(struct ieee80211_hw *hw); 1168 void (*stop)(struct ieee80211_hw *hw);
1123 int (*add_interface)(struct ieee80211_hw *hw, 1169 int (*add_interface)(struct ieee80211_hw *hw,
@@ -1154,15 +1200,14 @@ struct ieee80211_ops {
1154 u32 short_retry, u32 long_retr); 1200 u32 short_retry, u32 long_retr);
1155 void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 1201 void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
1156 enum sta_notify_cmd, const u8 *addr); 1202 enum sta_notify_cmd, const u8 *addr);
1157 int (*conf_tx)(struct ieee80211_hw *hw, int queue, 1203 int (*conf_tx)(struct ieee80211_hw *hw, u16 queue,
1158 const struct ieee80211_tx_queue_params *params); 1204 const struct ieee80211_tx_queue_params *params);
1159 int (*get_tx_stats)(struct ieee80211_hw *hw, 1205 int (*get_tx_stats)(struct ieee80211_hw *hw,
1160 struct ieee80211_tx_queue_stats *stats); 1206 struct ieee80211_tx_queue_stats *stats);
1161 u64 (*get_tsf)(struct ieee80211_hw *hw); 1207 u64 (*get_tsf)(struct ieee80211_hw *hw);
1162 void (*reset_tsf)(struct ieee80211_hw *hw); 1208 void (*reset_tsf)(struct ieee80211_hw *hw);
1163 int (*beacon_update)(struct ieee80211_hw *hw, 1209 int (*beacon_update)(struct ieee80211_hw *hw,
1164 struct sk_buff *skb, 1210 struct sk_buff *skb);
1165 struct ieee80211_tx_control *control);
1166 int (*tx_last_beacon)(struct ieee80211_hw *hw); 1211 int (*tx_last_beacon)(struct ieee80211_hw *hw);
1167 int (*ampdu_action)(struct ieee80211_hw *hw, 1212 int (*ampdu_action)(struct ieee80211_hw *hw,
1168 enum ieee80211_ampdu_mlme_action action, 1213 enum ieee80211_ampdu_mlme_action action,
@@ -1358,13 +1403,9 @@ void ieee80211_rx_irqsafe(struct ieee80211_hw *hw,
1358 * 1403 *
1359 * @hw: the hardware the frame was transmitted by 1404 * @hw: the hardware the frame was transmitted by
1360 * @skb: the frame that was transmitted, owned by mac80211 after this call 1405 * @skb: the frame that was transmitted, owned by mac80211 after this call
1361 * @status: status information for this frame; the status pointer need not
1362 * be valid after this function returns and is not freed by mac80211,
1363 * it is recommended that it points to a stack area
1364 */ 1406 */
1365void ieee80211_tx_status(struct ieee80211_hw *hw, 1407void ieee80211_tx_status(struct ieee80211_hw *hw,
1366 struct sk_buff *skb, 1408 struct sk_buff *skb);
1367 struct ieee80211_tx_status *status);
1368 1409
1369/** 1410/**
1370 * ieee80211_tx_status_irqsafe - irq-safe transmit status callback 1411 * ieee80211_tx_status_irqsafe - irq-safe transmit status callback
@@ -1377,13 +1418,9 @@ void ieee80211_tx_status(struct ieee80211_hw *hw,
1377 * 1418 *
1378 * @hw: the hardware the frame was transmitted by 1419 * @hw: the hardware the frame was transmitted by
1379 * @skb: the frame that was transmitted, owned by mac80211 after this call 1420 * @skb: the frame that was transmitted, owned by mac80211 after this call
1380 * @status: status information for this frame; the status pointer need not
1381 * be valid after this function returns and is not freed by mac80211,
1382 * it is recommended that it points to a stack area
1383 */ 1421 */
1384void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw, 1422void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
1385 struct sk_buff *skb, 1423 struct sk_buff *skb);
1386 struct ieee80211_tx_status *status);
1387 1424
1388/** 1425/**
1389 * ieee80211_beacon_get - beacon generation function 1426 * ieee80211_beacon_get - beacon generation function
@@ -1399,8 +1436,7 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
1399 * is responsible of freeing it. 1436 * is responsible of freeing it.
1400 */ 1437 */
1401struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw, 1438struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
1402 struct ieee80211_vif *vif, 1439 struct ieee80211_vif *vif);
1403 struct ieee80211_tx_control *control);
1404 1440
1405/** 1441/**
1406 * ieee80211_rts_get - RTS frame generation function 1442 * ieee80211_rts_get - RTS frame generation function
@@ -1408,7 +1444,7 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
1408 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. 1444 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf.
1409 * @frame: pointer to the frame that is going to be protected by the RTS. 1445 * @frame: pointer to the frame that is going to be protected by the RTS.
1410 * @frame_len: the frame length (in octets). 1446 * @frame_len: the frame length (in octets).
1411 * @frame_txctl: &struct ieee80211_tx_control of the frame. 1447 * @frame_txctl: &struct ieee80211_tx_info of the frame.
1412 * @rts: The buffer where to store the RTS frame. 1448 * @rts: The buffer where to store the RTS frame.
1413 * 1449 *
1414 * If the RTS frames are generated by the host system (i.e., not in 1450 * If the RTS frames are generated by the host system (i.e., not in
@@ -1418,7 +1454,7 @@ struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
1418 */ 1454 */
1419void ieee80211_rts_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 1455void ieee80211_rts_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
1420 const void *frame, size_t frame_len, 1456 const void *frame, size_t frame_len,
1421 const struct ieee80211_tx_control *frame_txctl, 1457 const struct ieee80211_tx_info *frame_txctl,
1422 struct ieee80211_rts *rts); 1458 struct ieee80211_rts *rts);
1423 1459
1424/** 1460/**
@@ -1426,7 +1462,7 @@ void ieee80211_rts_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
1426 * @hw: pointer obtained from ieee80211_alloc_hw(). 1462 * @hw: pointer obtained from ieee80211_alloc_hw().
1427 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. 1463 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf.
1428 * @frame_len: the length of the frame that is going to be protected by the RTS. 1464 * @frame_len: the length of the frame that is going to be protected by the RTS.
1429 * @frame_txctl: &struct ieee80211_tx_control of the frame. 1465 * @frame_txctl: &struct ieee80211_tx_info of the frame.
1430 * 1466 *
1431 * If the RTS is generated in firmware, but the host system must provide 1467 * If the RTS is generated in firmware, but the host system must provide
1432 * the duration field, the low-level driver uses this function to receive 1468 * the duration field, the low-level driver uses this function to receive
@@ -1434,7 +1470,7 @@ void ieee80211_rts_get(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
1434 */ 1470 */
1435__le16 ieee80211_rts_duration(struct ieee80211_hw *hw, 1471__le16 ieee80211_rts_duration(struct ieee80211_hw *hw,
1436 struct ieee80211_vif *vif, size_t frame_len, 1472 struct ieee80211_vif *vif, size_t frame_len,
1437 const struct ieee80211_tx_control *frame_txctl); 1473 const struct ieee80211_tx_info *frame_txctl);
1438 1474
1439/** 1475/**
1440 * ieee80211_ctstoself_get - CTS-to-self frame generation function 1476 * ieee80211_ctstoself_get - CTS-to-self frame generation function
@@ -1442,7 +1478,7 @@ __le16 ieee80211_rts_duration(struct ieee80211_hw *hw,
1442 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. 1478 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf.
1443 * @frame: pointer to the frame that is going to be protected by the CTS-to-self. 1479 * @frame: pointer to the frame that is going to be protected by the CTS-to-self.
1444 * @frame_len: the frame length (in octets). 1480 * @frame_len: the frame length (in octets).
1445 * @frame_txctl: &struct ieee80211_tx_control of the frame. 1481 * @frame_txctl: &struct ieee80211_tx_info of the frame.
1446 * @cts: The buffer where to store the CTS-to-self frame. 1482 * @cts: The buffer where to store the CTS-to-self frame.
1447 * 1483 *
1448 * If the CTS-to-self frames are generated by the host system (i.e., not in 1484 * If the CTS-to-self frames are generated by the host system (i.e., not in
@@ -1453,7 +1489,7 @@ __le16 ieee80211_rts_duration(struct ieee80211_hw *hw,
1453void ieee80211_ctstoself_get(struct ieee80211_hw *hw, 1489void ieee80211_ctstoself_get(struct ieee80211_hw *hw,
1454 struct ieee80211_vif *vif, 1490 struct ieee80211_vif *vif,
1455 const void *frame, size_t frame_len, 1491 const void *frame, size_t frame_len,
1456 const struct ieee80211_tx_control *frame_txctl, 1492 const struct ieee80211_tx_info *frame_txctl,
1457 struct ieee80211_cts *cts); 1493 struct ieee80211_cts *cts);
1458 1494
1459/** 1495/**
@@ -1461,7 +1497,7 @@ void ieee80211_ctstoself_get(struct ieee80211_hw *hw,
1461 * @hw: pointer obtained from ieee80211_alloc_hw(). 1497 * @hw: pointer obtained from ieee80211_alloc_hw().
1462 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. 1498 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf.
1463 * @frame_len: the length of the frame that is going to be protected by the CTS-to-self. 1499 * @frame_len: the length of the frame that is going to be protected by the CTS-to-self.
1464 * @frame_txctl: &struct ieee80211_tx_control of the frame. 1500 * @frame_txctl: &struct ieee80211_tx_info of the frame.
1465 * 1501 *
1466 * If the CTS-to-self is generated in firmware, but the host system must provide 1502 * If the CTS-to-self is generated in firmware, but the host system must provide
1467 * the duration field, the low-level driver uses this function to receive 1503 * the duration field, the low-level driver uses this function to receive
@@ -1470,7 +1506,7 @@ void ieee80211_ctstoself_get(struct ieee80211_hw *hw,
1470__le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw, 1506__le16 ieee80211_ctstoself_duration(struct ieee80211_hw *hw,
1471 struct ieee80211_vif *vif, 1507 struct ieee80211_vif *vif,
1472 size_t frame_len, 1508 size_t frame_len,
1473 const struct ieee80211_tx_control *frame_txctl); 1509 const struct ieee80211_tx_info *frame_txctl);
1474 1510
1475/** 1511/**
1476 * ieee80211_generic_frame_duration - Calculate the duration field for a frame 1512 * ieee80211_generic_frame_duration - Calculate the duration field for a frame
@@ -1509,8 +1545,7 @@ __le16 ieee80211_generic_frame_duration(struct ieee80211_hw *hw,
1509 * use common code for all beacons. 1545 * use common code for all beacons.
1510 */ 1546 */
1511struct sk_buff * 1547struct sk_buff *
1512ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 1548ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
1513 struct ieee80211_tx_control *control);
1514 1549
1515/** 1550/**
1516 * ieee80211_get_hdrlen_from_skb - get header length from data 1551 * ieee80211_get_hdrlen_from_skb - get header length from data
@@ -1522,7 +1557,7 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
1522 * 1557 *
1523 * @skb: the frame 1558 * @skb: the frame
1524 */ 1559 */
1525int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb); 1560unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb);
1526 1561
1527/** 1562/**
1528 * ieee80211_get_hdrlen - get header length from frame control 1563 * ieee80211_get_hdrlen - get header length from frame control
@@ -1535,6 +1570,12 @@ int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb);
1535int ieee80211_get_hdrlen(u16 fc); 1570int ieee80211_get_hdrlen(u16 fc);
1536 1571
1537/** 1572/**
1573 * ieee80211_hdrlen - get header length in bytes from frame control
1574 * @fc: frame control field in little-endian format
1575 */
1576unsigned int ieee80211_hdrlen(__le16 fc);
1577
1578/**
1538 * ieee80211_get_tkip_key - get a TKIP rc4 for skb 1579 * ieee80211_get_tkip_key - get a TKIP rc4 for skb
1539 * 1580 *
1540 * This function computes a TKIP rc4 key for an skb. It computes 1581 * This function computes a TKIP rc4 key for an skb. It computes
@@ -1568,14 +1609,6 @@ void ieee80211_wake_queue(struct ieee80211_hw *hw, int queue);
1568void ieee80211_stop_queue(struct ieee80211_hw *hw, int queue); 1609void ieee80211_stop_queue(struct ieee80211_hw *hw, int queue);
1569 1610
1570/** 1611/**
1571 * ieee80211_start_queues - start all queues
1572 * @hw: pointer to as obtained from ieee80211_alloc_hw().
1573 *
1574 * Drivers should use this function instead of netif_start_queue.
1575 */
1576void ieee80211_start_queues(struct ieee80211_hw *hw);
1577
1578/**
1579 * ieee80211_stop_queues - stop all queues 1612 * ieee80211_stop_queues - stop all queues
1580 * @hw: pointer as obtained from ieee80211_alloc_hw(). 1613 * @hw: pointer as obtained from ieee80211_alloc_hw().
1581 * 1614 *
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index d9dd0f707296..f90443045c70 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -212,8 +212,11 @@ extern void unregister_pernet_gen_device(int id, struct pernet_operations *);
212struct ctl_path; 212struct ctl_path;
213struct ctl_table; 213struct ctl_table;
214struct ctl_table_header; 214struct ctl_table_header;
215
215extern struct ctl_table_header *register_net_sysctl_table(struct net *net, 216extern struct ctl_table_header *register_net_sysctl_table(struct net *net,
216 const struct ctl_path *path, struct ctl_table *table); 217 const struct ctl_path *path, struct ctl_table *table);
218extern struct ctl_table_header *register_net_sysctl_rotable(
219 const struct ctl_path *path, struct ctl_table *table);
217extern void unregister_net_sysctl_table(struct ctl_table_header *header); 220extern void unregister_net_sysctl_table(struct ctl_table_header *header);
218 221
219#endif /* __NET_NET_NAMESPACE_H */ 222#endif /* __NET_NET_NAMESPACE_H */
diff --git a/include/net/netfilter/ipv4/nf_conntrack_ipv4.h b/include/net/netfilter/ipv4/nf_conntrack_ipv4.h
index 9bf059817aec..7573d52a4346 100644
--- a/include/net/netfilter/ipv4/nf_conntrack_ipv4.h
+++ b/include/net/netfilter/ipv4/nf_conntrack_ipv4.h
@@ -9,8 +9,6 @@
9#ifndef _NF_CONNTRACK_IPV4_H 9#ifndef _NF_CONNTRACK_IPV4_H
10#define _NF_CONNTRACK_IPV4_H 10#define _NF_CONNTRACK_IPV4_H
11 11
12/* Returns new sk_buff, or NULL */
13struct sk_buff *nf_ct_ipv4_ct_gather_frags(struct sk_buff *skb);
14 12
15extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4; 13extern struct nf_conntrack_l3proto nf_conntrack_l3proto_ipv4;
16 14
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index 2dbd6c015b94..d77dec768dc2 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -223,6 +223,25 @@ static inline void nf_ct_refresh(struct nf_conn *ct,
223 __nf_ct_refresh_acct(ct, 0, skb, extra_jiffies, 0); 223 __nf_ct_refresh_acct(ct, 0, skb, extra_jiffies, 0);
224} 224}
225 225
226extern void __nf_ct_kill_acct(struct nf_conn *ct,
227 enum ip_conntrack_info ctinfo,
228 const struct sk_buff *skb,
229 int do_acct);
230
231/* kill conntrack and do accounting */
232static inline void nf_ct_kill_acct(struct nf_conn *ct,
233 enum ip_conntrack_info ctinfo,
234 const struct sk_buff *skb)
235{
236 __nf_ct_kill_acct(ct, ctinfo, skb, 1);
237}
238
239/* kill conntrack without accounting */
240static inline void nf_ct_kill(struct nf_conn *ct)
241{
242 __nf_ct_kill_acct(ct, 0, NULL, 0);
243}
244
226/* These are for NAT. Icky. */ 245/* These are for NAT. Icky. */
227/* Update TCP window tracking data when NAT mangles the packet */ 246/* Update TCP window tracking data when NAT mangles the packet */
228extern void nf_conntrack_tcp_update(const struct sk_buff *skb, 247extern void nf_conntrack_tcp_update(const struct sk_buff *skb,
diff --git a/include/net/netns/hash.h b/include/net/netns/hash.h
new file mode 100644
index 000000000000..548d78f2cc47
--- /dev/null
+++ b/include/net/netns/hash.h
@@ -0,0 +1,21 @@
1#ifndef __NET_NS_HASH_H__
2#define __NET_NS_HASH_H__
3
4#include <asm/cache.h>
5
6struct net;
7
8static inline unsigned net_hash_mix(struct net *net)
9{
10#ifdef CONFIG_NET_NS
11 /*
12 * shift this right to eliminate bits, that are
13 * always zeroed
14 */
15
16 return (unsigned)(((unsigned long)net) >> L1_CACHE_SHIFT);
17#else
18 return 0;
19#endif
20}
21#endif
diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h
index 34ee348a2cf2..a6ed83853dcc 100644
--- a/include/net/netns/ipv4.h
+++ b/include/net/netns/ipv4.h
@@ -18,6 +18,7 @@ struct netns_ipv4 {
18 struct ctl_table_header *forw_hdr; 18 struct ctl_table_header *forw_hdr;
19 struct ctl_table_header *frags_hdr; 19 struct ctl_table_header *frags_hdr;
20 struct ctl_table_header *ipv4_hdr; 20 struct ctl_table_header *ipv4_hdr;
21 struct ctl_table_header *route_hdr;
21#endif 22#endif
22 struct ipv4_devconf *devconf_all; 23 struct ipv4_devconf *devconf_all;
23 struct ipv4_devconf *devconf_dflt; 24 struct ipv4_devconf *devconf_dflt;
@@ -36,6 +37,7 @@ struct netns_ipv4 {
36 struct xt_table *iptable_mangle; 37 struct xt_table *iptable_mangle;
37 struct xt_table *iptable_raw; 38 struct xt_table *iptable_raw;
38 struct xt_table *arptable_filter; 39 struct xt_table *arptable_filter;
40 struct xt_table *iptable_security;
39#endif 41#endif
40 42
41 int sysctl_icmp_echo_ignore_all; 43 int sysctl_icmp_echo_ignore_all;
@@ -44,5 +46,8 @@ struct netns_ipv4 {
44 int sysctl_icmp_ratelimit; 46 int sysctl_icmp_ratelimit;
45 int sysctl_icmp_ratemask; 47 int sysctl_icmp_ratemask;
46 int sysctl_icmp_errors_use_inbound_ifaddr; 48 int sysctl_icmp_errors_use_inbound_ifaddr;
49
50 struct timer_list rt_secret_timer;
51 atomic_t rt_genid;
47}; 52};
48#endif 53#endif
diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h
index ac053be6c256..5bacd838e88b 100644
--- a/include/net/netns/ipv6.h
+++ b/include/net/netns/ipv6.h
@@ -35,6 +35,7 @@ struct netns_ipv6 {
35 struct xt_table *ip6table_filter; 35 struct xt_table *ip6table_filter;
36 struct xt_table *ip6table_mangle; 36 struct xt_table *ip6table_mangle;
37 struct xt_table *ip6table_raw; 37 struct xt_table *ip6table_raw;
38 struct xt_table *ip6table_security;
38#endif 39#endif
39 struct rt6_info *ip6_null_entry; 40 struct rt6_info *ip6_null_entry;
40 struct rt6_statistics *rt6_stats; 41 struct rt6_statistics *rt6_stats;
diff --git a/include/net/rose.h b/include/net/rose.h
index e5bb084d8754..cbd5364b2c8a 100644
--- a/include/net/rose.h
+++ b/include/net/rose.h
@@ -201,7 +201,7 @@ extern void rose_link_device_down(struct net_device *);
201extern struct net_device *rose_dev_first(void); 201extern struct net_device *rose_dev_first(void);
202extern struct net_device *rose_dev_get(rose_address *); 202extern struct net_device *rose_dev_get(rose_address *);
203extern struct rose_route *rose_route_free_lci(unsigned int, struct rose_neigh *); 203extern struct rose_route *rose_route_free_lci(unsigned int, struct rose_neigh *);
204extern struct rose_neigh *rose_get_neigh(rose_address *, unsigned char *, unsigned char *); 204extern struct rose_neigh *rose_get_neigh(rose_address *, unsigned char *, unsigned char *, int);
205extern int rose_rt_ioctl(unsigned int, void __user *); 205extern int rose_rt_ioctl(unsigned int, void __user *);
206extern void rose_link_failed(ax25_cb *, int); 206extern void rose_link_failed(ax25_cb *, int);
207extern int rose_route_frame(struct sk_buff *, ax25_cb *); 207extern int rose_route_frame(struct sk_buff *, ax25_cb *);
diff --git a/include/net/route.h b/include/net/route.h
index fc836ff824cc..3140cc500854 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -111,7 +111,7 @@ struct in_device;
111extern int ip_rt_init(void); 111extern int ip_rt_init(void);
112extern void ip_rt_redirect(__be32 old_gw, __be32 dst, __be32 new_gw, 112extern void ip_rt_redirect(__be32 old_gw, __be32 dst, __be32 new_gw,
113 __be32 src, struct net_device *dev); 113 __be32 src, struct net_device *dev);
114extern void rt_cache_flush(int how); 114extern void rt_cache_flush(struct net *net, int how);
115extern int __ip_route_output_key(struct net *, struct rtable **, const struct flowi *flp); 115extern int __ip_route_output_key(struct net *, struct rtable **, const struct flowi *flp);
116extern int ip_route_output_key(struct net *, struct rtable **, struct flowi *flp); 116extern int ip_route_output_key(struct net *, struct rtable **, struct flowi *flp);
117extern int ip_route_output_flow(struct net *, struct rtable **rp, struct flowi *flp, struct sock *sk, int flags); 117extern int ip_route_output_flow(struct net *, struct rtable **rp, struct flowi *flp, struct sock *sk, int flags);
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 90b1e8d23b16..17b932b8a55a 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -179,6 +179,8 @@ int sctp_eps_proc_init(void);
179void sctp_eps_proc_exit(void); 179void sctp_eps_proc_exit(void);
180int sctp_assocs_proc_init(void); 180int sctp_assocs_proc_init(void);
181void sctp_assocs_proc_exit(void); 181void sctp_assocs_proc_exit(void);
182int sctp_remaddr_proc_init(void);
183void sctp_remaddr_proc_exit(void);
182 184
183 185
184/* 186/*
@@ -218,8 +220,6 @@ extern struct kmem_cache *sctp_bucket_cachep __read_mostly;
218#define sctp_release_sock(sk) release_sock(sk) 220#define sctp_release_sock(sk) release_sock(sk)
219#define sctp_bh_lock_sock(sk) bh_lock_sock(sk) 221#define sctp_bh_lock_sock(sk) bh_lock_sock(sk)
220#define sctp_bh_unlock_sock(sk) bh_unlock_sock(sk) 222#define sctp_bh_unlock_sock(sk) bh_unlock_sock(sk)
221#define SCTP_SOCK_SLEEP_PRE(sk) SOCK_SLEEP_PRE(sk)
222#define SCTP_SOCK_SLEEP_POST(sk) SOCK_SLEEP_POST(sk)
223 223
224/* SCTP SNMP MIB stats handlers */ 224/* SCTP SNMP MIB stats handlers */
225DECLARE_SNMP_STAT(struct sctp_mib, sctp_statistics); 225DECLARE_SNMP_STAT(struct sctp_mib, sctp_statistics);
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 7f25195f9855..82116e84ee34 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -300,6 +300,7 @@ struct sctp_sock {
300 300
301 /* The default SACK delay timeout for new associations. */ 301 /* The default SACK delay timeout for new associations. */
302 __u32 sackdelay; 302 __u32 sackdelay;
303 __u32 sackfreq;
303 304
304 /* Flags controlling Heartbeat, SACK delay, and Path MTU Discovery. */ 305 /* Flags controlling Heartbeat, SACK delay, and Path MTU Discovery. */
305 __u32 param_flags; 306 __u32 param_flags;
@@ -826,7 +827,7 @@ struct sctp_packet *sctp_packet_init(struct sctp_packet *,
826 __u16 sport, __u16 dport); 827 __u16 sport, __u16 dport);
827struct sctp_packet *sctp_packet_config(struct sctp_packet *, __u32 vtag, int); 828struct sctp_packet *sctp_packet_config(struct sctp_packet *, __u32 vtag, int);
828sctp_xmit_t sctp_packet_transmit_chunk(struct sctp_packet *, 829sctp_xmit_t sctp_packet_transmit_chunk(struct sctp_packet *,
829 struct sctp_chunk *); 830 struct sctp_chunk *, int);
830sctp_xmit_t sctp_packet_append_chunk(struct sctp_packet *, 831sctp_xmit_t sctp_packet_append_chunk(struct sctp_packet *,
831 struct sctp_chunk *); 832 struct sctp_chunk *);
832int sctp_packet_transmit(struct sctp_packet *); 833int sctp_packet_transmit(struct sctp_packet *);
@@ -946,6 +947,7 @@ struct sctp_transport {
946 947
947 /* SACK delay timeout */ 948 /* SACK delay timeout */
948 unsigned long sackdelay; 949 unsigned long sackdelay;
950 __u32 sackfreq;
949 951
950 /* When was the last time (in jiffies) that we heard from this 952 /* When was the last time (in jiffies) that we heard from this
951 * transport? We use this to pick new active and retran paths. 953 * transport? We use this to pick new active and retran paths.
@@ -1553,6 +1555,7 @@ struct sctp_association {
1553 * : SACK's are not delayed (see Section 6). 1555 * : SACK's are not delayed (see Section 6).
1554 */ 1556 */
1555 __u8 sack_needed; /* Do we need to sack the peer? */ 1557 __u8 sack_needed; /* Do we need to sack the peer? */
1558 __u32 sack_cnt;
1556 1559
1557 /* These are capabilities which our peer advertised. */ 1560 /* These are capabilities which our peer advertised. */
1558 __u8 ecn_capable; /* Can peer do ECN? */ 1561 __u8 ecn_capable; /* Can peer do ECN? */
@@ -1662,6 +1665,7 @@ struct sctp_association {
1662 1665
1663 /* SACK delay timeout */ 1666 /* SACK delay timeout */
1664 unsigned long sackdelay; 1667 unsigned long sackdelay;
1668 __u32 sackfreq;
1665 1669
1666 1670
1667 unsigned long timeouts[SCTP_NUM_TIMEOUT_TYPES]; 1671 unsigned long timeouts[SCTP_NUM_TIMEOUT_TYPES];
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h
index 9619b9d35c9e..f205b10f0ab9 100644
--- a/include/net/sctp/user.h
+++ b/include/net/sctp/user.h
@@ -93,8 +93,9 @@ enum sctp_optname {
93#define SCTP_STATUS SCTP_STATUS 93#define SCTP_STATUS SCTP_STATUS
94 SCTP_GET_PEER_ADDR_INFO, 94 SCTP_GET_PEER_ADDR_INFO,
95#define SCTP_GET_PEER_ADDR_INFO SCTP_GET_PEER_ADDR_INFO 95#define SCTP_GET_PEER_ADDR_INFO SCTP_GET_PEER_ADDR_INFO
96 SCTP_DELAYED_ACK_TIME, 96 SCTP_DELAYED_ACK,
97#define SCTP_DELAYED_ACK_TIME SCTP_DELAYED_ACK_TIME 97#define SCTP_DELAYED_ACK_TIME SCTP_DELAYED_ACK
98#define SCTP_DELAYED_ACK SCTP_DELAYED_ACK
98 SCTP_CONTEXT, /* Receive Context */ 99 SCTP_CONTEXT, /* Receive Context */
99#define SCTP_CONTEXT SCTP_CONTEXT 100#define SCTP_CONTEXT SCTP_CONTEXT
100 SCTP_FRAGMENT_INTERLEAVE, 101 SCTP_FRAGMENT_INTERLEAVE,
@@ -136,12 +137,14 @@ enum sctp_optname {
136#define SCTP_GET_LOCAL_ADDRS_NUM_OLD SCTP_GET_LOCAL_ADDRS_NUM_OLD 137#define SCTP_GET_LOCAL_ADDRS_NUM_OLD SCTP_GET_LOCAL_ADDRS_NUM_OLD
137 SCTP_GET_LOCAL_ADDRS_OLD, /* Get all local addresss. */ 138 SCTP_GET_LOCAL_ADDRS_OLD, /* Get all local addresss. */
138#define SCTP_GET_LOCAL_ADDRS_OLD SCTP_GET_LOCAL_ADDRS_OLD 139#define SCTP_GET_LOCAL_ADDRS_OLD SCTP_GET_LOCAL_ADDRS_OLD
139 SCTP_SOCKOPT_CONNECTX, /* CONNECTX requests. */ 140 SCTP_SOCKOPT_CONNECTX_OLD, /* CONNECTX old requests. */
140#define SCTP_SOCKOPT_CONNECTX SCTP_SOCKOPT_CONNECTX 141#define SCTP_SOCKOPT_CONNECTX_OLD SCTP_SOCKOPT_CONNECTX_OLD
141 SCTP_GET_PEER_ADDRS, /* Get all peer addresss. */ 142 SCTP_GET_PEER_ADDRS, /* Get all peer addresss. */
142#define SCTP_GET_PEER_ADDRS SCTP_GET_PEER_ADDRS 143#define SCTP_GET_PEER_ADDRS SCTP_GET_PEER_ADDRS
143 SCTP_GET_LOCAL_ADDRS, /* Get all local addresss. */ 144 SCTP_GET_LOCAL_ADDRS, /* Get all local addresss. */
144#define SCTP_GET_LOCAL_ADDRS SCTP_GET_LOCAL_ADDRS 145#define SCTP_GET_LOCAL_ADDRS SCTP_GET_LOCAL_ADDRS
146 SCTP_SOCKOPT_CONNECTX, /* CONNECTX requests. */
147#define SCTP_SOCKOPT_CONNECTX SCTP_SOCKOPT_CONNECTX
145}; 148};
146 149
147/* 150/*
@@ -618,13 +621,26 @@ struct sctp_authkeyid {
618}; 621};
619 622
620 623
621/* 7.1.23. Delayed Ack Timer (SCTP_DELAYED_ACK_TIME) 624/*
625 * 7.1.23. Get or set delayed ack timer (SCTP_DELAYED_SACK)
622 * 626 *
623 * This options will get or set the delayed ack timer. The time is set 627 * This option will effect the way delayed acks are performed. This
624 * in milliseconds. If the assoc_id is 0, then this sets or gets the 628 * option allows you to get or set the delayed ack time, in
625 * endpoints default delayed ack timer value. If the assoc_id field is 629 * milliseconds. It also allows changing the delayed ack frequency.
626 * non-zero, then the set or get effects the specified association. 630 * Changing the frequency to 1 disables the delayed sack algorithm. If
631 * the assoc_id is 0, then this sets or gets the endpoints default
632 * values. If the assoc_id field is non-zero, then the set or get
633 * effects the specified association for the one to many model (the
634 * assoc_id field is ignored by the one to one model). Note that if
635 * sack_delay or sack_freq are 0 when setting this option, then the
636 * current values will remain unchanged.
627 */ 637 */
638struct sctp_sack_info {
639 sctp_assoc_t sack_assoc_id;
640 uint32_t sack_delay;
641 uint32_t sack_freq;
642};
643
628struct sctp_assoc_value { 644struct sctp_assoc_value {
629 sctp_assoc_t assoc_id; 645 sctp_assoc_t assoc_id;
630 uint32_t assoc_value; 646 uint32_t assoc_value;
diff --git a/include/net/snmp.h b/include/net/snmp.h
index ce2f48507510..57c93628695f 100644
--- a/include/net/snmp.h
+++ b/include/net/snmp.h
@@ -14,8 +14,6 @@
14 * as published by the Free Software Foundation; either version 14 * as published by the Free Software Foundation; either version
15 * 2 of the License, or (at your option) any later version. 15 * 2 of the License, or (at your option) any later version.
16 * 16 *
17 * $Id: snmp.h,v 1.19 2001/06/14 13:40:46 davem Exp $
18 *
19 */ 17 */
20 18
21#ifndef _SNMP_H 19#ifndef _SNMP_H
diff --git a/include/net/sock.h b/include/net/sock.h
index dc42b44c2aa1..3f4897ab432e 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -166,7 +166,7 @@ struct sock_common {
166 * @sk_err: last error 166 * @sk_err: last error
167 * @sk_err_soft: errors that don't cause failure but are the cause of a 167 * @sk_err_soft: errors that don't cause failure but are the cause of a
168 * persistent failure not just 'timed out' 168 * persistent failure not just 'timed out'
169 * @sk_drops: raw drops counter 169 * @sk_drops: raw/udp drops counter
170 * @sk_ack_backlog: current listen backlog 170 * @sk_ack_backlog: current listen backlog
171 * @sk_max_ack_backlog: listen backlog set in listen() 171 * @sk_max_ack_backlog: listen backlog set in listen()
172 * @sk_priority: %SO_PRIORITY setting 172 * @sk_priority: %SO_PRIORITY setting
@@ -524,7 +524,7 @@ struct proto {
524 int (*ioctl)(struct sock *sk, int cmd, 524 int (*ioctl)(struct sock *sk, int cmd,
525 unsigned long arg); 525 unsigned long arg);
526 int (*init)(struct sock *sk); 526 int (*init)(struct sock *sk);
527 int (*destroy)(struct sock *sk); 527 void (*destroy)(struct sock *sk);
528 void (*shutdown)(struct sock *sk, int how); 528 void (*shutdown)(struct sock *sk, int how);
529 int (*setsockopt)(struct sock *sk, int level, 529 int (*setsockopt)(struct sock *sk, int level,
530 int optname, char __user *optval, 530 int optname, char __user *optval,
@@ -990,6 +990,11 @@ static inline void sock_put(struct sock *sk)
990extern int sk_receive_skb(struct sock *sk, struct sk_buff *skb, 990extern int sk_receive_skb(struct sock *sk, struct sk_buff *skb,
991 const int nested); 991 const int nested);
992 992
993static inline void sk_set_socket(struct sock *sk, struct socket *sock)
994{
995 sk->sk_socket = sock;
996}
997
993/* Detach socket from process context. 998/* Detach socket from process context.
994 * Announce socket dead, detach it from wait queue and inode. 999 * Announce socket dead, detach it from wait queue and inode.
995 * Note that parent inode held reference count on this struct sock, 1000 * Note that parent inode held reference count on this struct sock,
@@ -1001,7 +1006,7 @@ static inline void sock_orphan(struct sock *sk)
1001{ 1006{
1002 write_lock_bh(&sk->sk_callback_lock); 1007 write_lock_bh(&sk->sk_callback_lock);
1003 sock_set_flag(sk, SOCK_DEAD); 1008 sock_set_flag(sk, SOCK_DEAD);
1004 sk->sk_socket = NULL; 1009 sk_set_socket(sk, NULL);
1005 sk->sk_sleep = NULL; 1010 sk->sk_sleep = NULL;
1006 write_unlock_bh(&sk->sk_callback_lock); 1011 write_unlock_bh(&sk->sk_callback_lock);
1007} 1012}
@@ -1011,7 +1016,7 @@ static inline void sock_graft(struct sock *sk, struct socket *parent)
1011 write_lock_bh(&sk->sk_callback_lock); 1016 write_lock_bh(&sk->sk_callback_lock);
1012 sk->sk_sleep = &parent->wait; 1017 sk->sk_sleep = &parent->wait;
1013 parent->sk = sk; 1018 parent->sk = sk;
1014 sk->sk_socket = parent; 1019 sk_set_socket(sk, parent);
1015 security_sock_graft(sk, parent); 1020 security_sock_graft(sk, parent);
1016 write_unlock_bh(&sk->sk_callback_lock); 1021 write_unlock_bh(&sk->sk_callback_lock);
1017} 1022}
@@ -1331,30 +1336,6 @@ extern int net_msg_warn;
1331#define LIMIT_NETDEBUG(fmt, args...) \ 1336#define LIMIT_NETDEBUG(fmt, args...) \
1332 do { if (net_msg_warn && net_ratelimit()) printk(fmt,##args); } while(0) 1337 do { if (net_msg_warn && net_ratelimit()) printk(fmt,##args); } while(0)
1333 1338
1334/*
1335 * Macros for sleeping on a socket. Use them like this:
1336 *
1337 * SOCK_SLEEP_PRE(sk)
1338 * if (condition)
1339 * schedule();
1340 * SOCK_SLEEP_POST(sk)
1341 *
1342 * N.B. These are now obsolete and were, afaik, only ever used in DECnet
1343 * and when the last use of them in DECnet has gone, I'm intending to
1344 * remove them.
1345 */
1346
1347#define SOCK_SLEEP_PRE(sk) { struct task_struct *tsk = current; \
1348 DECLARE_WAITQUEUE(wait, tsk); \
1349 tsk->state = TASK_INTERRUPTIBLE; \
1350 add_wait_queue((sk)->sk_sleep, &wait); \
1351 release_sock(sk);
1352
1353#define SOCK_SLEEP_POST(sk) tsk->state = TASK_RUNNING; \
1354 remove_wait_queue((sk)->sk_sleep, &wait); \
1355 lock_sock(sk); \
1356 }
1357
1358extern __u32 sysctl_wmem_max; 1339extern __u32 sysctl_wmem_max;
1359extern __u32 sysctl_rmem_max; 1340extern __u32 sysctl_rmem_max;
1360 1341
diff --git a/include/net/stp.h b/include/net/stp.h
new file mode 100644
index 000000000000..ad447f105417
--- /dev/null
+++ b/include/net/stp.h
@@ -0,0 +1,14 @@
1#ifndef _NET_STP_H
2#define _NET_STP_H
3
4struct stp_proto {
5 unsigned char group_address[ETH_ALEN];
6 void (*rcv)(const struct stp_proto *, struct sk_buff *,
7 struct net_device *);
8 void *data;
9};
10
11extern int stp_proto_register(const struct stp_proto *proto);
12extern void stp_proto_unregister(const struct stp_proto *proto);
13
14#endif /* _NET_STP_H */
diff --git a/include/net/tcp.h b/include/net/tcp.h
index cf54034019d9..6b827cc6c52f 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -398,6 +398,8 @@ extern void tcp_parse_options(struct sk_buff *skb,
398 struct tcp_options_received *opt_rx, 398 struct tcp_options_received *opt_rx,
399 int estab); 399 int estab);
400 400
401extern u8 *tcp_parse_md5sig_option(struct tcphdr *th);
402
401/* 403/*
402 * TCP v4 functions exported for the inet6 API 404 * TCP v4 functions exported for the inet6 API
403 */ 405 */
@@ -1113,13 +1115,19 @@ struct tcp_md5sig_pool {
1113#define TCP_MD5SIG_MAXKEYS (~(u32)0) /* really?! */ 1115#define TCP_MD5SIG_MAXKEYS (~(u32)0) /* really?! */
1114 1116
1115/* - functions */ 1117/* - functions */
1118extern int tcp_calc_md5_hash(char *md5_hash,
1119 struct tcp_md5sig_key *key,
1120 int bplen,
1121 struct tcphdr *th,
1122 unsigned int tcplen,
1123 struct tcp_md5sig_pool *hp);
1124
1116extern int tcp_v4_calc_md5_hash(char *md5_hash, 1125extern int tcp_v4_calc_md5_hash(char *md5_hash,
1117 struct tcp_md5sig_key *key, 1126 struct tcp_md5sig_key *key,
1118 struct sock *sk, 1127 struct sock *sk,
1119 struct dst_entry *dst, 1128 struct dst_entry *dst,
1120 struct request_sock *req, 1129 struct request_sock *req,
1121 struct tcphdr *th, 1130 struct tcphdr *th,
1122 int protocol,
1123 unsigned int tcplen); 1131 unsigned int tcplen);
1124extern struct tcp_md5sig_key *tcp_v4_md5_lookup(struct sock *sk, 1132extern struct tcp_md5sig_key *tcp_v4_md5_lookup(struct sock *sk,
1125 struct sock *addr_sk); 1133 struct sock *addr_sk);
@@ -1132,6 +1140,16 @@ extern int tcp_v4_md5_do_add(struct sock *sk,
1132extern int tcp_v4_md5_do_del(struct sock *sk, 1140extern int tcp_v4_md5_do_del(struct sock *sk,
1133 __be32 addr); 1141 __be32 addr);
1134 1142
1143#ifdef CONFIG_TCP_MD5SIG
1144#define tcp_twsk_md5_key(twsk) ((twsk)->tw_md5_keylen ? \
1145 &(struct tcp_md5sig_key) { \
1146 .key = (twsk)->tw_md5_key, \
1147 .keylen = (twsk)->tw_md5_keylen, \
1148 } : NULL)
1149#else
1150#define tcp_twsk_md5_key(twsk) NULL
1151#endif
1152
1135extern struct tcp_md5sig_pool **tcp_alloc_md5sig_pool(void); 1153extern struct tcp_md5sig_pool **tcp_alloc_md5sig_pool(void);
1136extern void tcp_free_md5sig_pool(void); 1154extern void tcp_free_md5sig_pool(void);
1137 1155
@@ -1348,7 +1366,7 @@ extern void tcp_proc_unregister(struct net *net, struct tcp_seq_afinfo *afinfo);
1348extern struct request_sock_ops tcp_request_sock_ops; 1366extern struct request_sock_ops tcp_request_sock_ops;
1349extern struct request_sock_ops tcp6_request_sock_ops; 1367extern struct request_sock_ops tcp6_request_sock_ops;
1350 1368
1351extern int tcp_v4_destroy_sock(struct sock *sk); 1369extern void tcp_v4_destroy_sock(struct sock *sk);
1352 1370
1353extern int tcp_v4_gso_send_check(struct sk_buff *skb); 1371extern int tcp_v4_gso_send_check(struct sk_buff *skb);
1354extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features); 1372extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features);
@@ -1369,7 +1387,6 @@ struct tcp_sock_af_ops {
1369 struct dst_entry *dst, 1387 struct dst_entry *dst,
1370 struct request_sock *req, 1388 struct request_sock *req,
1371 struct tcphdr *th, 1389 struct tcphdr *th,
1372 int protocol,
1373 unsigned int len); 1390 unsigned int len);
1374 int (*md5_add) (struct sock *sk, 1391 int (*md5_add) (struct sock *sk,
1375 struct sock *addr_sk, 1392 struct sock *addr_sk,
diff --git a/include/net/tipc/tipc_port.h b/include/net/tipc/tipc_port.h
index 11105bcc4457..9923e41a8215 100644
--- a/include/net/tipc/tipc_port.h
+++ b/include/net/tipc/tipc_port.h
@@ -84,7 +84,8 @@ struct tipc_port {
84u32 tipc_createport_raw(void *usr_handle, 84u32 tipc_createport_raw(void *usr_handle,
85 u32 (*dispatcher)(struct tipc_port *, struct sk_buff *), 85 u32 (*dispatcher)(struct tipc_port *, struct sk_buff *),
86 void (*wakeup)(struct tipc_port *), 86 void (*wakeup)(struct tipc_port *),
87 const u32 importance); 87 const u32 importance,
88 struct tipc_port **tp_ptr);
88 89
89int tipc_reject_msg(struct sk_buff *buf, u32 err); 90int tipc_reject_msg(struct sk_buff *buf, u32 err);
90 91
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h
index 112934a3288d..876b6f2bb4fd 100644
--- a/include/net/transp_v6.h
+++ b/include/net/transp_v6.h
@@ -53,7 +53,7 @@ extern int datagram_send_ctl(struct net *net,
53 */ 53 */
54extern struct inet_connection_sock_af_ops ipv4_specific; 54extern struct inet_connection_sock_af_ops ipv4_specific;
55 55
56extern int inet6_destroy_sock(struct sock *sk); 56extern void inet6_destroy_sock(struct sock *sk);
57 57
58#endif 58#endif
59 59
diff --git a/include/net/udp.h b/include/net/udp.h
index ccce83707046..3e551592aa76 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -158,17 +158,17 @@ DECLARE_SNMP_STAT(struct udp_mib, udplite_stats_in6);
158/* 158/*
159 * SNMP statistics for UDP and UDP-Lite 159 * SNMP statistics for UDP and UDP-Lite
160 */ 160 */
161#define UDP_INC_STATS_USER(field, is_udplite) do { \ 161#define UDP_INC_STATS_USER(net, field, is_udplite) do { (void)net; \
162 if (is_udplite) SNMP_INC_STATS_USER(udplite_statistics, field); \ 162 if (is_udplite) SNMP_INC_STATS_USER(udplite_statistics, field); \
163 else SNMP_INC_STATS_USER(udp_statistics, field); } while(0) 163 else SNMP_INC_STATS_USER(udp_statistics, field); } while(0)
164#define UDP_INC_STATS_BH(field, is_udplite) do { \ 164#define UDP_INC_STATS_BH(net, field, is_udplite) do { (void)net; \
165 if (is_udplite) SNMP_INC_STATS_BH(udplite_statistics, field); \ 165 if (is_udplite) SNMP_INC_STATS_BH(udplite_statistics, field); \
166 else SNMP_INC_STATS_BH(udp_statistics, field); } while(0) 166 else SNMP_INC_STATS_BH(udp_statistics, field); } while(0)
167 167
168#define UDP6_INC_STATS_BH(field, is_udplite) do { \ 168#define UDP6_INC_STATS_BH(net, field, is_udplite) do { (void)net; \
169 if (is_udplite) SNMP_INC_STATS_BH(udplite_stats_in6, field); \ 169 if (is_udplite) SNMP_INC_STATS_BH(udplite_stats_in6, field); \
170 else SNMP_INC_STATS_BH(udp_stats_in6, field); } while(0) 170 else SNMP_INC_STATS_BH(udp_stats_in6, field); } while(0)
171#define UDP6_INC_STATS_USER(field, is_udplite) do { \ 171#define UDP6_INC_STATS_USER(net, field, is_udplite) do { (void)net; \
172 if (is_udplite) SNMP_INC_STATS_USER(udplite_stats_in6, field); \ 172 if (is_udplite) SNMP_INC_STATS_USER(udplite_stats_in6, field); \
173 else SNMP_INC_STATS_USER(udp_stats_in6, field); } while(0) 173 else SNMP_INC_STATS_USER(udp_stats_in6, field); } while(0)
174 174
@@ -176,12 +176,12 @@ DECLARE_SNMP_STAT(struct udp_mib, udplite_stats_in6);
176#define UDPX_INC_STATS_BH(sk, field) \ 176#define UDPX_INC_STATS_BH(sk, field) \
177 do { \ 177 do { \
178 if ((sk)->sk_family == AF_INET) \ 178 if ((sk)->sk_family == AF_INET) \
179 UDP_INC_STATS_BH(field, 0); \ 179 UDP_INC_STATS_BH(sock_net(sk), field, 0); \
180 else \ 180 else \
181 UDP6_INC_STATS_BH(field, 0); \ 181 UDP6_INC_STATS_BH(sock_net(sk), field, 0); \
182 } while (0); 182 } while (0);
183#else 183#else
184#define UDPX_INC_STATS_BH(sk, field) UDP_INC_STATS_BH(field, 0) 184#define UDPX_INC_STATS_BH(sk, field) UDP_INC_STATS_BH(sock_net(sk), field, 0)
185#endif 185#endif
186 186
187/* /proc */ 187/* /proc */
@@ -196,8 +196,8 @@ struct udp_seq_afinfo {
196struct udp_iter_state { 196struct udp_iter_state {
197 struct seq_net_private p; 197 struct seq_net_private p;
198 sa_family_t family; 198 sa_family_t family;
199 struct hlist_head *hashtable;
200 int bucket; 199 int bucket;
200 struct hlist_head *hashtable;
201}; 201};
202 202
203#ifdef CONFIG_PROC_FS 203#ifdef CONFIG_PROC_FS
diff --git a/include/net/wext.h b/include/net/wext.h
index 80b31d826b7a..6d76a39a9c5b 100644
--- a/include/net/wext.h
+++ b/include/net/wext.h
@@ -12,6 +12,8 @@ extern int wext_proc_init(struct net *net);
12extern void wext_proc_exit(struct net *net); 12extern void wext_proc_exit(struct net *net);
13extern int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd, 13extern int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned int cmd,
14 void __user *arg); 14 void __user *arg);
15extern int compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
16 unsigned long arg);
15#else 17#else
16static inline int wext_proc_init(struct net *net) 18static inline int wext_proc_init(struct net *net)
17{ 19{
@@ -26,6 +28,11 @@ static inline int wext_handle_ioctl(struct net *net, struct ifreq *ifr, unsigned
26{ 28{
27 return -EINVAL; 29 return -EINVAL;
28} 30}
31static inline int compat_wext_handle_ioctl(struct net *net, unsigned int cmd,
32 unsigned long arg)
33{
34 return -EINVAL;
35}
29#endif 36#endif
30 37
31#endif /* __NET_WEXT_H */ 38#endif /* __NET_WEXT_H */
diff --git a/include/net/wireless.h b/include/net/wireless.h
index 667b4080d30f..9324f8dd183e 100644
--- a/include/net/wireless.h
+++ b/include/net/wireless.h
@@ -39,12 +39,18 @@ enum ieee80211_band {
39 * on this channel. 39 * on this channel.
40 * @IEEE80211_CHAN_NO_IBSS: IBSS is not allowed on this channel. 40 * @IEEE80211_CHAN_NO_IBSS: IBSS is not allowed on this channel.
41 * @IEEE80211_CHAN_RADAR: Radar detection is required on this channel. 41 * @IEEE80211_CHAN_RADAR: Radar detection is required on this channel.
42 * @IEEE80211_CHAN_NO_FAT_ABOVE: extension channel above this channel
43 * is not permitted.
44 * @IEEE80211_CHAN_NO_FAT_BELOW: extension channel below this channel
45 * is not permitted.
42 */ 46 */
43enum ieee80211_channel_flags { 47enum ieee80211_channel_flags {
44 IEEE80211_CHAN_DISABLED = 1<<0, 48 IEEE80211_CHAN_DISABLED = 1<<0,
45 IEEE80211_CHAN_PASSIVE_SCAN = 1<<1, 49 IEEE80211_CHAN_PASSIVE_SCAN = 1<<1,
46 IEEE80211_CHAN_NO_IBSS = 1<<2, 50 IEEE80211_CHAN_NO_IBSS = 1<<2,
47 IEEE80211_CHAN_RADAR = 1<<3, 51 IEEE80211_CHAN_RADAR = 1<<3,
52 IEEE80211_CHAN_NO_FAT_ABOVE = 1<<4,
53 IEEE80211_CHAN_NO_FAT_BELOW = 1<<5,
48}; 54};
49 55
50/** 56/**