diff options
author | sam <sam@FreeBSD.org> | 2008-09-21 23:16:19 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2008-09-21 23:16:19 +0000 |
commit | bc3be4b34c9820a6ba945fe7d2329575084c3529 (patch) | |
tree | 596588786c3d6b60a71ec05655fea2114da6fa84 /sys/net80211/ieee80211_crypto.h | |
parent | 7a8139bec34979455320162a624d9f5762a864d0 (diff) | |
download | FreeBSD-src-bc3be4b34c9820a6ba945fe7d2329575084c3529.zip FreeBSD-src-bc3be4b34c9820a6ba945fe7d2329575084c3529.tar.gz |
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)
Diffstat (limited to 'sys/net80211/ieee80211_crypto.h')
-rw-r--r-- | sys/net80211/ieee80211_crypto.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sys/net80211/ieee80211_crypto.h b/sys/net80211/ieee80211_crypto.h index 89f0e78..63a9583 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]; |