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)
Wed, Apr 15, 10:41 AM
Unknown Object (File)
Mon, Apr 13, 5:55 PM
Unknown Object (File)
Sun, Apr 12, 6:08 PM
Unknown Object (File)
Tue, Apr 7, 6:04 AM
Unknown Object (File)
Sun, Apr 5, 1:07 PM
Unknown Object (File)
Sun, Apr 5, 1:02 PM
Unknown Object (File)
Sun, Mar 29, 12:46 PM
Unknown Object (File)
Feb 26 2026, 9:03 AM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 69576
Build 66459: arc lint + arc unit

Event Timeline

bz added inline comments.
sys/dev/iwx/if_iwx.c
11133
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.Feb 11 2026, 6:05 AM
This revision was automatically updated to reflect the committed changes.