• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/net/wireless/

Lines Matching defs:tkey

318 	struct lib80211_tkip_data *tkey = priv;
330 if (!tkey->tx_phase1_done) {
331 tkip_mixing_phase1(tkey->tx_ttak, tkey->key, hdr->addr2,
332 tkey->tx_iv32);
333 tkey->tx_phase1_done = 1;
335 tkip_mixing_phase2(rc4key, tkey->key, tkey->tx_ttak, tkey->tx_iv16);
344 *pos++ = (tkey->key_idx << 6) | (1 << 5) /* Ext IV included */ ;
345 *pos++ = tkey->tx_iv32 & 0xff;
346 *pos++ = (tkey->tx_iv32 >> 8) & 0xff;
347 *pos++ = (tkey->tx_iv32 >> 16) & 0xff;
348 *pos++ = (tkey->tx_iv32 >> 24) & 0xff;
350 tkey->tx_iv16++;
351 if (tkey->tx_iv16 == 0) {
352 tkey->tx_phase1_done = 0;
353 tkey->tx_iv32++;
361 struct lib80211_tkip_data *tkey = priv;
362 struct blkcipher_desc desc = { .tfm = tkey->tx_tfm_arc4 };
368 if (tkey->flags & IEEE80211_CRYPTO_TKIP_COUNTERMEASURES) {
394 crypto_blkcipher_setkey(tkey->tx_tfm_arc4, rc4key, 16);
414 struct lib80211_tkip_data *tkey = priv;
415 struct blkcipher_desc desc = { .tfm = tkey->rx_tfm_arc4 };
428 if (tkey->flags & IEEE80211_CRYPTO_TKIP_COUNTERMEASURES) {
449 if (tkey->key_idx != keyidx) {
450 printk(KERN_DEBUG "TKIP: RX tkey->key_idx=%d frame "
451 "keyidx=%d priv=%p\n", tkey->key_idx, keyidx, priv);
454 if (!tkey->key_set) {
466 if (tkip_replay_check(iv32, iv16, tkey->rx_iv32, tkey->rx_iv16)) {
472 tkey->rx_iv32, tkey->rx_iv16, iv32, iv16);
475 tkey->dot11RSNAStatsTKIPReplays++;
479 if (iv32 != tkey->rx_iv32 || !tkey->rx_phase1_done) {
480 tkip_mixing_phase1(tkey->rx_ttak, tkey->key, hdr->addr2, iv32);
481 tkey->rx_phase1_done = 1;
483 tkip_mixing_phase2(rc4key, tkey->key, tkey->rx_ttak, iv16);
487 crypto_blkcipher_setkey(tkey->rx_tfm_arc4, rc4key, 16);
504 if (iv32 != tkey->rx_iv32) {
507 tkey->rx_phase1_done = 0;
515 tkey->dot11RSNAStatsTKIPICVErrors++;
521 tkey->rx_iv32_new = iv32;
522 tkey->rx_iv16_new = iv16;
592 struct lib80211_tkip_data *tkey = priv;
602 michael_mic_hdr(skb, tkey->tx_hdr);
604 if (michael_mic(tkey->tx_tfm_michael, &tkey->key[16], tkey->tx_hdr,
635 struct lib80211_tkip_data *tkey = priv;
638 if (!tkey->key_set)
641 michael_mic_hdr(skb, tkey->rx_hdr);
642 if (michael_mic(tkey->rx_tfm_michael, &tkey->key[24], tkey->rx_hdr,
654 tkey->dot11RSNAStatsTKIPLocalMICFailures++;
660 tkey->rx_iv32 = tkey->rx_iv32_new;
661 tkey->rx_iv16 = tkey->rx_iv16_new;
670 struct lib80211_tkip_data *tkey = priv;
672 struct crypto_hash *tfm = tkey->tx_tfm_michael;
673 struct crypto_blkcipher *tfm2 = tkey->tx_tfm_arc4;
674 struct crypto_hash *tfm3 = tkey->rx_tfm_michael;
675 struct crypto_blkcipher *tfm4 = tkey->rx_tfm_arc4;
677 keyidx = tkey->key_idx;
678 memset(tkey, 0, sizeof(*tkey));
679 tkey->key_idx = keyidx;
680 tkey->tx_tfm_michael = tfm;
681 tkey->tx_tfm_arc4 = tfm2;
682 tkey->rx_tfm_michael = tfm3;
683 tkey->rx_tfm_arc4 = tfm4;
685 memcpy(tkey->key, key, TKIP_KEY_LEN);
686 tkey->key_set = 1;
687 tkey->tx_iv16 = 1; /* TSC is initialized to 1 */
689 tkey->rx_iv32 = (seq[5] << 24) | (seq[4] << 16) |
691 tkey->rx_iv16 = (seq[1] << 8) | seq[0];
694 tkey->key_set = 0;
703 struct lib80211_tkip_data *tkey = priv;
708 if (!tkey->key_set)
710 memcpy(key, tkey->key, TKIP_KEY_LEN);
714 u16 iv16 = tkey->tx_iv16;
715 u32 iv32 = tkey->tx_iv32;
719 seq[0] = tkey->tx_iv16;
720 seq[1] = tkey->tx_iv16 >> 8;
721 seq[2] = tkey->tx_iv32;
722 seq[3] = tkey->tx_iv32 >> 8;
723 seq[4] = tkey->tx_iv32 >> 16;
724 seq[5] = tkey->tx_iv32 >> 24;