git: 05540e62e75f - main - net80211: add the 802.11-2016 cipher list to the crypto array set.

From: Adrian Chadd <adrian_at_FreeBSD.org>
Date: Tue, 14 May 2024 21:39:47 UTC
The branch main has been updated by adrian:

URL: https://cgit.FreeBSD.org/src/commit/?id=05540e62e75f8b2de7e337738eacfb0b159515a6

commit 05540e62e75f8b2de7e337738eacfb0b159515a6
Author:     Adrian Chadd <adrian@FreeBSD.org>
AuthorDate: 2024-04-22 03:25:33 +0000
Commit:     Adrian Chadd <adrian@FreeBSD.org>
CommitDate: 2024-05-14 21:39:00 +0000

    net80211: add the 802.11-2016 cipher list to the crypto array set.
    
    These are the bitmap / cipher module number fields used for net80211
    ciphers.
    
    This requires a kernel recompile, but nothing (currently) in userland
    is using these.
    
    Differential Revision:   https://reviews.freebsd.org/D44899
    Reviewed by:    bz, cc
---
 sys/net80211/ieee80211_crypto.h | 22 ++++++++++++++++++++--
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/sys/net80211/ieee80211_crypto.h b/sys/net80211/ieee80211_crypto.h
index 9637278701ff..e09b822289d7 100644
--- a/sys/net80211/ieee80211_crypto.h
+++ b/sys/net80211/ieee80211_crypto.h
@@ -137,8 +137,17 @@ struct ieee80211_key {
 #define	IEEE80211_CIPHER_TKIPMIC	4	/* TKIP MIC capability */
 #define	IEEE80211_CIPHER_CKIP		5
 #define	IEEE80211_CIPHER_NONE		6	/* pseudo value */
+#define	IEEE80211_CIPHER_AES_CCM_256	7
+#define	IEEE80211_CIPHER_BIP_CMAC_128	8
+#define	IEEE80211_CIPHER_BIP_CMAC_256	9
+#define	IEEE80211_CIPHER_BIP_GMAC_128	10
+#define	IEEE80211_CIPHER_BIP_GMAC_256	11
+#define	IEEE80211_CIPHER_AES_GCM_128	12
+#define	IEEE80211_CIPHER_AES_GCM_256	13
 
-#define	IEEE80211_CIPHER_MAX		(IEEE80211_CIPHER_NONE+1)
+#define	IEEE80211_CIPHER_LAST		13
+
+#define	IEEE80211_CIPHER_MAX		(IEEE80211_CIPHER_LAST+1)
 
 /* capability bits in ic_cryptocaps/iv_cryptocaps */
 #define	IEEE80211_CRYPTO_WEP		(1<<IEEE80211_CIPHER_WEP)
@@ -147,9 +156,18 @@ struct ieee80211_key {
 #define	IEEE80211_CRYPTO_AES_CCM	(1<<IEEE80211_CIPHER_AES_CCM)
 #define	IEEE80211_CRYPTO_TKIPMIC	(1<<IEEE80211_CIPHER_TKIPMIC)
 #define	IEEE80211_CRYPTO_CKIP		(1<<IEEE80211_CIPHER_CKIP)
+#define	IEEE80211_CRYPTO_AES_CCM_256	(1<<IEEE80211_CIPHER_AES_CCM_256)
+#define	IEEE80211_CRYPTO_BIP_CMAC_128	(1<<IEEE80211_CIPHER_BIP_CMAC_128)
+#define	IEEE80211_CRYPTO_BIP_CMAC_256	(1<<IEEE80211_CIPHER_BIP_CMAC_256)
+#define	IEEE80211_CRYPTO_BIP_GMAC_128	(1<<IEEE80211_CIPHER_BIP_GMAC_128)
+#define	IEEE80211_CRYPTO_BIP_GMAC_256	(1<<IEEE80211_CIPHER_BIP_GMAC_256)
+#define	IEEE80211_CRYPTO_AES_GCM_128	(1<<IEEE80211_CIPHER_AES_GCM_128)
+#define	IEEE80211_CRYPTO_AES_GCM_256	(1<<IEEE80211_CIPHER_AES_GCM_256)
 
 #define	IEEE80211_CRYPTO_BITS \
-	"\20\1WEP\2TKIP\3AES\4AES_CCM\5TKIPMIC\6CKIP"
+	"\20\1WEP\2TKIP\3AES\4AES_CCM\5TKIPMIC\6CKIP\10AES_CCM_256" \
+	"\11BIP_CMAC_128\12BIP_CMAC_256\13BIP_GMAC_128\14BIP_CMAC_256" \
+	"\15AES_GCM_128\16AES_GCM_256"
 
 #if defined(__KERNEL__) || defined(_KERNEL)