aboutsummaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_crypto.h
diff options
context:
space:
mode:
authorSam Leffler <sam@FreeBSD.org>2008-09-21 23:16:19 +0000
committerSam Leffler <sam@FreeBSD.org>2008-09-21 23:16:19 +0000
commite6e547d57b161e5a81834cf7121caef7305e3624 (patch)
tree596588786c3d6b60a71ec05655fea2114da6fa84 /sys/net80211/ieee80211_crypto.h
parent45f856e3ac5d0535fd1a285414f23c5038b27207 (diff)
downloadsrc-e6e547d57b161e5a81834cf7121caef7305e3624.tar.gz
src-e6e547d57b161e5a81834cf7121caef7305e3624.zip
Crypto api changes:
o don't use the key index to identify when the driver has been asked to allocate a key slot, use an explicit flag; allows drivers to force s/w fallback for entries in the global table o change callback api to allocate driver resources for a crypto key: - de-const the key parameter so drivers can muck with the flags - on callback failure don't automatically try to setup s/w crypto; instead the driver must now mark the key entry for s/w crypto and the caller will re-attach the cipher module NB: api change permits drivers more control over fallback to s/w crypto (e.g. based on a limited number of h/w key slots)
Notes
Notes: svn path=/head/; revision=183248
Diffstat (limited to 'sys/net80211/ieee80211_crypto.h')
-rw-r--r--sys/net80211/ieee80211_crypto.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/sys/net80211/ieee80211_crypto.h b/sys/net80211/ieee80211_crypto.h
index 89f0e788e747..63a95836e539 100644
--- a/sys/net80211/ieee80211_crypto.h
+++ b/sys/net80211/ieee80211_crypto.h
@@ -75,13 +75,16 @@ struct ieee80211_key {
uint8_t wk_keylen; /* key length in bytes */
uint8_t wk_pad;
uint16_t wk_flags;
-#define IEEE80211_KEY_XMIT 0x01 /* key used for xmit */
-#define IEEE80211_KEY_RECV 0x02 /* key used for recv */
-#define IEEE80211_KEY_GROUP 0x04 /* key used for WPA group operation */
-#define IEEE80211_KEY_SWENCRYPT 0x10 /* host-based encrypt */
-#define IEEE80211_KEY_SWDECRYPT 0x20 /* host-based decrypt */
-#define IEEE80211_KEY_SWENMIC 0x40 /* host-based enmic */
-#define IEEE80211_KEY_SWDEMIC 0x80 /* host-based demic */
+#define IEEE80211_KEY_XMIT 0x0001 /* key used for xmit */
+#define IEEE80211_KEY_RECV 0x0002 /* key used for recv */
+#define IEEE80211_KEY_GROUP 0x0004 /* key used for WPA group operation */
+#define IEEE80211_KEY_SWENCRYPT 0x0010 /* host-based encrypt */
+#define IEEE80211_KEY_SWDECRYPT 0x0020 /* host-based decrypt */
+#define IEEE80211_KEY_SWENMIC 0x0040 /* host-based enmic */
+#define IEEE80211_KEY_SWDEMIC 0x0080 /* host-based demic */
+#define IEEE80211_KEY_DEVKEY 0x0100 /* device key request completed */
+#define IEEE80211_KEY_CIPHER0 0x1000 /* cipher-specific action 0 */
+#define IEEE80211_KEY_CIPHER1 0x2000 /* cipher-specific action 1 */
ieee80211_keyix wk_keyix; /* h/w key index */
ieee80211_keyix wk_rxkeyix; /* optional h/w rx key index */
uint8_t wk_key[IEEE80211_KEYBUF_SIZE+IEEE80211_MICBUF_SIZE];