Page MenuHomeFreeBSD

net80211: allow a single wlan crypto module to register for >1 cipher
ClosedPublic

Authored by adrian on Apr 22 2024, 3:40 AM.
Referenced Files
Unknown Object (File)
Thu, May 23, 9:43 PM
Unknown Object (File)
Thu, May 16, 8:11 PM
Unknown Object (File)
Wed, May 15, 2:16 AM
Unknown Object (File)
Apr 30 2024, 5:34 AM
Unknown Object (File)
Apr 27 2024, 8:29 PM
Unknown Object (File)
Apr 25 2024, 8:58 PM
Unknown Object (File)
Apr 25 2024, 8:57 PM
Unknown Object (File)
Apr 25 2024, 8:55 PM

Details

Summary

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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I don't get it why this change made a difference in your test. Is it because of the bug I pointed in TEXT_SET ?

sys/net80211/ieee80211_freebsd.h
420

I think version is not needed here in this macro.

429

Can we remove the double hash operators ## here inside the "crypto##_set" of macro TEXT_SET? It's confusing to me until I checked other examples in this file.

for example:

TEXT_SET(scanner_set, name##_modevent);
TEXT_SET(acl_set, alg##_modevent);
...
adrian added inline comments.
sys/net80211/ieee80211_freebsd.h
429

I think there's a reason for it to be done like this, same as ratectl?

Let's figure that out after this stuff lands, as a separate clean-up path.

If you have a plan to figure out TEXT_SET(crypto##_set, name##_modevent) and TEXT_SET(ratectl##_set, alg##_modevent), I have no problem with this patch.

This revision is now accepted and ready to land.Apr 29 2024, 3:53 PM
sys/net80211/ieee80211_freebsd.h
420

Now I got it why you rename this macro and use it in D44921.

bz added a subscriber: bz.

Would be great if the commit message would mention IEEE80211_CRYPTO_MODULE() somehow so one can find this in the future more easily.

Also the Phab template has a separate section to describe the testing.