git: dcf6ab2f2e38 - main - net80211: allow a single wlan crypto module to register for >1 cipher
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 14 May 2024 21:39:49 UTC
The branch main has been updated by adrian:
URL: https://cgit.FreeBSD.org/src/commit/?id=dcf6ab2f2e38238f11b8f3b20f05ab43f73618c3
commit dcf6ab2f2e38238f11b8f3b20f05ab43f73618c3
Author: Adrian Chadd <adrian@FreeBSD.org>
AuthorDate: 2024-04-22 03:36:05 +0000
Commit: Adrian Chadd <adrian@FreeBSD.org>
CommitDate: 2024-05-14 21:39:24 +0000
net80211: allow a single wlan crypto module to register for >1 cipher
This allows a single wlan crypto module to register for more than
one cipher. Without it, duplicate linkerset structs are initialised
for the actual module loading machinery itself.
I've tested this in my private tree with wlan_ccmp providing both
128 and 256 bit cipher support.
Differential Revision: https://reviews.freebsd.org/D44901
Reviewed by: bz, cc, cy
Approved by: bz, cc, cy
---
sys/net80211/ieee80211_freebsd.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sys/net80211/ieee80211_freebsd.h b/sys/net80211/ieee80211_freebsd.h
index ec017bb21ec4..b58c55cc7652 100644
--- a/sys/net80211/ieee80211_freebsd.h
+++ b/sys/net80211/ieee80211_freebsd.h
@@ -417,8 +417,7 @@ MODULE_DEPEND(wlan_##name, wlan, 1, 1, 1)
/*
* Crypto modules implement cipher support.
*/
-#define IEEE80211_CRYPTO_MODULE(name, version) \
-_IEEE80211_POLICY_MODULE(crypto, name, version); \
+#define IEEE80211_CRYPTO_MODULE_ADD(name) \
static void \
name##_modevent(int type) \
{ \
@@ -429,6 +428,10 @@ name##_modevent(int type) \
} \
TEXT_SET(crypto##_set, name##_modevent)
+#define IEEE80211_CRYPTO_MODULE(name, version) \
+ _IEEE80211_POLICY_MODULE(crypto, name, version); \
+ IEEE80211_CRYPTO_MODULE_ADD(name)
+
/*
* Scanner modules provide scanning policy.
*/