diff options
Diffstat (limited to 'include/linux')
41 files changed, 977 insertions, 135 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 | ||
275 | struct ethtool_rxnfc { | ||
276 | __u32 cmd; | ||
277 | __u32 flow_type; | ||
278 | __u64 data; | ||
279 | }; | ||
280 | |||
275 | #ifdef __KERNEL__ | 281 | #ifdef __KERNEL__ |
276 | 282 | ||
277 | struct net_device; | 283 | struct 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 */ |
47 | typedef struct hdlc_device { | 47 | typedef 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 */ |
110 | void detach_hdlc_protocol(struct net_device *dev); | 109 | void detach_hdlc_protocol(struct net_device *dev); |
111 | 110 | ||
112 | static __inline__ struct net_device_stats *hdlc_stats(struct net_device *dev) | ||
113 | { | ||
114 | return &dev_to_hdlc(dev)->stats; | ||
115 | } | ||
116 | |||
117 | |||
118 | static __inline__ __be16 hdlc_type_trans(struct sk_buff *skb, | 111 | static __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 | ||
102 | struct ieee80211_hdr { | 103 | struct 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 | */ | ||
117 | static 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 | */ | ||
126 | static 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 | */ | ||
135 | static 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 | */ | ||
145 | static 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 | */ | ||
154 | static 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 | */ | ||
163 | static 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 | */ | ||
172 | static 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 | */ | ||
181 | static 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 | */ | ||
190 | static 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 | */ | ||
199 | static 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 | */ | ||
209 | static 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 | */ | ||
219 | static 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 | */ | ||
229 | static 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 | */ | ||
243 | static 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 | */ | ||
257 | static 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 | */ | ||
267 | static 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 | */ | ||
277 | static 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 | */ | ||
287 | static 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 | */ | ||
297 | static 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 | */ | ||
307 | static 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 | */ | ||
317 | static 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 | */ | ||
327 | static 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 | */ | ||
337 | static 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 | */ | ||
347 | static 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 | */ | ||
357 | static 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 | */ | ||
367 | static 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 | */ | ||
377 | static 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 | */ | ||
387 | static 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 | */ | ||
397 | static 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 | */ | ||
407 | static 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 | */ | ||
417 | static 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 | */ | ||
427 | static 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 | */ | ||
437 | static 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 | */ | ||
447 | static 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 | */ | ||
457 | static 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 | ||
113 | struct ieee80211s_hdr { | 463 | struct 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 | */ | ||
477 | struct 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 | */ | ||
489 | struct 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 | */ | ||
501 | struct ieee80211_channel_sw_ie { | ||
502 | u8 mode; | ||
503 | u8 new_ch_num; | ||
504 | u8 count; | ||
505 | } __attribute__ ((packed)); | ||
122 | 506 | ||
123 | struct ieee80211_mgmt { | 507 | struct 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 */ | ||
928 | enum 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 */ |
516 | enum ieee80211_back_actioncode { | 937 | enum 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 | */ | ||
972 | static 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 | */ |
553 | static inline u8 *ieee80211_get_SA(struct ieee80211_hdr *hdr) | 990 | static 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 | */ |
578 | static inline u8 *ieee80211_get_DA(struct ieee80211_hdr *hdr) | 1009 | static 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 | */ | ||
596 | static 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 | ||
52 | struct tun_pi { | 60 | struct 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 | ||
403 | enum vlan_flags { | 403 | enum vlan_flags { |
404 | VLAN_FLAG_REORDER_HDR = 0x1, | 404 | VLAN_FLAG_REORDER_HDR = 0x1, |
405 | VLAN_FLAG_GVRP = 0x2, | ||
405 | }; | 406 | }; |
406 | 407 | ||
407 | enum vlan_name_types { | 408 | enum 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, | |||
228 | extern int ip_mc_gsfget(struct sock *sk, struct group_filter *gsf, | 228 | extern 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); |
230 | extern int ip_mc_sf_allow(struct sock *sk, __be32 local, __be32 rmt, int dif); | 230 | extern int ip_mc_sf_allow(struct sock *sk, __be32 local, __be32 rmt, int dif); |
231 | extern void ip_mr_init(void); | ||
232 | extern void ip_mc_init_dev(struct in_device *); | 231 | extern void ip_mc_init_dev(struct in_device *); |
233 | extern void ip_mc_destroy_dev(struct in_device *); | 232 | extern void ip_mc_destroy_dev(struct in_device *); |
234 | extern void ip_mc_up(struct in_device *); | 233 | extern 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 | ||
147 | extern int ip_mroute_setsockopt(struct sock *, int, char __user *, int); | 148 | extern int ip_mroute_setsockopt(struct sock *, int, char __user *, int); |
148 | extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *); | 149 | extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *); |
149 | extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg); | 150 | extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg); |
150 | extern void ip_mr_init(void); | 151 | extern int ip_mr_init(void); |
152 | #else | ||
153 | static inline | ||
154 | int ip_mroute_setsockopt(struct sock *sock, | ||
155 | int optname, char __user *optval, int optlen) | ||
156 | { | ||
157 | return -ENOPROTOOPT; | ||
158 | } | ||
159 | |||
160 | static inline | ||
161 | int ip_mroute_getsockopt(struct sock *sock, | ||
162 | int optname, char __user *optval, int __user *optlen) | ||
163 | { | ||
164 | return -ENOPROTOOPT; | ||
165 | } | ||
151 | 166 | ||
167 | static inline | ||
168 | int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg) | ||
169 | { | ||
170 | return -ENOIOCTLCMD; | ||
171 | } | ||
172 | |||
173 | static inline int ip_mr_init(void) | ||
174 | { | ||
175 | return 0; | ||
176 | } | ||
177 | #endif | ||
152 | 178 | ||
153 | struct vif_device | 179 | struct 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 | ||
132 | struct sock; | 132 | struct sock; |
133 | 133 | ||
134 | #ifdef CONFIG_IPV6_MROUTE | ||
134 | extern int ip6_mroute_setsockopt(struct sock *, int, char __user *, int); | 135 | extern int ip6_mroute_setsockopt(struct sock *, int, char __user *, int); |
135 | extern int ip6_mroute_getsockopt(struct sock *, int, char __user *, int __user *); | 136 | extern int ip6_mroute_getsockopt(struct sock *, int, char __user *, int __user *); |
136 | extern int ip6_mr_input(struct sk_buff *skb); | 137 | extern int ip6_mr_input(struct sk_buff *skb); |
137 | extern int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg); | 138 | extern int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg); |
138 | extern void ip6_mr_init(void); | 139 | extern int ip6_mr_init(void); |
140 | extern void ip6_mr_cleanup(void); | ||
141 | #else | ||
142 | static inline | ||
143 | int ip6_mroute_setsockopt(struct sock *sock, | ||
144 | int optname, char __user *optval, int optlen) | ||
145 | { | ||
146 | return -ENOPROTOOPT; | ||
147 | } | ||
148 | |||
149 | static inline | ||
150 | int ip6_mroute_getsockopt(struct sock *sock, | ||
151 | int optname, char __user *optval, int __user *optlen) | ||
152 | { | ||
153 | return -ENOPROTOOPT; | ||
154 | } | ||
155 | |||
156 | static inline | ||
157 | int ip6mr_ioctl(struct sock *sk, int cmd, void __user *arg) | ||
158 | { | ||
159 | return -ENOIOCTLCMD; | ||
160 | } | ||
161 | |||
162 | static inline int ip6_mr_init(void) | ||
163 | { | ||
164 | return 0; | ||
165 | } | ||
166 | |||
167 | static inline void ip6_mr_cleanup(void) | ||
168 | { | ||
169 | return; | ||
170 | } | ||
171 | #endif | ||
139 | 172 | ||
140 | struct mif_device | 173 | struct 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 | ||
18 | struct mv643xx_eth_shared_platform_data { | 18 | struct 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 | ||
23 | struct mv643xx_eth_platform_data { | 23 | struct 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); | |||
890 | extern int dev_alloc_name(struct net_device *dev, const char *name); | 892 | extern int dev_alloc_name(struct net_device *dev, const char *name); |
891 | extern int dev_open(struct net_device *dev); | 893 | extern int dev_open(struct net_device *dev); |
892 | extern int dev_close(struct net_device *dev); | 894 | extern int dev_close(struct net_device *dev); |
895 | extern void dev_disable_lro(struct net_device *dev); | ||
893 | extern int dev_queue_xmit(struct sk_buff *skb); | 896 | extern int dev_queue_xmit(struct sk_buff *skb); |
894 | extern int register_netdevice(struct net_device *dev); | 897 | extern int register_netdevice(struct net_device *dev); |
895 | extern void unregister_netdevice(struct net_device *dev); | 898 | extern 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 | |||
1480 | extern int __dev_addr_add(struct dev_addr_list **list, int *count, void *addr, int alen, int newonly); | 1483 | extern int __dev_addr_add(struct dev_addr_list **list, int *count, void *addr, int alen, int newonly); |
1481 | extern int __dev_addr_sync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count); | 1484 | extern int __dev_addr_sync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count); |
1482 | extern void __dev_addr_unsync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count); | 1485 | extern void __dev_addr_unsync(struct dev_addr_list **to, int *to_count, struct dev_addr_list **from, int *from_count); |
1483 | extern void dev_set_promiscuity(struct net_device *dev, int inc); | 1486 | extern int dev_set_promiscuity(struct net_device *dev, int inc); |
1484 | extern void dev_set_allmulti(struct net_device *dev, int inc); | 1487 | extern int dev_set_allmulti(struct net_device *dev, int inc); |
1485 | extern void netdev_state_change(struct net_device *dev); | 1488 | extern void netdev_state_change(struct net_device *dev); |
1489 | extern void netdev_bonding_change(struct net_device *dev); | ||
1486 | extern void netdev_features_change(struct net_device *dev); | 1490 | extern void netdev_features_change(struct net_device *dev); |
1487 | /* Load a device via the kmod */ | 1491 | /* Load a device via the kmod */ |
1488 | extern void dev_load(struct net *net, const char *name); | 1492 | extern 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); | |||
1509 | extern void dev_seq_stop(struct seq_file *seq, void *v); | 1513 | extern void dev_seq_stop(struct seq_file *seq, void *v); |
1510 | #endif | 1514 | #endif |
1511 | 1515 | ||
1516 | extern int netdev_class_create_file(struct class_attribute *class_attr); | ||
1517 | extern void netdev_class_remove_file(struct class_attribute *class_attr); | ||
1518 | |||
1512 | extern void linkwatch_run_queue(void); | 1519 | extern void linkwatch_run_queue(void); |
1513 | 1520 | ||
1514 | extern int netdev_compute_features(unsigned long all, unsigned long one); | 1521 | extern 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 | ||
107 | enum 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 | |||
106 | enum ctattr_counters { | 116 | enum 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 */ | ||
26 | struct 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: */ |
195 | struct sock *netlink_getsockbyfilp(struct file *filp); | 195 | struct sock *netlink_getsockbyfilp(struct file *filp); |
196 | int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, | 196 | int netlink_attachskb(struct sock *sk, struct sk_buff *skb, |
197 | long *timeo, struct sock *ssk); | 197 | long *timeo, struct sock *ssk); |
198 | void netlink_detachskb(struct sock *sk, struct sk_buff *skb); | 198 | void netlink_detachskb(struct sock *sk, struct sk_buff *skb); |
199 | int netlink_sendskb(struct sock *sk, struct sk_buff *skb); | 199 | int 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 | */ |
38 | enum rfkill_type { | 39 | enum 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 | ||
46 | enum rfkill_state { | 48 | enum 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); | |||
95 | int rfkill_register(struct rfkill *rfkill); | 113 | int rfkill_register(struct rfkill *rfkill); |
96 | void rfkill_unregister(struct rfkill *rfkill); | 114 | void rfkill_unregister(struct rfkill *rfkill); |
97 | 115 | ||
116 | int 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 | */ | ||
125 | static 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 | |||
150 | int register_rfkill_notifier(struct notifier_block *nb); | ||
151 | int 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 | ||
1705 | extern void __skb_warn_lro_forwarding(const struct sk_buff *skb); | ||
1706 | |||
1707 | static 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 | |||
1705 | static inline void skb_forward_csum(struct sk_buff *skb) | 1719 | static 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 | |||
7 | struct 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. */ |
404 | extern u32 ssb_dma_translation(struct ssb_device *dev); | 405 | extern 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 | ||
408 | extern int ssb_dma_set_mask(struct ssb_device *ssb_dev, u64 mask); | 409 | extern int ssb_dma_set_mask(struct ssb_device *dev, u64 mask); |
410 | |||
411 | extern void * ssb_dma_alloc_consistent(struct ssb_device *dev, size_t size, | ||
412 | dma_addr_t *dma_handle, gfp_t gfp_flags); | ||
413 | extern 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 | |||
417 | static 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 | |||
425 | static 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 | |||
438 | static 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 | |||
452 | static 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 | |||
467 | static 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 | |||
485 | static 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 | |||
503 | static 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 | |||
524 | static 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 | ||
410 | static inline struct tcp_sock *tcp_sk(const struct sock *sk) | 410 | static 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 | ||
42 | static inline struct udphdr *udp_hdr(const struct sk_buff *skb) | 43 | static 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 | ||
50 | static inline int udp_hashfn(struct net *net, const unsigned num) | ||
51 | { | ||
52 | return (num + net_hash_mix(net)) & (UDP_HTABLE_SIZE - 1); | ||
53 | } | ||
54 | |||
49 | struct udp_sock { | 55 | struct 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 | ||
262 | extern void rndis_status(struct usbnet *dev, struct urb *urb); | 262 | extern void rndis_status(struct usbnet *dev, struct urb *urb); |
263 | extern int rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf); | 263 | extern int |
264 | rndis_command(struct usbnet *dev, struct rndis_msg_hdr *buf, int buflen); | ||
264 | extern int | 265 | extern int |
265 | generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags); | 266 | generic_rndis_bind(struct usbnet *dev, struct usb_interface *intf, int flags); |
266 | extern void rndis_unbind(struct usbnet *dev, struct usb_interface *intf); | 267 | extern 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); | |||
522 | extern void wanrouter_proc_cleanup(void); | 522 | extern void wanrouter_proc_cleanup(void); |
523 | extern int wanrouter_proc_add(struct wan_device *wandev); | 523 | extern int wanrouter_proc_add(struct wan_device *wandev); |
524 | extern int wanrouter_proc_delete(struct wan_device *wandev); | 524 | extern int wanrouter_proc_delete(struct wan_device *wandev); |
525 | extern int wanrouter_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg); | 525 | extern 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 | |||
685 | struct 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 | ||
1118 | struct __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 */ |