Page MenuHomeFreeBSD

rum(4): add support for hardware encryption (WEP, TKIP and CCMP)
ClosedPublic

Authored by avos on Sep 11 2015, 10:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 19, 6:34 AM
Unknown Object (File)
Mar 26 2024, 9:28 AM
Unknown Object (File)
Mar 15 2024, 4:24 AM
Unknown Object (File)
Mar 7 2024, 2:17 AM
Unknown Object (File)
Feb 26 2024, 10:02 PM
Unknown Object (File)
Feb 26 2024, 9:30 PM
Unknown Object (File)
Feb 23 2024, 11:52 PM
Unknown Object (File)
Feb 8 2024, 1:51 AM
Subscribers

Details

Summary

This diff includes:

  • Transmitter Addresses, Keys and TKIP MIC addition to the Security Key Table.
  • Proper SEC Control Registers initialization and maintenance.
  • Additional flags and values in TX descriptor, which are required for encryption support.
  • Error checking in RX path.
Test Plan

Tested on WUSB54GC, STA (WEP, TKIP, CCMP), HOSTAP (CCMP) and IBSS (CCMP, WPA-None) modes.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

avos retitled this revision from to rum(4): add support for hardware encryption (WEP, TKIP and CCMP).
avos updated this object.
avos edited the test plan for this revision. (Show Details)
avos set the repository for this revision to rS FreeBSD src repository - subversion.
avos edited edge metadata.

Use key index instead of node id + fix bitmap cleanup.

Fix build with USB_DEBUG.

hm, so I thought net80211 had a "do this deferred" but it only has taskqueues, not a callback queue for deferred things like this.

I'm okay with hand-crafted ones for now, but we should think about how to push it into the net80211 taskqueue - likely with an actual deferred callback framework there.

Ok, this looks fine. I have an 11bg rum device (RT2573) that I can test with; so once I get through the other commits I'll take a look at this one.

sys/dev/usb/wlan/if_rum.c
1269 ↗(On Diff #8852)

0 * 4? Why's that?

  • De-hardcode max number of shared keys (RT2573_SKEY_MAX).
  • Set key index for pairwise keys to 0 when h/w encryption is disabled.
avos marked an inline comment as done.Oct 2 2015, 9:08 PM
avos edited reviewers, added: adrian; removed: Contributor Reviewers (ports).
avos removed a subscriber: adrian.

Rebase.

This revision was automatically updated to reflect the committed changes.
In D3640#78035, @adrian wrote:

I'm okay with hand-crafted ones for now, but we should think about how to push it into the net80211 taskqueue - likely with an actual deferred callback framework there.

There is only one problem:
ieee80211_node_delucastkey(struct ieee80211_node *ni)
{
...

isowned = IEEE80211_NODE_IS_LOCKED(nt);
if (!isowned)
        IEEE80211_NODE_LOCK(nt);

...

status = ieee80211_crypto_delkey(ni->ni_vap, &ni->ni_ucastkey);

...

if (!isowned)
         IEEE80211_NODE_UNLOCK(nt);

After removing locks around ieee80211_crypto_delkey() any problems with iv_key_set() / iv_key_delete() LORs / sleepable calls should go away.