Lines Matching defs:crypto
436 static void memcpy_tkip(struct rt2x00lib_crypto *crypto, u8 *key, u8 key_len)
439 memcpy(crypto->key,
441 sizeof(crypto->key));
444 memcpy(crypto->tx_mic,
446 sizeof(crypto->tx_mic));
449 memcpy(crypto->rx_mic,
451 sizeof(crypto->rx_mic));
460 struct rt2x00lib_crypto *crypto,
462 struct rt2x00lib_crypto crypto;
485 memset(&crypto, 0, sizeof(crypto));
487 crypto.bssidx = rt2x00lib_get_bssidx(rt2x00dev, vif);
488 crypto.cipher = rt2x00crypto_key_to_cipher(key);
489 if (crypto.cipher == CIPHER_NONE)
491 if (crypto.cipher == CIPHER_TKIP && rt2x00_is_usb(rt2x00dev))
494 crypto.cmd = cmd;
497 crypto.address = sta->addr;
499 crypto.wcid = sta_priv->wcid;
501 crypto.address = bcast_addr;
503 if (crypto.cipher == CIPHER_TKIP)
504 memcpy_tkip(&crypto, &key->key[0], key->keylen);
506 memcpy(crypto.key, &key->key[0], key->keylen);
534 return set_key(rt2x00dev, &crypto, key);