diff options
author | David S. Miller <davem@davemloft.net> | 2009-07-26 13:01:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-26 13:01:25 -0400 |
commit | c8b201ff867e64b6233d069563081775269f4499 (patch) | |
tree | 35d363e6cb565fd7285480dc877a2da79eafb9a7 /include | |
parent | 436b355b96042ab6564f43a7dabd5c61d9634ff7 (diff) | |
parent | 249b405cf8145da8a74b70544ae1079d244bdb00 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nl80211.h | 52 | ||||
-rw-r--r-- | include/linux/skbuff.h | 6 | ||||
-rw-r--r-- | include/net/cfg80211.h | 20 | ||||
-rw-r--r-- | include/net/mac80211.h | 37 |
4 files changed, 108 insertions, 7 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index e496a2daf7ef..962e2232a074 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -567,6 +567,12 @@ enum nl80211_commands { | |||
567 | * @NL80211_ATTR_PREV_BSSID: previous BSSID, to be used by in ASSOCIATE | 567 | * @NL80211_ATTR_PREV_BSSID: previous BSSID, to be used by in ASSOCIATE |
568 | * commands to specify using a reassociate frame | 568 | * commands to specify using a reassociate frame |
569 | * | 569 | * |
570 | * @NL80211_ATTR_KEY: key information in a nested attribute with | ||
571 | * %NL80211_KEY_* sub-attributes | ||
572 | * @NL80211_ATTR_KEYS: array of keys for static WEP keys for connect() | ||
573 | * and join_ibss(), key information is in a nested attribute each | ||
574 | * with %NL80211_KEY_* sub-attributes | ||
575 | * | ||
570 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 576 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
571 | * @__NL80211_ATTR_AFTER_LAST: internal use | 577 | * @__NL80211_ATTR_AFTER_LAST: internal use |
572 | */ | 578 | */ |
@@ -692,6 +698,9 @@ enum nl80211_attrs { | |||
692 | 698 | ||
693 | NL80211_ATTR_PREV_BSSID, | 699 | NL80211_ATTR_PREV_BSSID, |
694 | 700 | ||
701 | NL80211_ATTR_KEY, | ||
702 | NL80211_ATTR_KEYS, | ||
703 | |||
695 | /* add attributes here, update the policy in nl80211.c */ | 704 | /* add attributes here, update the policy in nl80211.c */ |
696 | 705 | ||
697 | __NL80211_ATTR_AFTER_LAST, | 706 | __NL80211_ATTR_AFTER_LAST, |
@@ -720,6 +729,8 @@ enum nl80211_attrs { | |||
720 | #define NL80211_ATTR_CIPHER_SUITE_GROUP NL80211_ATTR_CIPHER_SUITE_GROUP | 729 | #define NL80211_ATTR_CIPHER_SUITE_GROUP NL80211_ATTR_CIPHER_SUITE_GROUP |
721 | #define NL80211_ATTR_WPA_VERSIONS NL80211_ATTR_WPA_VERSIONS | 730 | #define NL80211_ATTR_WPA_VERSIONS NL80211_ATTR_WPA_VERSIONS |
722 | #define NL80211_ATTR_AKM_SUITES NL80211_ATTR_AKM_SUITES | 731 | #define NL80211_ATTR_AKM_SUITES NL80211_ATTR_AKM_SUITES |
732 | #define NL80211_ATTR_KEY NL80211_ATTR_KEY | ||
733 | #define NL80211_ATTR_KEYS NL80211_ATTR_KEYS | ||
723 | 734 | ||
724 | #define NL80211_MAX_SUPP_RATES 32 | 735 | #define NL80211_MAX_SUPP_RATES 32 |
725 | #define NL80211_MAX_SUPP_REG_RULES 32 | 736 | #define NL80211_MAX_SUPP_REG_RULES 32 |
@@ -1249,6 +1260,7 @@ enum nl80211_channel_type { | |||
1249 | * in mBm (100 * dBm) (s32) | 1260 | * in mBm (100 * dBm) (s32) |
1250 | * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon | 1261 | * @NL80211_BSS_SIGNAL_UNSPEC: signal strength of the probe response/beacon |
1251 | * in unspecified units, scaled to 0..100 (u8) | 1262 | * in unspecified units, scaled to 0..100 (u8) |
1263 | * @NL80211_BSS_STATUS: status, if this BSS is "used" | ||
1252 | * @__NL80211_BSS_AFTER_LAST: internal | 1264 | * @__NL80211_BSS_AFTER_LAST: internal |
1253 | * @NL80211_BSS_MAX: highest BSS attribute | 1265 | * @NL80211_BSS_MAX: highest BSS attribute |
1254 | */ | 1266 | */ |
@@ -1262,6 +1274,7 @@ enum nl80211_bss { | |||
1262 | NL80211_BSS_INFORMATION_ELEMENTS, | 1274 | NL80211_BSS_INFORMATION_ELEMENTS, |
1263 | NL80211_BSS_SIGNAL_MBM, | 1275 | NL80211_BSS_SIGNAL_MBM, |
1264 | NL80211_BSS_SIGNAL_UNSPEC, | 1276 | NL80211_BSS_SIGNAL_UNSPEC, |
1277 | NL80211_BSS_STATUS, | ||
1265 | 1278 | ||
1266 | /* keep last */ | 1279 | /* keep last */ |
1267 | __NL80211_BSS_AFTER_LAST, | 1280 | __NL80211_BSS_AFTER_LAST, |
@@ -1269,6 +1282,15 @@ enum nl80211_bss { | |||
1269 | }; | 1282 | }; |
1270 | 1283 | ||
1271 | /** | 1284 | /** |
1285 | * enum nl80211_bss_status - BSS "status" | ||
1286 | */ | ||
1287 | enum nl80211_bss_status { | ||
1288 | NL80211_BSS_STATUS_AUTHENTICATED, | ||
1289 | NL80211_BSS_STATUS_ASSOCIATED, | ||
1290 | NL80211_BSS_STATUS_IBSS_JOINED, | ||
1291 | }; | ||
1292 | |||
1293 | /** | ||
1272 | * enum nl80211_auth_type - AuthenticationType | 1294 | * enum nl80211_auth_type - AuthenticationType |
1273 | * | 1295 | * |
1274 | * @NL80211_AUTHTYPE_OPEN_SYSTEM: Open System authentication | 1296 | * @NL80211_AUTHTYPE_OPEN_SYSTEM: Open System authentication |
@@ -1320,4 +1342,34 @@ enum nl80211_wpa_versions { | |||
1320 | NL80211_WPA_VERSION_2 = 1 << 1, | 1342 | NL80211_WPA_VERSION_2 = 1 << 1, |
1321 | }; | 1343 | }; |
1322 | 1344 | ||
1345 | /** | ||
1346 | * enum nl80211_key_attributes - key attributes | ||
1347 | * @__NL80211_KEY_INVALID: invalid | ||
1348 | * @NL80211_KEY_DATA: (temporal) key data; for TKIP this consists of | ||
1349 | * 16 bytes encryption key followed by 8 bytes each for TX and RX MIC | ||
1350 | * keys | ||
1351 | * @NL80211_KEY_IDX: key ID (u8, 0-3) | ||
1352 | * @NL80211_KEY_CIPHER: key cipher suite (u32, as defined by IEEE 802.11 | ||
1353 | * section 7.3.2.25.1, e.g. 0x000FAC04) | ||
1354 | * @NL80211_KEY_SEQ: transmit key sequence number (IV/PN) for TKIP and | ||
1355 | * CCMP keys, each six bytes in little endian | ||
1356 | * @NL80211_KEY_DEFAULT: flag indicating default key | ||
1357 | * @NL80211_KEY_DEFAULT_MGMT: flag indicating default management key | ||
1358 | * @__NL80211_KEY_AFTER_LAST: internal | ||
1359 | * @NL80211_KEY_MAX: highest key attribute | ||
1360 | */ | ||
1361 | enum nl80211_key_attributes { | ||
1362 | __NL80211_KEY_INVALID, | ||
1363 | NL80211_KEY_DATA, | ||
1364 | NL80211_KEY_IDX, | ||
1365 | NL80211_KEY_CIPHER, | ||
1366 | NL80211_KEY_SEQ, | ||
1367 | NL80211_KEY_DEFAULT, | ||
1368 | NL80211_KEY_DEFAULT_MGMT, | ||
1369 | |||
1370 | /* keep last */ | ||
1371 | __NL80211_KEY_AFTER_LAST, | ||
1372 | NL80211_KEY_MAX = __NL80211_KEY_AFTER_LAST - 1 | ||
1373 | }; | ||
1374 | |||
1323 | #endif /* __LINUX_NL80211_H */ | 1375 | #endif /* __LINUX_NL80211_H */ |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index f2c69a2cca17..df7b23ac66e6 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -304,7 +304,6 @@ typedef unsigned char *sk_buff_data_t; | |||
304 | * @tc_index: Traffic control index | 304 | * @tc_index: Traffic control index |
305 | * @tc_verd: traffic control verdict | 305 | * @tc_verd: traffic control verdict |
306 | * @ndisc_nodetype: router type (from link layer) | 306 | * @ndisc_nodetype: router type (from link layer) |
307 | * @do_not_encrypt: set to prevent encryption of this frame | ||
308 | * @dma_cookie: a cookie to one of several possible DMA operations | 307 | * @dma_cookie: a cookie to one of several possible DMA operations |
309 | * done by skb DMA functions | 308 | * done by skb DMA functions |
310 | * @secmark: security marking | 309 | * @secmark: security marking |
@@ -380,12 +379,9 @@ struct sk_buff { | |||
380 | #ifdef CONFIG_IPV6_NDISC_NODETYPE | 379 | #ifdef CONFIG_IPV6_NDISC_NODETYPE |
381 | __u8 ndisc_nodetype:2; | 380 | __u8 ndisc_nodetype:2; |
382 | #endif | 381 | #endif |
383 | #if defined(CONFIG_MAC80211) || defined(CONFIG_MAC80211_MODULE) | ||
384 | __u8 do_not_encrypt:1; | ||
385 | #endif | ||
386 | kmemcheck_bitfield_end(flags2); | 382 | kmemcheck_bitfield_end(flags2); |
387 | 383 | ||
388 | /* 0/13/14 bit hole */ | 384 | /* 0/14 bit hole */ |
389 | 385 | ||
390 | #ifdef CONFIG_NET_DMA | 386 | #ifdef CONFIG_NET_DMA |
391 | dma_cookie_t dma_cookie; | 387 | dma_cookie_t dma_cookie; |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 83c2c727d71e..a981ca8a5701 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -538,7 +538,7 @@ struct cfg80211_ssid { | |||
538 | * @ssids: SSIDs to scan for (active scan only) | 538 | * @ssids: SSIDs to scan for (active scan only) |
539 | * @n_ssids: number of SSIDs | 539 | * @n_ssids: number of SSIDs |
540 | * @channels: channels to scan on. | 540 | * @channels: channels to scan on. |
541 | * @n_channels: number of channels for each band | 541 | * @n_channels: total number of channels to scan |
542 | * @ie: optional information element(s) to add into Probe Request or %NULL | 542 | * @ie: optional information element(s) to add into Probe Request or %NULL |
543 | * @ie_len: length of ie in octets | 543 | * @ie_len: length of ie in octets |
544 | * @wiphy: the wiphy this was for | 544 | * @wiphy: the wiphy this was for |
@@ -647,12 +647,17 @@ struct cfg80211_crypto_settings { | |||
647 | * @auth_type: Authentication type (algorithm) | 647 | * @auth_type: Authentication type (algorithm) |
648 | * @ie: Extra IEs to add to Authentication frame or %NULL | 648 | * @ie: Extra IEs to add to Authentication frame or %NULL |
649 | * @ie_len: Length of ie buffer in octets | 649 | * @ie_len: Length of ie buffer in octets |
650 | * @key_len: length of WEP key for shared key authentication | ||
651 | * @key_idx: index of WEP key for shared key authentication | ||
652 | * @key: WEP key for shared key authentication | ||
650 | */ | 653 | */ |
651 | struct cfg80211_auth_request { | 654 | struct cfg80211_auth_request { |
652 | struct cfg80211_bss *bss; | 655 | struct cfg80211_bss *bss; |
653 | const u8 *ie; | 656 | const u8 *ie; |
654 | size_t ie_len; | 657 | size_t ie_len; |
655 | enum nl80211_auth_type auth_type; | 658 | enum nl80211_auth_type auth_type; |
659 | const u8 *key; | ||
660 | u8 key_len, key_idx; | ||
656 | }; | 661 | }; |
657 | 662 | ||
658 | /** | 663 | /** |
@@ -727,6 +732,8 @@ struct cfg80211_disassoc_request { | |||
727 | * @ie: information element(s) to include in the beacon | 732 | * @ie: information element(s) to include in the beacon |
728 | * @ie_len: length of that | 733 | * @ie_len: length of that |
729 | * @beacon_interval: beacon interval to use | 734 | * @beacon_interval: beacon interval to use |
735 | * @privacy: this is a protected network, keys will be configured | ||
736 | * after joining | ||
730 | */ | 737 | */ |
731 | struct cfg80211_ibss_params { | 738 | struct cfg80211_ibss_params { |
732 | u8 *ssid; | 739 | u8 *ssid; |
@@ -736,6 +743,7 @@ struct cfg80211_ibss_params { | |||
736 | u8 ssid_len, ie_len; | 743 | u8 ssid_len, ie_len; |
737 | u16 beacon_interval; | 744 | u16 beacon_interval; |
738 | bool channel_fixed; | 745 | bool channel_fixed; |
746 | bool privacy; | ||
739 | }; | 747 | }; |
740 | 748 | ||
741 | /** | 749 | /** |
@@ -755,6 +763,9 @@ struct cfg80211_ibss_params { | |||
755 | * @assoc_ie_len: Length of assoc_ie in octets | 763 | * @assoc_ie_len: Length of assoc_ie in octets |
756 | * @privacy: indicates whether privacy-enabled APs should be used | 764 | * @privacy: indicates whether privacy-enabled APs should be used |
757 | * @crypto: crypto settings | 765 | * @crypto: crypto settings |
766 | * @key_len: length of WEP key for shared key authentication | ||
767 | * @key_idx: index of WEP key for shared key authentication | ||
768 | * @key: WEP key for shared key authentication | ||
758 | */ | 769 | */ |
759 | struct cfg80211_connect_params { | 770 | struct cfg80211_connect_params { |
760 | struct ieee80211_channel *channel; | 771 | struct ieee80211_channel *channel; |
@@ -766,6 +777,8 @@ struct cfg80211_connect_params { | |||
766 | size_t ie_len; | 777 | size_t ie_len; |
767 | bool privacy; | 778 | bool privacy; |
768 | struct cfg80211_crypto_settings crypto; | 779 | struct cfg80211_crypto_settings crypto; |
780 | const u8 *key; | ||
781 | u8 key_len, key_idx; | ||
769 | }; | 782 | }; |
770 | 783 | ||
771 | /** | 784 | /** |
@@ -1223,9 +1236,10 @@ extern void wiphy_unregister(struct wiphy *wiphy); | |||
1223 | */ | 1236 | */ |
1224 | extern void wiphy_free(struct wiphy *wiphy); | 1237 | extern void wiphy_free(struct wiphy *wiphy); |
1225 | 1238 | ||
1226 | /* internal struct */ | 1239 | /* internal structs */ |
1227 | struct cfg80211_conn; | 1240 | struct cfg80211_conn; |
1228 | struct cfg80211_internal_bss; | 1241 | struct cfg80211_internal_bss; |
1242 | struct cfg80211_cached_keys; | ||
1229 | 1243 | ||
1230 | #define MAX_AUTH_BSSES 4 | 1244 | #define MAX_AUTH_BSSES 4 |
1231 | 1245 | ||
@@ -1267,6 +1281,7 @@ struct wireless_dev { | |||
1267 | CFG80211_SME_CONNECTED, | 1281 | CFG80211_SME_CONNECTED, |
1268 | } sme_state; | 1282 | } sme_state; |
1269 | struct cfg80211_conn *conn; | 1283 | struct cfg80211_conn *conn; |
1284 | struct cfg80211_cached_keys *connect_keys; | ||
1270 | 1285 | ||
1271 | struct list_head event_list; | 1286 | struct list_head event_list; |
1272 | spinlock_t event_lock; | 1287 | spinlock_t event_lock; |
@@ -1280,6 +1295,7 @@ struct wireless_dev { | |||
1280 | struct { | 1295 | struct { |
1281 | struct cfg80211_ibss_params ibss; | 1296 | struct cfg80211_ibss_params ibss; |
1282 | struct cfg80211_connect_params connect; | 1297 | struct cfg80211_connect_params connect; |
1298 | struct cfg80211_cached_keys *keys; | ||
1283 | u8 *ie; | 1299 | u8 *ie; |
1284 | size_t ie_len; | 1300 | size_t ie_len; |
1285 | u8 bssid[ETH_ALEN]; | 1301 | u8 bssid[ETH_ALEN]; |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index ce7cb1b5d453..7dd67a1ff4d5 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -241,6 +241,8 @@ struct ieee80211_bss_conf { | |||
241 | * it can be sent out. | 241 | * it can be sent out. |
242 | * @IEEE80211_TX_INTFL_RETRIED: completely internal to mac80211, | 242 | * @IEEE80211_TX_INTFL_RETRIED: completely internal to mac80211, |
243 | * used to indicate that a frame was already retried due to PS | 243 | * used to indicate that a frame was already retried due to PS |
244 | * @IEEE80211_TX_INTFL_DONT_ENCRYPT: completely internal to mac80211, | ||
245 | * used to indicate frame should not be encrypted | ||
244 | */ | 246 | */ |
245 | enum mac80211_tx_control_flags { | 247 | enum mac80211_tx_control_flags { |
246 | IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), | 248 | IEEE80211_TX_CTL_REQ_TX_STATUS = BIT(0), |
@@ -259,6 +261,7 @@ enum mac80211_tx_control_flags { | |||
259 | IEEE80211_TX_INTFL_RCALGO = BIT(13), | 261 | IEEE80211_TX_INTFL_RCALGO = BIT(13), |
260 | IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), | 262 | IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), |
261 | IEEE80211_TX_INTFL_RETRIED = BIT(15), | 263 | IEEE80211_TX_INTFL_RETRIED = BIT(15), |
264 | IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16), | ||
262 | }; | 265 | }; |
263 | 266 | ||
264 | /** | 267 | /** |
@@ -2094,6 +2097,29 @@ static inline int rate_supported(struct ieee80211_sta *sta, | |||
2094 | return (sta == NULL || sta->supp_rates[band] & BIT(index)); | 2097 | return (sta == NULL || sta->supp_rates[band] & BIT(index)); |
2095 | } | 2098 | } |
2096 | 2099 | ||
2100 | /** | ||
2101 | * rate_control_send_low - helper for drivers for management/no-ack frames | ||
2102 | * | ||
2103 | * Rate control algorithms that agree to use the lowest rate to | ||
2104 | * send management frames and NO_ACK data with the respective hw | ||
2105 | * retries should use this in the beginning of their mac80211 get_rate | ||
2106 | * callback. If true is returned the rate control can simply return. | ||
2107 | * If false is returned we guarantee that sta and sta and priv_sta is | ||
2108 | * not null. | ||
2109 | * | ||
2110 | * Rate control algorithms wishing to do more intelligent selection of | ||
2111 | * rate for multicast/broadcast frames may choose to not use this. | ||
2112 | * | ||
2113 | * @sta: &struct ieee80211_sta pointer to the target destination. Note | ||
2114 | * that this may be null. | ||
2115 | * @priv_sta: private rate control structure. This may be null. | ||
2116 | * @txrc: rate control information we sholud populate for mac80211. | ||
2117 | */ | ||
2118 | bool rate_control_send_low(struct ieee80211_sta *sta, | ||
2119 | void *priv_sta, | ||
2120 | struct ieee80211_tx_rate_control *txrc); | ||
2121 | |||
2122 | |||
2097 | static inline s8 | 2123 | static inline s8 |
2098 | rate_lowest_index(struct ieee80211_supported_band *sband, | 2124 | rate_lowest_index(struct ieee80211_supported_band *sband, |
2099 | struct ieee80211_sta *sta) | 2125 | struct ieee80211_sta *sta) |
@@ -2110,6 +2136,17 @@ rate_lowest_index(struct ieee80211_supported_band *sband, | |||
2110 | return 0; | 2136 | return 0; |
2111 | } | 2137 | } |
2112 | 2138 | ||
2139 | static inline | ||
2140 | bool rate_usable_index_exists(struct ieee80211_supported_band *sband, | ||
2141 | struct ieee80211_sta *sta) | ||
2142 | { | ||
2143 | unsigned int i; | ||
2144 | |||
2145 | for (i = 0; i < sband->n_bitrates; i++) | ||
2146 | if (rate_supported(sta, sband->band, i)) | ||
2147 | return true; | ||
2148 | return false; | ||
2149 | } | ||
2113 | 2150 | ||
2114 | int ieee80211_rate_control_register(struct rate_control_ops *ops); | 2151 | int ieee80211_rate_control_register(struct rate_control_ops *ops); |
2115 | void ieee80211_rate_control_unregister(struct rate_control_ops *ops); | 2152 | void ieee80211_rate_control_unregister(struct rate_control_ops *ops); |