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
This commit is contained in:
parent
9680db5e94
commit
5d7c8f2065
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user