Page MenuHomeFreeBSD

iwx: migrate to new net80211 encryption key API
ClosedPublic

Authored by adrian on Jan 2 2026, 11:43 PM.
Referenced Files
Unknown Object (File)
Mon, Feb 16, 8:22 PM
Unknown Object (File)
Fri, Feb 6, 9:44 PM
Unknown Object (File)
Jan 19 2026, 7:30 PM
Unknown Object (File)
Jan 18 2026, 1:26 PM
Unknown Object (File)
Jan 10 2026, 2:06 PM
Unknown Object (File)
Jan 8 2026, 4:36 AM
Unknown Object (File)
Jan 6 2026, 8:10 AM
Unknown Object (File)
Jan 4 2026, 11:05 PM
Subscribers

Details

Summary

Migrate to the new encryption key API rather than poking at the
key struct directly.

Diff Detail

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

Event Timeline

bz added inline comments.
sys/dev/iwx/if_iwx.c
11072
const uint8_t *wk_key:
uint16_t wk_keylen;

wk_key = ieee80211_crypto_get_key_data(k);
wk_keylen = ieee80211_crypto_get_key_len(k);

memcpy(cmd.common.key, wk_key, MIN(sizeof(cmd.common.key), wk_keylen));
IWX_DPRINTF(sc, IWX_DEBUG_KEYMGMT, "%s: key: id=%d, len=%i, key=%*D\n",
    __func__, id, wk_keylen, wk_keylen, wk_key, "");

Looks a lot more readable in the long run and fits into 80 char wide lines.

Though it still doesn't ensure that the actual key_data does not change from under you for as long as the key_update_begin/end are dummy functions; the pointer will stay fine.

This revision was not accepted when it landed; it landed in state Needs Review.Wed, Feb 11, 6:05 AM
This revision was automatically updated to reflect the committed changes.