31847d9434
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