Lines Matching defs:crypto
437 static void memcpy_tkip(struct rt2x00lib_crypto *crypto, u8 *key, u8 key_len)
440 memcpy(crypto->key,
442 sizeof(crypto->key));
445 memcpy(crypto->tx_mic,
447 sizeof(crypto->tx_mic));
450 memcpy(crypto->rx_mic,
452 sizeof(crypto->rx_mic));
461 struct rt2x00lib_crypto *crypto,
463 struct rt2x00lib_crypto crypto;
486 memset(&crypto, 0, sizeof(crypto));
488 crypto.bssidx = rt2x00lib_get_bssidx(rt2x00dev, vif);
489 crypto.cipher = rt2x00crypto_key_to_cipher(key);
490 if (crypto.cipher == CIPHER_NONE)
492 if (crypto.cipher == CIPHER_TKIP && rt2x00_is_usb(rt2x00dev))
495 crypto.cmd = cmd;
498 crypto.address = sta->addr;
500 crypto.wcid = sta_priv->wcid;
502 crypto.address = bcast_addr;
504 if (crypto.cipher == CIPHER_TKIP)
505 memcpy_tkip(&crypto, &key->key[0], key->keylen);
507 memcpy(crypto.key, &key->key[0], key->keylen);
535 return set_key(rt2x00dev, &crypto, key);