HomeFreeBSD

net80211: refactor out the AAD init code shared between GCMP and CCMP

Description

net80211: refactor out the AAD init code shared between GCMP and CCMP

The 802.11 specification specifically calls out that the GCMP AES
uses the CCMP AES specification, so we can re-use this here.

Changes during refactoring:

  • the first block (b0) needs the priority field populated, which was being done inline with the CCMP AAD assembly. So write a new function that implements just that.
  • Use IEEE80211_IS_QOS_ANY() in the AAD assembly; 802.11-2020 12.5.3.3.3 (Construct AAD) talks about frames with QoS control field, not specifically QoS data frames (ie, not avoiding PS-POLL.)
  • Use IEEE80211_IS_QOS_ANY() in the CCM nonce assembly. Leave some verbose comments about the definition of "MPDU priority".
  • mask the HTC/ORDER bit in the FC if the data frame contains a QoS control field. Again, see 802.11-2020 12.5.3.3.3.
  • Add extra comments about missing items and functionality for later implementation.

Differential Revision: https://reviews.freebsd.org/D49367
Reviewed by: bz

Details

Provenance
adrianAuthored on Mar 14 2025, 11:30 PM
Reviewer
bz
Differential Revision
D49367: net80211: refactor out the AAD init code shared between GCMP and CCMP
Parents
rGeac4d55dba47: net80211: Refactor CCMP-128 support; add CCMP-256 support
Branches
Unknown
Tags
Unknown