diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-07-08 07:29:08 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-24 15:05:09 -0400 |
commit | b9454e83cac42fcdc90bfbfba479132bd6629455 (patch) | |
tree | 4f63180e1406f8b799ee6b2fca2efe4a656c2905 /include | |
parent | 10c836d7896e9d7b683a76f3cac3c289d8da72ef (diff) |
nl80211: introduce new key attributes
We will soon want to nest key attributes into
some new attribute for configuring static WEP
keys at connect() and ibss_join() time, so we
need nested attributes for that. However, key
attributes right now are 'global'. This patch
thus introduces new nested attributes for the
key settings and functions for parsing them.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nl80211.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index e496a2daf7ef..48e0913c2209 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -567,6 +567,9 @@ 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 | * | ||
570 | * @NL80211_ATTR_MAX: highest attribute number currently defined | 573 | * @NL80211_ATTR_MAX: highest attribute number currently defined |
571 | * @__NL80211_ATTR_AFTER_LAST: internal use | 574 | * @__NL80211_ATTR_AFTER_LAST: internal use |
572 | */ | 575 | */ |
@@ -692,6 +695,8 @@ enum nl80211_attrs { | |||
692 | 695 | ||
693 | NL80211_ATTR_PREV_BSSID, | 696 | NL80211_ATTR_PREV_BSSID, |
694 | 697 | ||
698 | NL80211_ATTR_KEY, | ||
699 | |||
695 | /* add attributes here, update the policy in nl80211.c */ | 700 | /* add attributes here, update the policy in nl80211.c */ |
696 | 701 | ||
697 | __NL80211_ATTR_AFTER_LAST, | 702 | __NL80211_ATTR_AFTER_LAST, |
@@ -720,6 +725,7 @@ enum nl80211_attrs { | |||
720 | #define NL80211_ATTR_CIPHER_SUITE_GROUP NL80211_ATTR_CIPHER_SUITE_GROUP | 725 | #define NL80211_ATTR_CIPHER_SUITE_GROUP NL80211_ATTR_CIPHER_SUITE_GROUP |
721 | #define NL80211_ATTR_WPA_VERSIONS NL80211_ATTR_WPA_VERSIONS | 726 | #define NL80211_ATTR_WPA_VERSIONS NL80211_ATTR_WPA_VERSIONS |
722 | #define NL80211_ATTR_AKM_SUITES NL80211_ATTR_AKM_SUITES | 727 | #define NL80211_ATTR_AKM_SUITES NL80211_ATTR_AKM_SUITES |
728 | #define NL80211_ATTR_KEY NL80211_ATTR_KEY | ||
723 | 729 | ||
724 | #define NL80211_MAX_SUPP_RATES 32 | 730 | #define NL80211_MAX_SUPP_RATES 32 |
725 | #define NL80211_MAX_SUPP_REG_RULES 32 | 731 | #define NL80211_MAX_SUPP_REG_RULES 32 |
@@ -1320,4 +1326,34 @@ enum nl80211_wpa_versions { | |||
1320 | NL80211_WPA_VERSION_2 = 1 << 1, | 1326 | NL80211_WPA_VERSION_2 = 1 << 1, |
1321 | }; | 1327 | }; |
1322 | 1328 | ||
1329 | /** | ||
1330 | * enum nl80211_key_attributes - key attributes | ||
1331 | * @__NL80211_KEY_INVALID: invalid | ||
1332 | * @NL80211_KEY_DATA: (temporal) key data; for TKIP this consists of | ||
1333 | * 16 bytes encryption key followed by 8 bytes each for TX and RX MIC | ||
1334 | * keys | ||
1335 | * @NL80211_KEY_IDX: key ID (u8, 0-3) | ||
1336 | * @NL80211_KEY_CIPHER: key cipher suite (u32, as defined by IEEE 802.11 | ||
1337 | * section 7.3.2.25.1, e.g. 0x000FAC04) | ||
1338 | * @NL80211_KEY_SEQ: transmit key sequence number (IV/PN) for TKIP and | ||
1339 | * CCMP keys, each six bytes in little endian | ||
1340 | * @NL80211_KEY_DEFAULT: flag indicating default key | ||
1341 | * @NL80211_KEY_DEFAULT_MGMT: flag indicating default management key | ||
1342 | * @__NL80211_KEY_AFTER_LAST: internal | ||
1343 | * @NL80211_KEY_MAX: highest key attribute | ||
1344 | */ | ||
1345 | enum nl80211_key_attributes { | ||
1346 | __NL80211_KEY_INVALID, | ||
1347 | NL80211_KEY_DATA, | ||
1348 | NL80211_KEY_IDX, | ||
1349 | NL80211_KEY_CIPHER, | ||
1350 | NL80211_KEY_SEQ, | ||
1351 | NL80211_KEY_DEFAULT, | ||
1352 | NL80211_KEY_DEFAULT_MGMT, | ||
1353 | |||
1354 | /* keep last */ | ||
1355 | __NL80211_KEY_AFTER_LAST, | ||
1356 | NL80211_KEY_MAX = __NL80211_KEY_AFTER_LAST - 1 | ||
1357 | }; | ||
1358 | |||
1323 | #endif /* __LINUX_NL80211_H */ | 1359 | #endif /* __LINUX_NL80211_H */ |