HomeFreeBSD

LinuxKPI: 802.11: make TKIP start to work

Description

LinuxKPI: 802.11: make TKIP start to work

In lkpi_iv_key_set() change the order to check if the cipher suite
is supported. This for one avoids a possible kc memory leak, for the
other allows us to extend the keylen we use for allocating memory.
TKIP does need extra space as in addition to the key the RX/TX MIC
are appended. Copy those now as well.

In lkpi_hw_crypto_prepare_tkip() do the "enmic" (making space) part
first before doing the "encap" part (making space). While this is
technically not fully correct as the "enmic" would be done once for
the entire MSDU and the "encap" would be done for each fragment, we
are currently not setup to do per-vap or per-ic callbacks for this
at the right moment from net80211. It will require a bit of thought.
On the other hand we expect the firmware to do all this so it should
be fine for as long as we no longer skip one part.
We can likely start being more creative here in the compat code if
needed.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Details

Provenance
bzAuthored on Wed, Apr 16, 8:22 AM
Parents
rGa23908728efc: LinuxKPI: 802.11: fix TKIP RX/TX MIC offsets
Branches
Unknown
Tags
Unknown