Lines Matching refs:wsm_key
695 struct wsm_add_key *wsm_key = &priv->keys[idx]; in cw1200_set_key() local
718 wsm_key->type = WSM_KEY_TYPE_WEP_PAIRWISE; in cw1200_set_key()
719 memcpy(wsm_key->wep_pairwise.peer, in cw1200_set_key()
721 memcpy(wsm_key->wep_pairwise.keydata, in cw1200_set_key()
723 wsm_key->wep_pairwise.keylen = key->keylen; in cw1200_set_key()
725 wsm_key->type = WSM_KEY_TYPE_WEP_DEFAULT; in cw1200_set_key()
726 memcpy(wsm_key->wep_group.keydata, in cw1200_set_key()
728 wsm_key->wep_group.keylen = key->keylen; in cw1200_set_key()
729 wsm_key->wep_group.keyid = key->keyidx; in cw1200_set_key()
735 wsm_key->type = WSM_KEY_TYPE_TKIP_PAIRWISE; in cw1200_set_key()
736 memcpy(wsm_key->tkip_pairwise.peer, in cw1200_set_key()
738 memcpy(wsm_key->tkip_pairwise.keydata, in cw1200_set_key()
740 memcpy(wsm_key->tkip_pairwise.tx_mic_key, in cw1200_set_key()
742 memcpy(wsm_key->tkip_pairwise.rx_mic_key, in cw1200_set_key()
748 wsm_key->type = WSM_KEY_TYPE_TKIP_GROUP; in cw1200_set_key()
749 memcpy(wsm_key->tkip_group.keydata, in cw1200_set_key()
751 memcpy(wsm_key->tkip_group.rx_mic_key, in cw1200_set_key()
754 wsm_key->tkip_group.rx_seqnum[0] = seq.tkip.iv16 & 0xff; in cw1200_set_key()
755 wsm_key->tkip_group.rx_seqnum[1] = (seq.tkip.iv16 >> 8) & 0xff; in cw1200_set_key()
756 wsm_key->tkip_group.rx_seqnum[2] = seq.tkip.iv32 & 0xff; in cw1200_set_key()
757 wsm_key->tkip_group.rx_seqnum[3] = (seq.tkip.iv32 >> 8) & 0xff; in cw1200_set_key()
758 wsm_key->tkip_group.rx_seqnum[4] = (seq.tkip.iv32 >> 16) & 0xff; in cw1200_set_key()
759 wsm_key->tkip_group.rx_seqnum[5] = (seq.tkip.iv32 >> 24) & 0xff; in cw1200_set_key()
760 wsm_key->tkip_group.rx_seqnum[6] = 0; in cw1200_set_key()
761 wsm_key->tkip_group.rx_seqnum[7] = 0; in cw1200_set_key()
763 wsm_key->tkip_group.keyid = key->keyidx; in cw1200_set_key()
769 wsm_key->type = WSM_KEY_TYPE_AES_PAIRWISE; in cw1200_set_key()
770 memcpy(wsm_key->aes_pairwise.peer, in cw1200_set_key()
772 memcpy(wsm_key->aes_pairwise.keydata, in cw1200_set_key()
775 wsm_key->type = WSM_KEY_TYPE_AES_GROUP; in cw1200_set_key()
776 memcpy(wsm_key->aes_group.keydata, in cw1200_set_key()
779 wsm_key->aes_group.rx_seqnum[0] = seq.ccmp.pn[5]; in cw1200_set_key()
780 wsm_key->aes_group.rx_seqnum[1] = seq.ccmp.pn[4]; in cw1200_set_key()
781 wsm_key->aes_group.rx_seqnum[2] = seq.ccmp.pn[3]; in cw1200_set_key()
782 wsm_key->aes_group.rx_seqnum[3] = seq.ccmp.pn[2]; in cw1200_set_key()
783 wsm_key->aes_group.rx_seqnum[4] = seq.ccmp.pn[1]; in cw1200_set_key()
784 wsm_key->aes_group.rx_seqnum[5] = seq.ccmp.pn[0]; in cw1200_set_key()
785 wsm_key->aes_group.rx_seqnum[6] = 0; in cw1200_set_key()
786 wsm_key->aes_group.rx_seqnum[7] = 0; in cw1200_set_key()
787 wsm_key->aes_group.keyid = key->keyidx; in cw1200_set_key()
792 wsm_key->type = WSM_KEY_TYPE_WAPI_PAIRWISE; in cw1200_set_key()
793 memcpy(wsm_key->wapi_pairwise.peer, in cw1200_set_key()
795 memcpy(wsm_key->wapi_pairwise.keydata, in cw1200_set_key()
797 memcpy(wsm_key->wapi_pairwise.mic_key, in cw1200_set_key()
799 wsm_key->wapi_pairwise.keyid = key->keyidx; in cw1200_set_key()
801 wsm_key->type = WSM_KEY_TYPE_WAPI_GROUP; in cw1200_set_key()
802 memcpy(wsm_key->wapi_group.keydata, in cw1200_set_key()
804 memcpy(wsm_key->wapi_group.mic_key, in cw1200_set_key()
806 wsm_key->wapi_group.keyid = key->keyidx; in cw1200_set_key()
815 ret = wsm_add_key(priv, wsm_key); in cw1200_set_key()
821 struct wsm_remove_key wsm_key = { in cw1200_set_key() local
825 if (wsm_key.index > WSM_KEY_MAX_INDEX) { in cw1200_set_key()
830 cw1200_free_key(priv, wsm_key.index); in cw1200_set_key()
831 ret = wsm_remove_key(priv, &wsm_key); in cw1200_set_key()