Lines Matching refs:wsm_key
696 struct wsm_add_key *wsm_key = &priv->keys[idx]; in cw1200_set_key() local
719 wsm_key->type = WSM_KEY_TYPE_WEP_PAIRWISE; in cw1200_set_key()
720 memcpy(wsm_key->wep_pairwise.peer, in cw1200_set_key()
722 memcpy(wsm_key->wep_pairwise.keydata, in cw1200_set_key()
724 wsm_key->wep_pairwise.keylen = key->keylen; in cw1200_set_key()
726 wsm_key->type = WSM_KEY_TYPE_WEP_DEFAULT; in cw1200_set_key()
727 memcpy(wsm_key->wep_group.keydata, in cw1200_set_key()
729 wsm_key->wep_group.keylen = key->keylen; in cw1200_set_key()
730 wsm_key->wep_group.keyid = key->keyidx; in cw1200_set_key()
736 wsm_key->type = WSM_KEY_TYPE_TKIP_PAIRWISE; in cw1200_set_key()
737 memcpy(wsm_key->tkip_pairwise.peer, in cw1200_set_key()
739 memcpy(wsm_key->tkip_pairwise.keydata, in cw1200_set_key()
741 memcpy(wsm_key->tkip_pairwise.tx_mic_key, in cw1200_set_key()
743 memcpy(wsm_key->tkip_pairwise.rx_mic_key, in cw1200_set_key()
749 wsm_key->type = WSM_KEY_TYPE_TKIP_GROUP; in cw1200_set_key()
750 memcpy(wsm_key->tkip_group.keydata, in cw1200_set_key()
752 memcpy(wsm_key->tkip_group.rx_mic_key, in cw1200_set_key()
755 wsm_key->tkip_group.rx_seqnum[0] = seq.tkip.iv16 & 0xff; in cw1200_set_key()
756 wsm_key->tkip_group.rx_seqnum[1] = (seq.tkip.iv16 >> 8) & 0xff; in cw1200_set_key()
757 wsm_key->tkip_group.rx_seqnum[2] = seq.tkip.iv32 & 0xff; in cw1200_set_key()
758 wsm_key->tkip_group.rx_seqnum[3] = (seq.tkip.iv32 >> 8) & 0xff; in cw1200_set_key()
759 wsm_key->tkip_group.rx_seqnum[4] = (seq.tkip.iv32 >> 16) & 0xff; in cw1200_set_key()
760 wsm_key->tkip_group.rx_seqnum[5] = (seq.tkip.iv32 >> 24) & 0xff; in cw1200_set_key()
761 wsm_key->tkip_group.rx_seqnum[6] = 0; in cw1200_set_key()
762 wsm_key->tkip_group.rx_seqnum[7] = 0; in cw1200_set_key()
764 wsm_key->tkip_group.keyid = key->keyidx; in cw1200_set_key()
770 wsm_key->type = WSM_KEY_TYPE_AES_PAIRWISE; in cw1200_set_key()
771 memcpy(wsm_key->aes_pairwise.peer, in cw1200_set_key()
773 memcpy(wsm_key->aes_pairwise.keydata, in cw1200_set_key()
776 wsm_key->type = WSM_KEY_TYPE_AES_GROUP; in cw1200_set_key()
777 memcpy(wsm_key->aes_group.keydata, in cw1200_set_key()
780 wsm_key->aes_group.rx_seqnum[0] = seq.ccmp.pn[5]; in cw1200_set_key()
781 wsm_key->aes_group.rx_seqnum[1] = seq.ccmp.pn[4]; in cw1200_set_key()
782 wsm_key->aes_group.rx_seqnum[2] = seq.ccmp.pn[3]; in cw1200_set_key()
783 wsm_key->aes_group.rx_seqnum[3] = seq.ccmp.pn[2]; in cw1200_set_key()
784 wsm_key->aes_group.rx_seqnum[4] = seq.ccmp.pn[1]; in cw1200_set_key()
785 wsm_key->aes_group.rx_seqnum[5] = seq.ccmp.pn[0]; in cw1200_set_key()
786 wsm_key->aes_group.rx_seqnum[6] = 0; in cw1200_set_key()
787 wsm_key->aes_group.rx_seqnum[7] = 0; in cw1200_set_key()
788 wsm_key->aes_group.keyid = key->keyidx; in cw1200_set_key()
793 wsm_key->type = WSM_KEY_TYPE_WAPI_PAIRWISE; in cw1200_set_key()
794 memcpy(wsm_key->wapi_pairwise.peer, in cw1200_set_key()
796 memcpy(wsm_key->wapi_pairwise.keydata, in cw1200_set_key()
798 memcpy(wsm_key->wapi_pairwise.mic_key, in cw1200_set_key()
800 wsm_key->wapi_pairwise.keyid = key->keyidx; in cw1200_set_key()
802 wsm_key->type = WSM_KEY_TYPE_WAPI_GROUP; in cw1200_set_key()
803 memcpy(wsm_key->wapi_group.keydata, in cw1200_set_key()
805 memcpy(wsm_key->wapi_group.mic_key, in cw1200_set_key()
807 wsm_key->wapi_group.keyid = key->keyidx; in cw1200_set_key()
816 ret = wsm_add_key(priv, wsm_key); in cw1200_set_key()
822 struct wsm_remove_key wsm_key = { in cw1200_set_key() local
826 if (wsm_key.index > WSM_KEY_MAX_INDEX) { in cw1200_set_key()
831 cw1200_free_key(priv, wsm_key.index); in cw1200_set_key()
832 ret = wsm_remove_key(priv, &wsm_key); in cw1200_set_key()