diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ieee80211.h | 17 | ||||
-rw-r--r-- | include/linux/if_frad.h | 1 | ||||
-rw-r--r-- | include/linux/netdevice.h | 1 | ||||
-rw-r--r-- | include/linux/netfilter/x_tables.h | 23 | ||||
-rw-r--r-- | include/linux/nl80211.h | 88 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 2 | ||||
-rw-r--r-- | include/net/cfg80211.h | 203 | ||||
-rw-r--r-- | include/net/ethoc.h | 22 | ||||
-rw-r--r-- | include/net/ieee80211_radiotap.h | 4 | ||||
-rw-r--r-- | include/net/mac80211.h | 84 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack.h | 14 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_helper.h | 2 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_l3proto.h | 7 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_l4proto.h | 7 | ||||
-rw-r--r-- | include/net/netfilter/nf_conntrack_tuple.h | 6 | ||||
-rw-r--r-- | include/net/netlink.h | 1 | ||||
-rw-r--r-- | include/net/netns/conntrack.h | 5 |
17 files changed, 415 insertions, 72 deletions
diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index b1bb817d1427..4b501b48ce86 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h | |||
@@ -18,6 +18,22 @@ | |||
18 | #include <linux/types.h> | 18 | #include <linux/types.h> |
19 | #include <asm/byteorder.h> | 19 | #include <asm/byteorder.h> |
20 | 20 | ||
21 | /* | ||
22 | * DS bit usage | ||
23 | * | ||
24 | * TA = transmitter address | ||
25 | * RA = receiver address | ||
26 | * DA = destination address | ||
27 | * SA = source address | ||
28 | * | ||
29 | * ToDS FromDS A1(RA) A2(TA) A3 A4 Use | ||
30 | * ----------------------------------------------------------------- | ||
31 | * 0 0 DA SA BSSID - IBSS/DLS | ||
32 | * 0 1 DA BSSID SA - AP -> STA | ||
33 | * 1 0 BSSID SA DA - AP <- STA | ||
34 | * 1 1 RA TA DA SA unspecified (WDS) | ||
35 | */ | ||
36 | |||
21 | #define FCS_LEN 4 | 37 | #define FCS_LEN 4 |
22 | 38 | ||
23 | #define IEEE80211_FCTL_VERS 0x0003 | 39 | #define IEEE80211_FCTL_VERS 0x0003 |
@@ -851,6 +867,7 @@ struct ieee80211_ht_info { | |||
851 | /* Authentication algorithms */ | 867 | /* Authentication algorithms */ |
852 | #define WLAN_AUTH_OPEN 0 | 868 | #define WLAN_AUTH_OPEN 0 |
853 | #define WLAN_AUTH_SHARED_KEY 1 | 869 | #define WLAN_AUTH_SHARED_KEY 1 |
870 | #define WLAN_AUTH_FT 2 | ||
854 | #define WLAN_AUTH_LEAP 128 | 871 | #define WLAN_AUTH_LEAP 128 |
855 | 872 | ||
856 | #define WLAN_AUTH_CHALLENGE_LEN 128 | 873 | #define WLAN_AUTH_CHALLENGE_LEN 128 |
diff --git a/include/linux/if_frad.h b/include/linux/if_frad.h index 60e16a551dd6..673f2209453d 100644 --- a/include/linux/if_frad.h +++ b/include/linux/if_frad.h | |||
@@ -153,7 +153,6 @@ struct frhdr | |||
153 | 153 | ||
154 | struct dlci_local | 154 | struct dlci_local |
155 | { | 155 | { |
156 | struct net_device_stats stats; | ||
157 | struct net_device *master; | 156 | struct net_device *master; |
158 | struct net_device *slave; | 157 | struct net_device *slave; |
159 | struct dlci_conf config; | 158 | struct dlci_conf config; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index be3ebd7e8ce5..1b55952a17f6 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -32,6 +32,7 @@ | |||
32 | #ifdef __KERNEL__ | 32 | #ifdef __KERNEL__ |
33 | #include <linux/timer.h> | 33 | #include <linux/timer.h> |
34 | #include <linux/delay.h> | 34 | #include <linux/delay.h> |
35 | #include <linux/mm.h> | ||
35 | #include <asm/atomic.h> | 36 | #include <asm/atomic.h> |
36 | #include <asm/cache.h> | 37 | #include <asm/cache.h> |
37 | #include <asm/byteorder.h> | 38 | #include <asm/byteorder.h> |
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index adbc50a20ec2..7b1a652066c0 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -437,6 +437,29 @@ extern void xt_free_table_info(struct xt_table_info *info); | |||
437 | extern void xt_table_entry_swap_rcu(struct xt_table_info *old, | 437 | extern void xt_table_entry_swap_rcu(struct xt_table_info *old, |
438 | struct xt_table_info *new); | 438 | struct xt_table_info *new); |
439 | 439 | ||
440 | /* | ||
441 | * This helper is performance critical and must be inlined | ||
442 | */ | ||
443 | static inline unsigned long ifname_compare_aligned(const char *_a, | ||
444 | const char *_b, | ||
445 | const char *_mask) | ||
446 | { | ||
447 | const unsigned long *a = (const unsigned long *)_a; | ||
448 | const unsigned long *b = (const unsigned long *)_b; | ||
449 | const unsigned long *mask = (const unsigned long *)_mask; | ||
450 | unsigned long ret; | ||
451 | |||
452 | ret = (a[0] ^ b[0]) & mask[0]; | ||
453 | if (IFNAMSIZ > sizeof(unsigned long)) | ||
454 | ret |= (a[1] ^ b[1]) & mask[1]; | ||
455 | if (IFNAMSIZ > 2 * sizeof(unsigned long)) | ||
456 | ret |= (a[2] ^ b[2]) & mask[2]; | ||
457 | if (IFNAMSIZ > 3 * sizeof(unsigned long)) | ||
458 | ret |= (a[3] ^ b[3]) & mask[3]; | ||
459 | BUILD_BUG_ON(IFNAMSIZ > 4 * sizeof(unsigned long)); | ||
460 | return ret; | ||
461 | } | ||
462 | |||
440 | #ifdef CONFIG_COMPAT | 463 | #ifdef CONFIG_COMPAT |
441 | #include <net/compat.h> | 464 | #include <net/compat.h> |
442 | 465 | ||
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index f33aa08dd9b3..cbe8ce3bf486 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -142,6 +142,12 @@ | |||
142 | * %NL80211_ATTR_IE. If the command succeeds, the requested data will be | 142 | * %NL80211_ATTR_IE. If the command succeeds, the requested data will be |
143 | * added to all specified management frames generated by | 143 | * added to all specified management frames generated by |
144 | * kernel/firmware/driver. | 144 | * kernel/firmware/driver. |
145 | * Note: This command has been removed and it is only reserved at this | ||
146 | * point to avoid re-using existing command number. The functionality this | ||
147 | * command was planned for has been provided with cleaner design with the | ||
148 | * option to specify additional IEs in NL80211_CMD_TRIGGER_SCAN, | ||
149 | * NL80211_CMD_AUTHENTICATE, NL80211_CMD_ASSOCIATE, | ||
150 | * NL80211_CMD_DEAUTHENTICATE, and NL80211_CMD_DISASSOCIATE. | ||
145 | * | 151 | * |
146 | * @NL80211_CMD_GET_SCAN: get scan results | 152 | * @NL80211_CMD_GET_SCAN: get scan results |
147 | * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters | 153 | * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters |
@@ -161,6 +167,38 @@ | |||
161 | * %NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on | 167 | * %NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on |
162 | * to (%NL80211_ATTR_REG_ALPHA2). | 168 | * to (%NL80211_ATTR_REG_ALPHA2). |
163 | * | 169 | * |
170 | * @NL80211_CMD_AUTHENTICATE: authentication request and notification. | ||
171 | * This command is used both as a command (request to authenticate) and | ||
172 | * as an event on the "mlme" multicast group indicating completion of the | ||
173 | * authentication process. | ||
174 | * When used as a command, %NL80211_ATTR_IFINDEX is used to identify the | ||
175 | * interface. %NL80211_ATTR_MAC is used to specify PeerSTAAddress (and | ||
176 | * BSSID in case of station mode). %NL80211_ATTR_SSID is used to specify | ||
177 | * the SSID (mainly for association, but is included in authentication | ||
178 | * request, too, to help BSS selection. %NL80211_ATTR_WIPHY_FREQ is used | ||
179 | * to specify the frequence of the channel in MHz. %NL80211_ATTR_AUTH_TYPE | ||
180 | * is used to specify the authentication type. %NL80211_ATTR_IE is used to | ||
181 | * define IEs (VendorSpecificInfo, but also including RSN IE and FT IEs) | ||
182 | * to be added to the frame. | ||
183 | * When used as an event, this reports reception of an Authentication | ||
184 | * frame in station and IBSS modes when the local MLME processed the | ||
185 | * frame, i.e., it was for the local STA and was received in correct | ||
186 | * state. This is similar to MLME-AUTHENTICATE.confirm primitive in the | ||
187 | * MLME SAP interface (kernel providing MLME, userspace SME). The | ||
188 | * included NL80211_ATTR_FRAME attribute contains the management frame | ||
189 | * (including both the header and frame body, but not FCS). | ||
190 | * @NL80211_CMD_ASSOCIATE: association request and notification; like | ||
191 | * NL80211_CMD_AUTHENTICATE but for Association and Reassociation | ||
192 | * (similar to MLME-ASSOCIATE.request, MLME-REASSOCIATE.request, | ||
193 | * MLME-ASSOCIATE.confirm or MLME-REASSOCIATE.confirm primitives). | ||
194 | * @NL80211_CMD_DEAUTHENTICATE: deauthentication request and notification; like | ||
195 | * NL80211_CMD_AUTHENTICATE but for Deauthentication frames (similar to | ||
196 | * MLME-DEAUTHENTICATION.request and MLME-DEAUTHENTICATE.indication | ||
197 | * primitives). | ||
198 | * @NL80211_CMD_DISASSOCIATE: disassociation request and notification; like | ||
199 | * NL80211_CMD_AUTHENTICATE but for Disassociation frames (similar to | ||
200 | * MLME-DISASSOCIATE.request and MLME-DISASSOCIATE.indication primitives). | ||
201 | * | ||
164 | * @NL80211_CMD_MAX: highest used command number | 202 | * @NL80211_CMD_MAX: highest used command number |
165 | * @__NL80211_CMD_AFTER_LAST: internal use | 203 | * @__NL80211_CMD_AFTER_LAST: internal use |
166 | */ | 204 | */ |
@@ -206,7 +244,7 @@ enum nl80211_commands { | |||
206 | NL80211_CMD_GET_MESH_PARAMS, | 244 | NL80211_CMD_GET_MESH_PARAMS, |
207 | NL80211_CMD_SET_MESH_PARAMS, | 245 | NL80211_CMD_SET_MESH_PARAMS, |
208 | 246 | ||
209 | NL80211_CMD_SET_MGMT_EXTRA_IE, | 247 | NL80211_CMD_SET_MGMT_EXTRA_IE /* reserved; not used */, |
210 | 248 | ||
211 | NL80211_CMD_GET_REG, | 249 | NL80211_CMD_GET_REG, |
212 | 250 | ||
@@ -217,6 +255,11 @@ enum nl80211_commands { | |||
217 | 255 | ||
218 | NL80211_CMD_REG_CHANGE, | 256 | NL80211_CMD_REG_CHANGE, |
219 | 257 | ||
258 | NL80211_CMD_AUTHENTICATE, | ||
259 | NL80211_CMD_ASSOCIATE, | ||
260 | NL80211_CMD_DEAUTHENTICATE, | ||
261 | NL80211_CMD_DISASSOCIATE, | ||
262 | |||
220 | /* add new commands above here */ | 263 | /* add new commands above here */ |
221 | 264 | ||
222 | /* used to define NL80211_CMD_MAX below */ | 265 | /* used to define NL80211_CMD_MAX below */ |
@@ -230,8 +273,11 @@ enum nl80211_commands { | |||
230 | */ | 273 | */ |
231 | #define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS | 274 | #define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS |
232 | #define NL80211_CMD_SET_MGMT_EXTRA_IE NL80211_CMD_SET_MGMT_EXTRA_IE | 275 | #define NL80211_CMD_SET_MGMT_EXTRA_IE NL80211_CMD_SET_MGMT_EXTRA_IE |
233 | |||
234 | #define NL80211_CMD_REG_CHANGE NL80211_CMD_REG_CHANGE | 276 | #define NL80211_CMD_REG_CHANGE NL80211_CMD_REG_CHANGE |
277 | #define NL80211_CMD_AUTHENTICATE NL80211_CMD_AUTHENTICATE | ||
278 | #define NL80211_CMD_ASSOCIATE NL80211_CMD_ASSOCIATE | ||
279 | #define NL80211_CMD_DEAUTHENTICATE NL80211_CMD_DEAUTHENTICATE | ||
280 | #define NL80211_CMD_DISASSOCIATE NL80211_CMD_DISASSOCIATE | ||
235 | 281 | ||
236 | /** | 282 | /** |
237 | * enum nl80211_attrs - nl80211 netlink attributes | 283 | * enum nl80211_attrs - nl80211 netlink attributes |
@@ -349,6 +395,19 @@ enum nl80211_commands { | |||
349 | * @NL80211_ATTR_REG_TYPE: indicates the type of the regulatory domain currently | 395 | * @NL80211_ATTR_REG_TYPE: indicates the type of the regulatory domain currently |
350 | * set. This can be one of the nl80211_reg_type (%NL80211_REGDOM_TYPE_*) | 396 | * set. This can be one of the nl80211_reg_type (%NL80211_REGDOM_TYPE_*) |
351 | * | 397 | * |
398 | * @NL80211_ATTR_SUPPORTED_COMMANDS: wiphy attribute that specifies | ||
399 | * an array of command numbers (i.e. a mapping index to command number) | ||
400 | * that the driver for the given wiphy supports. | ||
401 | * | ||
402 | * @NL80211_ATTR_FRAME: frame data (binary attribute), including frame header | ||
403 | * and body, but not FCS; used, e.g., with NL80211_CMD_AUTHENTICATE and | ||
404 | * NL80211_CMD_ASSOCIATE events | ||
405 | * @NL80211_ATTR_SSID: SSID (binary attribute, 0..32 octets) | ||
406 | * @NL80211_ATTR_AUTH_TYPE: AuthenticationType, see &enum nl80211_auth_type, | ||
407 | * represented as a u32 | ||
408 | * @NL80211_ATTR_REASON_CODE: ReasonCode for %NL80211_CMD_DEAUTHENTICATE and | ||
409 | * %NL80211_CMD_DISASSOCIATE, u16 | ||
410 | * | ||
352 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 411 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
353 | * @__NL80211_ATTR_AFTER_LAST: internal use | 412 | * @__NL80211_ATTR_AFTER_LAST: internal use |
354 | */ | 413 | */ |
@@ -426,6 +485,13 @@ enum nl80211_attrs { | |||
426 | NL80211_ATTR_REG_INITIATOR, | 485 | NL80211_ATTR_REG_INITIATOR, |
427 | NL80211_ATTR_REG_TYPE, | 486 | NL80211_ATTR_REG_TYPE, |
428 | 487 | ||
488 | NL80211_ATTR_SUPPORTED_COMMANDS, | ||
489 | |||
490 | NL80211_ATTR_FRAME, | ||
491 | NL80211_ATTR_SSID, | ||
492 | NL80211_ATTR_AUTH_TYPE, | ||
493 | NL80211_ATTR_REASON_CODE, | ||
494 | |||
429 | /* add attributes here, update the policy in nl80211.c */ | 495 | /* add attributes here, update the policy in nl80211.c */ |
430 | 496 | ||
431 | __NL80211_ATTR_AFTER_LAST, | 497 | __NL80211_ATTR_AFTER_LAST, |
@@ -445,6 +511,10 @@ enum nl80211_attrs { | |||
445 | #define NL80211_ATTR_IE NL80211_ATTR_IE | 511 | #define NL80211_ATTR_IE NL80211_ATTR_IE |
446 | #define NL80211_ATTR_REG_INITIATOR NL80211_ATTR_REG_INITIATOR | 512 | #define NL80211_ATTR_REG_INITIATOR NL80211_ATTR_REG_INITIATOR |
447 | #define NL80211_ATTR_REG_TYPE NL80211_ATTR_REG_TYPE | 513 | #define NL80211_ATTR_REG_TYPE NL80211_ATTR_REG_TYPE |
514 | #define NL80211_ATTR_FRAME NL80211_ATTR_FRAME | ||
515 | #define NL80211_ATTR_SSID NL80211_ATTR_SSID | ||
516 | #define NL80211_ATTR_AUTH_TYPE NL80211_ATTR_AUTH_TYPE | ||
517 | #define NL80211_ATTR_REASON_CODE NL80211_ATTR_REASON_CODE | ||
448 | 518 | ||
449 | #define NL80211_MAX_SUPP_RATES 32 | 519 | #define NL80211_MAX_SUPP_RATES 32 |
450 | #define NL80211_MAX_SUPP_REG_RULES 32 | 520 | #define NL80211_MAX_SUPP_REG_RULES 32 |
@@ -978,4 +1048,18 @@ enum nl80211_bss { | |||
978 | NL80211_BSS_MAX = __NL80211_BSS_AFTER_LAST - 1 | 1048 | NL80211_BSS_MAX = __NL80211_BSS_AFTER_LAST - 1 |
979 | }; | 1049 | }; |
980 | 1050 | ||
1051 | /** | ||
1052 | * enum nl80211_auth_type - AuthenticationType | ||
1053 | * | ||
1054 | * @NL80211_AUTHTYPE_OPEN_SYSTEM: Open System authentication | ||
1055 | * @NL80211_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only) | ||
1056 | * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r) | ||
1057 | * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP) | ||
1058 | */ | ||
1059 | enum nl80211_auth_type { | ||
1060 | NL80211_AUTHTYPE_OPEN_SYSTEM, | ||
1061 | NL80211_AUTHTYPE_SHARED_KEY, | ||
1062 | NL80211_AUTHTYPE_FT, | ||
1063 | NL80211_AUTHTYPE_NETWORK_EAP, | ||
1064 | }; | ||
981 | #endif /* __LINUX_NL80211_H */ | 1065 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 097f410edefa..05dfa7c4fb64 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2271,6 +2271,8 @@ | |||
2271 | #define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 | 2271 | #define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 |
2272 | #define PCI_DEVICE_ID_KORENIX_JETCARDF1 0x16ff | 2272 | #define PCI_DEVICE_ID_KORENIX_JETCARDF1 0x16ff |
2273 | 2273 | ||
2274 | #define PCI_VENDOR_ID_QMI 0x1a32 | ||
2275 | |||
2274 | #define PCI_VENDOR_ID_TEKRAM 0x1de1 | 2276 | #define PCI_VENDOR_ID_TEKRAM 0x1de1 |
2275 | #define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 | 2277 | #define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 |
2276 | 2278 | ||
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 50f3fd9ff524..5389afdc1297 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -471,26 +471,6 @@ struct ieee80211_txq_params { | |||
471 | u8 aifs; | 471 | u8 aifs; |
472 | }; | 472 | }; |
473 | 473 | ||
474 | /** | ||
475 | * struct mgmt_extra_ie_params - Extra management frame IE parameters | ||
476 | * | ||
477 | * Used to add extra IE(s) into management frames. If the driver cannot add the | ||
478 | * requested data into all management frames of the specified subtype that are | ||
479 | * generated in kernel or firmware/hardware, it must reject the configuration | ||
480 | * call. The IE data buffer is added to the end of the specified management | ||
481 | * frame body after all other IEs. This addition is not applied to frames that | ||
482 | * are injected through a monitor interface. | ||
483 | * | ||
484 | * @subtype: Management frame subtype | ||
485 | * @ies: IE data buffer or %NULL to remove previous data | ||
486 | * @ies_len: Length of @ies in octets | ||
487 | */ | ||
488 | struct mgmt_extra_ie_params { | ||
489 | u8 subtype; | ||
490 | u8 *ies; | ||
491 | int ies_len; | ||
492 | }; | ||
493 | |||
494 | /* from net/wireless.h */ | 474 | /* from net/wireless.h */ |
495 | struct wiphy; | 475 | struct wiphy; |
496 | 476 | ||
@@ -559,6 +539,7 @@ enum cfg80211_signal_type { | |||
559 | * is no guarantee that these are well-formed!) | 539 | * is no guarantee that these are well-formed!) |
560 | * @len_information_elements: total length of the information elements | 540 | * @len_information_elements: total length of the information elements |
561 | * @signal: signal strength value (type depends on the wiphy's signal_type) | 541 | * @signal: signal strength value (type depends on the wiphy's signal_type) |
542 | * @hold: BSS should not expire | ||
562 | * @free_priv: function pointer to free private data | 543 | * @free_priv: function pointer to free private data |
563 | * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes | 544 | * @priv: private area for driver use, has at least wiphy->bss_priv_size bytes |
564 | */ | 545 | */ |
@@ -579,6 +560,105 @@ struct cfg80211_bss { | |||
579 | }; | 560 | }; |
580 | 561 | ||
581 | /** | 562 | /** |
563 | * struct cfg80211_auth_request - Authentication request data | ||
564 | * | ||
565 | * This structure provides information needed to complete IEEE 802.11 | ||
566 | * authentication. | ||
567 | * NOTE: This structure will likely change when more code from mac80211 is | ||
568 | * moved into cfg80211 so that non-mac80211 drivers can benefit from it, too. | ||
569 | * Before using this in a driver that does not use mac80211, it would be better | ||
570 | * to check the status of that work and better yet, volunteer to work on it. | ||
571 | * | ||
572 | * @chan: The channel to use or %NULL if not specified (auto-select based on | ||
573 | * scan results) | ||
574 | * @peer_addr: The address of the peer STA (AP BSSID in infrastructure case); | ||
575 | * this field is required to be present; if the driver wants to help with | ||
576 | * BSS selection, it should use (yet to be added) MLME event to allow user | ||
577 | * space SME to be notified of roaming candidate, so that the SME can then | ||
578 | * use the authentication request with the recommended BSSID and whatever | ||
579 | * other data may be needed for authentication/association | ||
580 | * @ssid: SSID or %NULL if not yet available | ||
581 | * @ssid_len: Length of ssid in octets | ||
582 | * @auth_type: Authentication type (algorithm) | ||
583 | * @ie: Extra IEs to add to Authentication frame or %NULL | ||
584 | * @ie_len: Length of ie buffer in octets | ||
585 | */ | ||
586 | struct cfg80211_auth_request { | ||
587 | struct ieee80211_channel *chan; | ||
588 | u8 *peer_addr; | ||
589 | const u8 *ssid; | ||
590 | size_t ssid_len; | ||
591 | enum nl80211_auth_type auth_type; | ||
592 | const u8 *ie; | ||
593 | size_t ie_len; | ||
594 | }; | ||
595 | |||
596 | /** | ||
597 | * struct cfg80211_assoc_request - (Re)Association request data | ||
598 | * | ||
599 | * This structure provides information needed to complete IEEE 802.11 | ||
600 | * (re)association. | ||
601 | * NOTE: This structure will likely change when more code from mac80211 is | ||
602 | * moved into cfg80211 so that non-mac80211 drivers can benefit from it, too. | ||
603 | * Before using this in a driver that does not use mac80211, it would be better | ||
604 | * to check the status of that work and better yet, volunteer to work on it. | ||
605 | * | ||
606 | * @chan: The channel to use or %NULL if not specified (auto-select based on | ||
607 | * scan results) | ||
608 | * @peer_addr: The address of the peer STA (AP BSSID); this field is required | ||
609 | * to be present and the STA must be in State 2 (authenticated) with the | ||
610 | * peer STA | ||
611 | * @ssid: SSID | ||
612 | * @ssid_len: Length of ssid in octets | ||
613 | * @ie: Extra IEs to add to (Re)Association Request frame or %NULL | ||
614 | * @ie_len: Length of ie buffer in octets | ||
615 | */ | ||
616 | struct cfg80211_assoc_request { | ||
617 | struct ieee80211_channel *chan; | ||
618 | u8 *peer_addr; | ||
619 | const u8 *ssid; | ||
620 | size_t ssid_len; | ||
621 | const u8 *ie; | ||
622 | size_t ie_len; | ||
623 | }; | ||
624 | |||
625 | /** | ||
626 | * struct cfg80211_deauth_request - Deauthentication request data | ||
627 | * | ||
628 | * This structure provides information needed to complete IEEE 802.11 | ||
629 | * deauthentication. | ||
630 | * | ||
631 | * @peer_addr: The address of the peer STA (AP BSSID); this field is required | ||
632 | * to be present and the STA must be authenticated with the peer STA | ||
633 | * @ie: Extra IEs to add to Deauthentication frame or %NULL | ||
634 | * @ie_len: Length of ie buffer in octets | ||
635 | */ | ||
636 | struct cfg80211_deauth_request { | ||
637 | u8 *peer_addr; | ||
638 | u16 reason_code; | ||
639 | const u8 *ie; | ||
640 | size_t ie_len; | ||
641 | }; | ||
642 | |||
643 | /** | ||
644 | * struct cfg80211_disassoc_request - Disassociation request data | ||
645 | * | ||
646 | * This structure provides information needed to complete IEEE 802.11 | ||
647 | * disassocation. | ||
648 | * | ||
649 | * @peer_addr: The address of the peer STA (AP BSSID); this field is required | ||
650 | * to be present and the STA must be associated with the peer STA | ||
651 | * @ie: Extra IEs to add to Disassociation frame or %NULL | ||
652 | * @ie_len: Length of ie buffer in octets | ||
653 | */ | ||
654 | struct cfg80211_disassoc_request { | ||
655 | u8 *peer_addr; | ||
656 | u16 reason_code; | ||
657 | const u8 *ie; | ||
658 | size_t ie_len; | ||
659 | }; | ||
660 | |||
661 | /** | ||
582 | * struct cfg80211_ops - backend description for wireless configuration | 662 | * struct cfg80211_ops - backend description for wireless configuration |
583 | * | 663 | * |
584 | * This struct is registered by fullmac card drivers and/or wireless stacks | 664 | * This struct is registered by fullmac card drivers and/or wireless stacks |
@@ -644,12 +724,15 @@ struct cfg80211_bss { | |||
644 | * | 724 | * |
645 | * @set_channel: Set channel | 725 | * @set_channel: Set channel |
646 | * | 726 | * |
647 | * @set_mgmt_extra_ie: Set extra IE data for management frames | ||
648 | * | ||
649 | * @scan: Request to do a scan. If returning zero, the scan request is given | 727 | * @scan: Request to do a scan. If returning zero, the scan request is given |
650 | * the driver, and will be valid until passed to cfg80211_scan_done(). | 728 | * the driver, and will be valid until passed to cfg80211_scan_done(). |
651 | * For scan results, call cfg80211_inform_bss(); you can call this outside | 729 | * For scan results, call cfg80211_inform_bss(); you can call this outside |
652 | * the scan/scan_done bracket too. | 730 | * the scan/scan_done bracket too. |
731 | * | ||
732 | * @auth: Request to authenticate with the specified peer | ||
733 | * @assoc: Request to (re)associate with the specified peer | ||
734 | * @deauth: Request to deauthenticate from the specified peer | ||
735 | * @disassoc: Request to disassociate from the specified peer | ||
653 | */ | 736 | */ |
654 | struct cfg80211_ops { | 737 | struct cfg80211_ops { |
655 | int (*suspend)(struct wiphy *wiphy); | 738 | int (*suspend)(struct wiphy *wiphy); |
@@ -724,12 +807,17 @@ struct cfg80211_ops { | |||
724 | struct ieee80211_channel *chan, | 807 | struct ieee80211_channel *chan, |
725 | enum nl80211_channel_type channel_type); | 808 | enum nl80211_channel_type channel_type); |
726 | 809 | ||
727 | int (*set_mgmt_extra_ie)(struct wiphy *wiphy, | ||
728 | struct net_device *dev, | ||
729 | struct mgmt_extra_ie_params *params); | ||
730 | |||
731 | int (*scan)(struct wiphy *wiphy, struct net_device *dev, | 810 | int (*scan)(struct wiphy *wiphy, struct net_device *dev, |
732 | struct cfg80211_scan_request *request); | 811 | struct cfg80211_scan_request *request); |
812 | |||
813 | int (*auth)(struct wiphy *wiphy, struct net_device *dev, | ||
814 | struct cfg80211_auth_request *req); | ||
815 | int (*assoc)(struct wiphy *wiphy, struct net_device *dev, | ||
816 | struct cfg80211_assoc_request *req); | ||
817 | int (*deauth)(struct wiphy *wiphy, struct net_device *dev, | ||
818 | struct cfg80211_deauth_request *req); | ||
819 | int (*disassoc)(struct wiphy *wiphy, struct net_device *dev, | ||
820 | struct cfg80211_disassoc_request *req); | ||
733 | }; | 821 | }; |
734 | 822 | ||
735 | /* temporary wext handlers */ | 823 | /* temporary wext handlers */ |
@@ -807,4 +895,67 @@ void cfg80211_put_bss(struct cfg80211_bss *bss); | |||
807 | */ | 895 | */ |
808 | void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss); | 896 | void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss); |
809 | 897 | ||
898 | /** | ||
899 | * cfg80211_send_rx_auth - notification of processed authentication | ||
900 | * @dev: network device | ||
901 | * @buf: authentication frame (header + body) | ||
902 | * @len: length of the frame data | ||
903 | * | ||
904 | * This function is called whenever an authentication has been processed in | ||
905 | * station mode. | ||
906 | */ | ||
907 | void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len); | ||
908 | |||
909 | /** | ||
910 | * cfg80211_send_rx_assoc - notification of processed association | ||
911 | * @dev: network device | ||
912 | * @buf: (re)association response frame (header + body) | ||
913 | * @len: length of the frame data | ||
914 | * | ||
915 | * This function is called whenever a (re)association response has been | ||
916 | * processed in station mode. | ||
917 | */ | ||
918 | void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len); | ||
919 | |||
920 | /** | ||
921 | * cfg80211_send_rx_deauth - notification of processed deauthentication | ||
922 | * @dev: network device | ||
923 | * @buf: deauthentication frame (header + body) | ||
924 | * @len: length of the frame data | ||
925 | * | ||
926 | * This function is called whenever deauthentication has been processed in | ||
927 | * station mode. | ||
928 | */ | ||
929 | void cfg80211_send_rx_deauth(struct net_device *dev, const u8 *buf, | ||
930 | size_t len); | ||
931 | |||
932 | /** | ||
933 | * cfg80211_send_rx_disassoc - notification of processed disassociation | ||
934 | * @dev: network device | ||
935 | * @buf: disassociation response frame (header + body) | ||
936 | * @len: length of the frame data | ||
937 | * | ||
938 | * This function is called whenever disassociation has been processed in | ||
939 | * station mode. | ||
940 | */ | ||
941 | void cfg80211_send_rx_disassoc(struct net_device *dev, const u8 *buf, | ||
942 | size_t len); | ||
943 | |||
944 | /** | ||
945 | * cfg80211_hold_bss - exclude bss from expiration | ||
946 | * @bss: bss which should not expire | ||
947 | * | ||
948 | * In a case when the BSS is not updated but it shouldn't expire this | ||
949 | * function can be used to mark the BSS to be excluded from expiration. | ||
950 | */ | ||
951 | void cfg80211_hold_bss(struct cfg80211_bss *bss); | ||
952 | |||
953 | /** | ||
954 | * cfg80211_unhold_bss - remove expiration exception from the BSS | ||
955 | * @bss: bss which can expire again | ||
956 | * | ||
957 | * This function marks the BSS to be expirable again. | ||
958 | */ | ||
959 | void cfg80211_unhold_bss(struct cfg80211_bss *bss); | ||
960 | |||
810 | #endif /* __NET_CFG80211_H */ | 961 | #endif /* __NET_CFG80211_H */ |
diff --git a/include/net/ethoc.h b/include/net/ethoc.h new file mode 100644 index 000000000000..96f3789b27bc --- /dev/null +++ b/include/net/ethoc.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * linux/include/net/ethoc.h | ||
3 | * | ||
4 | * Copyright (C) 2008-2009 Avionic Design GmbH | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * Written by Thierry Reding <thierry.reding@avionic-design.de> | ||
11 | */ | ||
12 | |||
13 | #ifndef LINUX_NET_ETHOC_H | ||
14 | #define LINUX_NET_ETHOC_H 1 | ||
15 | |||
16 | struct ethoc_platform_data { | ||
17 | u8 hwaddr[IFHWADDRLEN]; | ||
18 | s8 phy_id; | ||
19 | }; | ||
20 | |||
21 | #endif /* !LINUX_NET_ETHOC_H */ | ||
22 | |||
diff --git a/include/net/ieee80211_radiotap.h b/include/net/ieee80211_radiotap.h index 384698cb773a..23c3f3d97779 100644 --- a/include/net/ieee80211_radiotap.h +++ b/include/net/ieee80211_radiotap.h | |||
@@ -230,8 +230,10 @@ enum ieee80211_radiotap_type { | |||
230 | * 802.11 header and payload | 230 | * 802.11 header and payload |
231 | * (to 32-bit boundary) | 231 | * (to 32-bit boundary) |
232 | */ | 232 | */ |
233 | #define IEEE80211_RADIOTAP_F_BADFCS 0x40 /* bad FCS */ | ||
234 | |||
233 | /* For IEEE80211_RADIOTAP_RX_FLAGS */ | 235 | /* For IEEE80211_RADIOTAP_RX_FLAGS */ |
234 | #define IEEE80211_RADIOTAP_F_RX_BADFCS 0x0001 /* frame failed crc check */ | 236 | #define IEEE80211_RADIOTAP_F_RX_BADPLCP 0x0002 /* frame has bad PLCP */ |
235 | 237 | ||
236 | /* For IEEE80211_RADIOTAP_TX_FLAGS */ | 238 | /* For IEEE80211_RADIOTAP_TX_FLAGS */ |
237 | #define IEEE80211_RADIOTAP_F_TX_FAIL 0x0001 /* failed due to excessive | 239 | #define IEEE80211_RADIOTAP_F_TX_FAIL 0x0001 /* failed due to excessive |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 12a52efcd0d1..3b83a80e3fe0 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -93,12 +93,9 @@ struct ieee80211_ht_bss_info { | |||
93 | * enum ieee80211_max_queues - maximum number of queues | 93 | * enum ieee80211_max_queues - maximum number of queues |
94 | * | 94 | * |
95 | * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues. | 95 | * @IEEE80211_MAX_QUEUES: Maximum number of regular device queues. |
96 | * @IEEE80211_MAX_AMPDU_QUEUES: Maximum number of queues usable | ||
97 | * for A-MPDU operation. | ||
98 | */ | 96 | */ |
99 | enum ieee80211_max_queues { | 97 | enum ieee80211_max_queues { |
100 | IEEE80211_MAX_QUEUES = 16, | 98 | IEEE80211_MAX_QUEUES = 4, |
101 | IEEE80211_MAX_AMPDU_QUEUES = 16, | ||
102 | }; | 99 | }; |
103 | 100 | ||
104 | /** | 101 | /** |
@@ -245,6 +242,12 @@ struct ieee80211_bss_conf { | |||
245 | * @IEEE80211_TX_CTL_RATE_CTRL_PROBE: internal to mac80211, can be | 242 | * @IEEE80211_TX_CTL_RATE_CTRL_PROBE: internal to mac80211, can be |
246 | * set by rate control algorithms to indicate probe rate, will | 243 | * set by rate control algorithms to indicate probe rate, will |
247 | * be cleared for fragmented frames (except on the last fragment) | 244 | * be cleared for fragmented frames (except on the last fragment) |
245 | * @IEEE80211_TX_INTFL_RCALGO: mac80211 internal flag, do not test or | ||
246 | * set this flag in the driver; indicates that the rate control | ||
247 | * algorithm was used and should be notified of TX status | ||
248 | * @IEEE80211_TX_INTFL_NEED_TXPROCESSING: completely internal to mac80211, | ||
249 | * used to indicate that a pending frame requires TX processing before | ||
250 | * it can be sent out. | ||
248 | */ | 251 | */ |
249 | enum mac80211_tx_control_flags { | 252 | enum mac80211_tx_control_flags { |
250 | IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), | 253 | IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), |
@@ -260,6 +263,8 @@ enum mac80211_tx_control_flags { | |||
260 | IEEE80211_TX_STAT_AMPDU = BIT(10), | 263 | IEEE80211_TX_STAT_AMPDU = BIT(10), |
261 | IEEE80211_TX_STAT_AMPDU_NO_BACK = BIT(11), | 264 | IEEE80211_TX_STAT_AMPDU_NO_BACK = BIT(11), |
262 | IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12), | 265 | IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12), |
266 | IEEE80211_TX_INTFL_RCALGO = BIT(13), | ||
267 | IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), | ||
263 | }; | 268 | }; |
264 | 269 | ||
265 | /** | 270 | /** |
@@ -520,12 +525,6 @@ enum ieee80211_conf_flags { | |||
520 | IEEE80211_CONF_PS = (1<<1), | 525 | IEEE80211_CONF_PS = (1<<1), |
521 | }; | 526 | }; |
522 | 527 | ||
523 | /* XXX: remove all this once drivers stop trying to use it */ | ||
524 | static inline int __deprecated __IEEE80211_CONF_SHORT_SLOT_TIME(void) | ||
525 | { | ||
526 | return 0; | ||
527 | } | ||
528 | #define IEEE80211_CONF_SHORT_SLOT_TIME (__IEEE80211_CONF_SHORT_SLOT_TIME()) | ||
529 | 528 | ||
530 | /** | 529 | /** |
531 | * enum ieee80211_conf_changed - denotes which configuration changed | 530 | * enum ieee80211_conf_changed - denotes which configuration changed |
@@ -888,6 +887,10 @@ enum ieee80211_tkip_key_type { | |||
888 | * | 887 | * |
889 | * @IEEE80211_HW_MFP_CAPABLE: | 888 | * @IEEE80211_HW_MFP_CAPABLE: |
890 | * Hardware supports management frame protection (MFP, IEEE 802.11w). | 889 | * Hardware supports management frame protection (MFP, IEEE 802.11w). |
890 | * | ||
891 | * @IEEE80211_HW_BEACON_FILTER: | ||
892 | * Hardware supports dropping of irrelevant beacon frames to | ||
893 | * avoid waking up cpu. | ||
891 | */ | 894 | */ |
892 | enum ieee80211_hw_flags { | 895 | enum ieee80211_hw_flags { |
893 | IEEE80211_HW_RX_INCLUDES_FCS = 1<<1, | 896 | IEEE80211_HW_RX_INCLUDES_FCS = 1<<1, |
@@ -903,6 +906,7 @@ enum ieee80211_hw_flags { | |||
903 | IEEE80211_HW_PS_NULLFUNC_STACK = 1<<11, | 906 | IEEE80211_HW_PS_NULLFUNC_STACK = 1<<11, |
904 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12, | 907 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12, |
905 | IEEE80211_HW_MFP_CAPABLE = 1<<13, | 908 | IEEE80211_HW_MFP_CAPABLE = 1<<13, |
909 | IEEE80211_HW_BEACON_FILTER = 1<<14, | ||
906 | }; | 910 | }; |
907 | 911 | ||
908 | /** | 912 | /** |
@@ -945,12 +949,6 @@ enum ieee80211_hw_flags { | |||
945 | * data packets. WMM/QoS requires at least four, these | 949 | * data packets. WMM/QoS requires at least four, these |
946 | * queues need to have configurable access parameters. | 950 | * queues need to have configurable access parameters. |
947 | * | 951 | * |
948 | * @ampdu_queues: number of available hardware transmit queues | ||
949 | * for A-MPDU packets, these have no access parameters | ||
950 | * because they're used only for A-MPDU frames. Note that | ||
951 | * mac80211 will not currently use any of the regular queues | ||
952 | * for aggregation. | ||
953 | * | ||
954 | * @rate_control_algorithm: rate control algorithm for this hardware. | 952 | * @rate_control_algorithm: rate control algorithm for this hardware. |
955 | * If unset (NULL), the default algorithm will be used. Must be | 953 | * If unset (NULL), the default algorithm will be used. Must be |
956 | * set before calling ieee80211_register_hw(). | 954 | * set before calling ieee80211_register_hw(). |
@@ -975,7 +973,6 @@ struct ieee80211_hw { | |||
975 | int vif_data_size; | 973 | int vif_data_size; |
976 | int sta_data_size; | 974 | int sta_data_size; |
977 | u16 queues; | 975 | u16 queues; |
978 | u16 ampdu_queues; | ||
979 | u16 max_listen_interval; | 976 | u16 max_listen_interval; |
980 | s8 max_signal; | 977 | s8 max_signal; |
981 | u8 max_rates; | 978 | u8 max_rates; |
@@ -1017,11 +1014,6 @@ static inline void SET_IEEE80211_PERM_ADDR(struct ieee80211_hw *hw, u8 *addr) | |||
1017 | memcpy(hw->wiphy->perm_addr, addr, ETH_ALEN); | 1014 | memcpy(hw->wiphy->perm_addr, addr, ETH_ALEN); |
1018 | } | 1015 | } |
1019 | 1016 | ||
1020 | static inline int ieee80211_num_regular_queues(struct ieee80211_hw *hw) | ||
1021 | { | ||
1022 | return hw->queues; | ||
1023 | } | ||
1024 | |||
1025 | static inline struct ieee80211_rate * | 1017 | static inline struct ieee80211_rate * |
1026 | ieee80211_get_tx_rate(const struct ieee80211_hw *hw, | 1018 | ieee80211_get_tx_rate(const struct ieee80211_hw *hw, |
1027 | const struct ieee80211_tx_info *c) | 1019 | const struct ieee80211_tx_info *c) |
@@ -1132,6 +1124,24 @@ ieee80211_get_alt_retry_rate(const struct ieee80211_hw *hw, | |||
1132 | */ | 1124 | */ |
1133 | 1125 | ||
1134 | /** | 1126 | /** |
1127 | * DOC: Beacon filter support | ||
1128 | * | ||
1129 | * Some hardware have beacon filter support to reduce host cpu wakeups | ||
1130 | * which will reduce system power consumption. It usuallly works so that | ||
1131 | * the firmware creates a checksum of the beacon but omits all constantly | ||
1132 | * changing elements (TSF, TIM etc). Whenever the checksum changes the | ||
1133 | * beacon is forwarded to the host, otherwise it will be just dropped. That | ||
1134 | * way the host will only receive beacons where some relevant information | ||
1135 | * (for example ERP protection or WMM settings) have changed. | ||
1136 | * | ||
1137 | * Beacon filter support is informed with %IEEE80211_HW_BEACON_FILTER flag. | ||
1138 | * The driver needs to enable beacon filter support whenever power save is | ||
1139 | * enabled, that is %IEEE80211_CONF_PS is set. When power save is enabled, | ||
1140 | * the stack will not check for beacon miss at all and the driver needs to | ||
1141 | * notify about complete loss of beacons with ieee80211_beacon_loss(). | ||
1142 | */ | ||
1143 | |||
1144 | /** | ||
1135 | * DOC: Frame filtering | 1145 | * DOC: Frame filtering |
1136 | * | 1146 | * |
1137 | * mac80211 requires to see many management frames for proper | 1147 | * mac80211 requires to see many management frames for proper |
@@ -1220,14 +1230,14 @@ enum ieee80211_filter_flags { | |||
1220 | * @IEEE80211_AMPDU_RX_STOP: stop Rx aggregation | 1230 | * @IEEE80211_AMPDU_RX_STOP: stop Rx aggregation |
1221 | * @IEEE80211_AMPDU_TX_START: start Tx aggregation | 1231 | * @IEEE80211_AMPDU_TX_START: start Tx aggregation |
1222 | * @IEEE80211_AMPDU_TX_STOP: stop Tx aggregation | 1232 | * @IEEE80211_AMPDU_TX_STOP: stop Tx aggregation |
1223 | * @IEEE80211_AMPDU_TX_RESUME: resume TX aggregation | 1233 | * @IEEE80211_AMPDU_TX_OPERATIONAL: TX aggregation has become operational |
1224 | */ | 1234 | */ |
1225 | enum ieee80211_ampdu_mlme_action { | 1235 | enum ieee80211_ampdu_mlme_action { |
1226 | IEEE80211_AMPDU_RX_START, | 1236 | IEEE80211_AMPDU_RX_START, |
1227 | IEEE80211_AMPDU_RX_STOP, | 1237 | IEEE80211_AMPDU_RX_STOP, |
1228 | IEEE80211_AMPDU_TX_START, | 1238 | IEEE80211_AMPDU_TX_START, |
1229 | IEEE80211_AMPDU_TX_STOP, | 1239 | IEEE80211_AMPDU_TX_STOP, |
1230 | IEEE80211_AMPDU_TX_RESUME, | 1240 | IEEE80211_AMPDU_TX_OPERATIONAL, |
1231 | }; | 1241 | }; |
1232 | 1242 | ||
1233 | /** | 1243 | /** |
@@ -1318,11 +1328,13 @@ enum ieee80211_ampdu_mlme_action { | |||
1318 | * | 1328 | * |
1319 | * @hw_scan: Ask the hardware to service the scan request, no need to start | 1329 | * @hw_scan: Ask the hardware to service the scan request, no need to start |
1320 | * the scan state machine in stack. The scan must honour the channel | 1330 | * the scan state machine in stack. The scan must honour the channel |
1321 | * configuration done by the regulatory agent in the wiphy's registered | 1331 | * configuration done by the regulatory agent in the wiphy's |
1322 | * bands. When the scan finishes, ieee80211_scan_completed() must be | 1332 | * registered bands. The hardware (or the driver) needs to make sure |
1323 | * called; note that it also must be called when the scan cannot finish | 1333 | * that power save is disabled. When the scan finishes, |
1324 | * because the hardware is turned off! Anything else is a bug! | 1334 | * ieee80211_scan_completed() must be called; note that it also must |
1325 | * Returns a negative error code which will be seen in userspace. | 1335 | * be called when the scan cannot finish because the hardware is |
1336 | * turned off! Anything else is a bug! Returns a negative error code | ||
1337 | * which will be seen in userspace. | ||
1326 | * | 1338 | * |
1327 | * @sw_scan_start: Notifier function that is called just before a software scan | 1339 | * @sw_scan_start: Notifier function that is called just before a software scan |
1328 | * is started. Can be NULL, if the driver doesn't need this notification. | 1340 | * is started. Can be NULL, if the driver doesn't need this notification. |
@@ -1350,8 +1362,8 @@ enum ieee80211_ampdu_mlme_action { | |||
1350 | * @get_tx_stats: Get statistics of the current TX queue status. This is used | 1362 | * @get_tx_stats: Get statistics of the current TX queue status. This is used |
1351 | * to get number of currently queued packets (queue length), maximum queue | 1363 | * to get number of currently queued packets (queue length), maximum queue |
1352 | * size (limit), and total number of packets sent using each TX queue | 1364 | * size (limit), and total number of packets sent using each TX queue |
1353 | * (count). The 'stats' pointer points to an array that has hw->queues + | 1365 | * (count). The 'stats' pointer points to an array that has hw->queues |
1354 | * hw->ampdu_queues items. | 1366 | * items. |
1355 | * | 1367 | * |
1356 | * @get_tsf: Get the current TSF timer value from firmware/hardware. Currently, | 1368 | * @get_tsf: Get the current TSF timer value from firmware/hardware. Currently, |
1357 | * this is only used for IBSS mode BSSID merging and debugging. Is not a | 1369 | * this is only used for IBSS mode BSSID merging and debugging. Is not a |
@@ -1979,6 +1991,16 @@ void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra, | |||
1979 | struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_hw *hw, | 1991 | struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_hw *hw, |
1980 | const u8 *addr); | 1992 | const u8 *addr); |
1981 | 1993 | ||
1994 | /** | ||
1995 | * ieee80211_beacon_loss - inform hardware does not receive beacons | ||
1996 | * | ||
1997 | * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf. | ||
1998 | * | ||
1999 | * When beacon filtering is enabled with IEEE80211_HW_BEACON_FILTERING and | ||
2000 | * IEEE80211_CONF_PS is set, the driver needs to inform whenever the | ||
2001 | * hardware is not receiving beacons with this function. | ||
2002 | */ | ||
2003 | void ieee80211_beacon_loss(struct ieee80211_vif *vif); | ||
1982 | 2004 | ||
1983 | /* Rate control API */ | 2005 | /* Rate control API */ |
1984 | 2006 | ||
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index 4dfb793c3f15..6c3f964de9e1 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h | |||
@@ -91,8 +91,7 @@ struct nf_conn_help { | |||
91 | #include <net/netfilter/ipv4/nf_conntrack_ipv4.h> | 91 | #include <net/netfilter/ipv4/nf_conntrack_ipv4.h> |
92 | #include <net/netfilter/ipv6/nf_conntrack_ipv6.h> | 92 | #include <net/netfilter/ipv6/nf_conntrack_ipv6.h> |
93 | 93 | ||
94 | struct nf_conn | 94 | struct nf_conn { |
95 | { | ||
96 | /* Usage count in here is 1 for hash table/destruct timer, 1 per skb, | 95 | /* Usage count in here is 1 for hash table/destruct timer, 1 per skb, |
97 | plus 1 for any connection(s) we are `master' for */ | 96 | plus 1 for any connection(s) we are `master' for */ |
98 | struct nf_conntrack ct_general; | 97 | struct nf_conntrack ct_general; |
@@ -126,7 +125,6 @@ struct nf_conn | |||
126 | #ifdef CONFIG_NET_NS | 125 | #ifdef CONFIG_NET_NS |
127 | struct net *ct_net; | 126 | struct net *ct_net; |
128 | #endif | 127 | #endif |
129 | struct rcu_head rcu; | ||
130 | }; | 128 | }; |
131 | 129 | ||
132 | static inline struct nf_conn * | 130 | static inline struct nf_conn * |
@@ -190,9 +188,13 @@ static inline void nf_ct_put(struct nf_conn *ct) | |||
190 | extern int nf_ct_l3proto_try_module_get(unsigned short l3proto); | 188 | extern int nf_ct_l3proto_try_module_get(unsigned short l3proto); |
191 | extern void nf_ct_l3proto_module_put(unsigned short l3proto); | 189 | extern void nf_ct_l3proto_module_put(unsigned short l3proto); |
192 | 190 | ||
193 | extern struct hlist_head *nf_ct_alloc_hashtable(unsigned int *sizep, int *vmalloced); | 191 | /* |
194 | extern void nf_ct_free_hashtable(struct hlist_head *hash, int vmalloced, | 192 | * Allocate a hashtable of hlist_head (if nulls == 0), |
195 | unsigned int size); | 193 | * or hlist_nulls_head (if nulls == 1) |
194 | */ | ||
195 | extern void *nf_ct_alloc_hashtable(unsigned int *sizep, int *vmalloced, int nulls); | ||
196 | |||
197 | extern void nf_ct_free_hashtable(void *hash, int vmalloced, unsigned int size); | ||
196 | 198 | ||
197 | extern struct nf_conntrack_tuple_hash * | 199 | extern struct nf_conntrack_tuple_hash * |
198 | __nf_conntrack_find(struct net *net, const struct nf_conntrack_tuple *tuple); | 200 | __nf_conntrack_find(struct net *net, const struct nf_conntrack_tuple *tuple); |
diff --git a/include/net/netfilter/nf_conntrack_helper.h b/include/net/netfilter/nf_conntrack_helper.h index 66d65a7caa39..ee2a4b369a04 100644 --- a/include/net/netfilter/nf_conntrack_helper.h +++ b/include/net/netfilter/nf_conntrack_helper.h | |||
@@ -14,6 +14,8 @@ | |||
14 | 14 | ||
15 | struct module; | 15 | struct module; |
16 | 16 | ||
17 | #define NF_CT_HELPER_NAME_LEN 16 | ||
18 | |||
17 | struct nf_conntrack_helper | 19 | struct nf_conntrack_helper |
18 | { | 20 | { |
19 | struct hlist_node hnode; /* Internal use. */ | 21 | struct hlist_node hnode; /* Internal use. */ |
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h index 0378676c3dd8..9f99d36d5de9 100644 --- a/include/net/netfilter/nf_conntrack_l3proto.h +++ b/include/net/netfilter/nf_conntrack_l3proto.h | |||
@@ -53,10 +53,17 @@ struct nf_conntrack_l3proto | |||
53 | int (*tuple_to_nlattr)(struct sk_buff *skb, | 53 | int (*tuple_to_nlattr)(struct sk_buff *skb, |
54 | const struct nf_conntrack_tuple *t); | 54 | const struct nf_conntrack_tuple *t); |
55 | 55 | ||
56 | /* | ||
57 | * Calculate size of tuple nlattr | ||
58 | */ | ||
59 | int (*nlattr_tuple_size)(void); | ||
60 | |||
56 | int (*nlattr_to_tuple)(struct nlattr *tb[], | 61 | int (*nlattr_to_tuple)(struct nlattr *tb[], |
57 | struct nf_conntrack_tuple *t); | 62 | struct nf_conntrack_tuple *t); |
58 | const struct nla_policy *nla_policy; | 63 | const struct nla_policy *nla_policy; |
59 | 64 | ||
65 | size_t nla_size; | ||
66 | |||
60 | #ifdef CONFIG_SYSCTL | 67 | #ifdef CONFIG_SYSCTL |
61 | struct ctl_table_header *ctl_table_header; | 68 | struct ctl_table_header *ctl_table_header; |
62 | struct ctl_path *ctl_table_path; | 69 | struct ctl_path *ctl_table_path; |
diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h index b01070bf2f84..ba32ed7bdabe 100644 --- a/include/net/netfilter/nf_conntrack_l4proto.h +++ b/include/net/netfilter/nf_conntrack_l4proto.h | |||
@@ -64,16 +64,22 @@ struct nf_conntrack_l4proto | |||
64 | /* convert protoinfo to nfnetink attributes */ | 64 | /* convert protoinfo to nfnetink attributes */ |
65 | int (*to_nlattr)(struct sk_buff *skb, struct nlattr *nla, | 65 | int (*to_nlattr)(struct sk_buff *skb, struct nlattr *nla, |
66 | const struct nf_conn *ct); | 66 | const struct nf_conn *ct); |
67 | /* Calculate protoinfo nlattr size */ | ||
68 | int (*nlattr_size)(void); | ||
67 | 69 | ||
68 | /* convert nfnetlink attributes to protoinfo */ | 70 | /* convert nfnetlink attributes to protoinfo */ |
69 | int (*from_nlattr)(struct nlattr *tb[], struct nf_conn *ct); | 71 | int (*from_nlattr)(struct nlattr *tb[], struct nf_conn *ct); |
70 | 72 | ||
71 | int (*tuple_to_nlattr)(struct sk_buff *skb, | 73 | int (*tuple_to_nlattr)(struct sk_buff *skb, |
72 | const struct nf_conntrack_tuple *t); | 74 | const struct nf_conntrack_tuple *t); |
75 | /* Calculate tuple nlattr size */ | ||
76 | int (*nlattr_tuple_size)(void); | ||
73 | int (*nlattr_to_tuple)(struct nlattr *tb[], | 77 | int (*nlattr_to_tuple)(struct nlattr *tb[], |
74 | struct nf_conntrack_tuple *t); | 78 | struct nf_conntrack_tuple *t); |
75 | const struct nla_policy *nla_policy; | 79 | const struct nla_policy *nla_policy; |
76 | 80 | ||
81 | size_t nla_size; | ||
82 | |||
77 | #ifdef CONFIG_SYSCTL | 83 | #ifdef CONFIG_SYSCTL |
78 | struct ctl_table_header **ctl_table_header; | 84 | struct ctl_table_header **ctl_table_header; |
79 | struct ctl_table *ctl_table; | 85 | struct ctl_table *ctl_table; |
@@ -107,6 +113,7 @@ extern int nf_ct_port_tuple_to_nlattr(struct sk_buff *skb, | |||
107 | const struct nf_conntrack_tuple *tuple); | 113 | const struct nf_conntrack_tuple *tuple); |
108 | extern int nf_ct_port_nlattr_to_tuple(struct nlattr *tb[], | 114 | extern int nf_ct_port_nlattr_to_tuple(struct nlattr *tb[], |
109 | struct nf_conntrack_tuple *t); | 115 | struct nf_conntrack_tuple *t); |
116 | extern int nf_ct_port_nlattr_tuple_size(void); | ||
110 | extern const struct nla_policy nf_ct_port_nla_policy[]; | 117 | extern const struct nla_policy nf_ct_port_nla_policy[]; |
111 | 118 | ||
112 | #ifdef CONFIG_SYSCTL | 119 | #ifdef CONFIG_SYSCTL |
diff --git a/include/net/netfilter/nf_conntrack_tuple.h b/include/net/netfilter/nf_conntrack_tuple.h index f2f6aa73dc10..2628c154d40e 100644 --- a/include/net/netfilter/nf_conntrack_tuple.h +++ b/include/net/netfilter/nf_conntrack_tuple.h | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/netfilter/x_tables.h> | 13 | #include <linux/netfilter/x_tables.h> |
14 | #include <linux/netfilter/nf_conntrack_tuple_common.h> | 14 | #include <linux/netfilter/nf_conntrack_tuple_common.h> |
15 | #include <linux/list_nulls.h> | ||
15 | 16 | ||
16 | /* A `tuple' is a structure containing the information to uniquely | 17 | /* A `tuple' is a structure containing the information to uniquely |
17 | identify a connection. ie. if two packets have the same tuple, they | 18 | identify a connection. ie. if two packets have the same tuple, they |
@@ -146,9 +147,8 @@ static inline void nf_ct_dump_tuple(const struct nf_conntrack_tuple *t) | |||
146 | ((enum ip_conntrack_dir)(h)->tuple.dst.dir) | 147 | ((enum ip_conntrack_dir)(h)->tuple.dst.dir) |
147 | 148 | ||
148 | /* Connections have two entries in the hash table: one for each way */ | 149 | /* Connections have two entries in the hash table: one for each way */ |
149 | struct nf_conntrack_tuple_hash | 150 | struct nf_conntrack_tuple_hash { |
150 | { | 151 | struct hlist_nulls_node hnnode; |
151 | struct hlist_node hnode; | ||
152 | struct nf_conntrack_tuple tuple; | 152 | struct nf_conntrack_tuple tuple; |
153 | }; | 153 | }; |
154 | 154 | ||
diff --git a/include/net/netlink.h b/include/net/netlink.h index 8a6150a3f4c7..eddb50289d6d 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -230,6 +230,7 @@ extern int nla_validate(struct nlattr *head, int len, int maxtype, | |||
230 | extern int nla_parse(struct nlattr *tb[], int maxtype, | 230 | extern int nla_parse(struct nlattr *tb[], int maxtype, |
231 | struct nlattr *head, int len, | 231 | struct nlattr *head, int len, |
232 | const struct nla_policy *policy); | 232 | const struct nla_policy *policy); |
233 | extern int nla_policy_len(const struct nla_policy *, int); | ||
233 | extern struct nlattr * nla_find(struct nlattr *head, int len, int attrtype); | 234 | extern struct nlattr * nla_find(struct nlattr *head, int len, int attrtype); |
234 | extern size_t nla_strlcpy(char *dst, const struct nlattr *nla, | 235 | extern size_t nla_strlcpy(char *dst, const struct nlattr *nla, |
235 | size_t dstsize); | 236 | size_t dstsize); |
diff --git a/include/net/netns/conntrack.h b/include/net/netns/conntrack.h index f4498a62881b..9dc58402bc09 100644 --- a/include/net/netns/conntrack.h +++ b/include/net/netns/conntrack.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __NETNS_CONNTRACK_H | 2 | #define __NETNS_CONNTRACK_H |
3 | 3 | ||
4 | #include <linux/list.h> | 4 | #include <linux/list.h> |
5 | #include <linux/list_nulls.h> | ||
5 | #include <asm/atomic.h> | 6 | #include <asm/atomic.h> |
6 | 7 | ||
7 | struct ctl_table_header; | 8 | struct ctl_table_header; |
@@ -10,9 +11,9 @@ struct nf_conntrack_ecache; | |||
10 | struct netns_ct { | 11 | struct netns_ct { |
11 | atomic_t count; | 12 | atomic_t count; |
12 | unsigned int expect_count; | 13 | unsigned int expect_count; |
13 | struct hlist_head *hash; | 14 | struct hlist_nulls_head *hash; |
14 | struct hlist_head *expect_hash; | 15 | struct hlist_head *expect_hash; |
15 | struct hlist_head unconfirmed; | 16 | struct hlist_nulls_head unconfirmed; |
16 | struct ip_conntrack_stat *stat; | 17 | struct ip_conntrack_stat *stat; |
17 | #ifdef CONFIG_NF_CONNTRACK_EVENTS | 18 | #ifdef CONFIG_NF_CONNTRACK_EVENTS |
18 | struct nf_conntrack_ecache *ecache; | 19 | struct nf_conntrack_ecache *ecache; |