]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
rsu: add hardware crypto support (WEP, TKIP and CCMP).
authoravos <avos@FreeBSD.org>
Tue, 6 Dec 2016 00:13:49 +0000 (00:13 +0000)
committeravos <avos@FreeBSD.org>
Tue, 6 Dec 2016 00:13:49 +0000 (00:13 +0000)
commit636a34e42657313260442e8ec67b277ec5df7dbf
tree7347452db861bb00397acd51a3b73ad91bfda058
parenta214cd24e9cf8c382fd3c29623c8297a24c3cf4f
rsu: add hardware crypto support (WEP, TKIP and CCMP).

This change includes firmware commands for key setup +
some additional checking via CAMREAD / CAMWRITE registers.
Nothing (except rsu_delete_key() for pairwise keys) is deferred;
to ensure that things are done in order rsu_set_key() will wait
until key deletion task will be finished.

Tested with Asus USB-N10 (all ciphers).

Differences from initial (reviewed) patch:
- Pause AC queues before disassociation - since CMD_DISCONNECT clears
crypto state all pending frames must be processed / dropped before it.
- Check sc_running flag before trying to set static keys.
- Clear key index from bitmap even when firmware command fails
(it will be invalidated via CAMWRITE anyway).

Reviewed by: adrian, kevlo
Tested by: kevlo
Differential Revision: https://reviews.freebsd.org/D8706
sys/dev/usb/wlan/if_rsu.c
sys/dev/usb/wlan/if_rsureg.h