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
This commit is contained in:
Adrian Chadd 2024-04-21 20:36:05 -07:00
parent 98e8df90b5
commit dcf6ab2f2e

View File

@ -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.
*/