svn commit: r305850 - head/sys/net80211
Andriy Voskoboinyk
avos at FreeBSD.org
Thu Sep 15 22:27:01 UTC 2016
Author: avos
Date: Thu Sep 15 22:27:00 2016
New Revision: 305850
URL: https://svnweb.freebsd.org/changeset/base/305850
Log:
net80211: allow to override SWCRYPT/SWMIC bits in the driver
Add IEEE80211_KEY_SWCRYPT / IEEE80211_KEY_SWMIC bits to the
IEEE80211_KEY_DEVICE mask - as a result, those bits will be preserved
during group key handshake.
A driver can override them in iv_key_alloc() for some keys in case
when hardware crypto support is not possible. As an example:
- multi-vap without multicast key search support;
- IBSS RSN for devices w/ fixed storage for group keys;
Tested with RTL8188EU (AP, sw crypto) and
RTL8821AU (STA, sw crypto for group keys + hw crypto for pairwise keys)
Reviewed by: adrian
Differential Revision: https://reviews.freebsd.org/D7901
Modified:
head/sys/net80211/ieee80211_crypto.h
Modified: head/sys/net80211/ieee80211_crypto.h
==============================================================================
--- head/sys/net80211/ieee80211_crypto.h Thu Sep 15 18:30:53 2016 (r305849)
+++ head/sys/net80211/ieee80211_crypto.h Thu Sep 15 22:27:00 2016 (r305850)
@@ -101,13 +101,15 @@ struct ieee80211_key {
#define IEEE80211_KEY_COMMON /* common flags passed in by apps */\
(IEEE80211_KEY_XMIT | IEEE80211_KEY_RECV | IEEE80211_KEY_GROUP | \
IEEE80211_KEY_NOREPLAY)
-#define IEEE80211_KEY_DEVICE /* flags owned by device driver */\
- (IEEE80211_KEY_DEVKEY|IEEE80211_KEY_CIPHER0|IEEE80211_KEY_CIPHER1)
#define IEEE80211_KEY_SWCRYPT \
(IEEE80211_KEY_SWENCRYPT | IEEE80211_KEY_SWDECRYPT)
#define IEEE80211_KEY_SWMIC (IEEE80211_KEY_SWENMIC | IEEE80211_KEY_SWDEMIC)
+#define IEEE80211_KEY_DEVICE /* flags owned by device driver */\
+ (IEEE80211_KEY_DEVKEY|IEEE80211_KEY_CIPHER0|IEEE80211_KEY_CIPHER1| \
+ IEEE80211_KEY_SWCRYPT|IEEE80211_KEY_SWMIC)
+
#define IEEE80211_KEY_BITS \
"\20\1XMIT\2RECV\3GROUP\4SWENCRYPT\5SWDECRYPT\6SWENMIC\7SWDEMIC" \
"\10DEVKEY\11CIPHER0\12CIPHER1"
More information about the svn-src-all
mailing list