Date: Thu, 15 Sep 2016 22:27:00 +0000 (UTC) From: Andriy Voskoboinyk <avos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r305850 - head/sys/net80211 Message-ID: <201609152227.u8FMR0B7095924@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609152227.u8FMR0B7095924>