• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/drivers/staging/rtl8192e/ieee80211/

Lines Matching refs:tkey

309 	struct ieee80211_tkip_data *tkey = priv;
315 struct blkcipher_desc desc = {.tfm = tkey->tx_tfm_arc4};
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);
338 tkey->tx_phase1_done = 1;
348 *pos++ = Hi8(tkey->tx_iv16);
349 *pos++ = (Hi8(tkey->tx_iv16) | 0x20) & 0x7F;
350 *pos++ = Lo8(tkey->tx_iv16);
359 *pos++ = (tkey->key_idx << 6) | (1 << 5) /* Ext IV included */;
360 *pos++ = tkey->tx_iv32 & 0xff;
361 *pos++ = (tkey->tx_iv32 >> 8) & 0xff;
362 *pos++ = (tkey->tx_iv32 >> 16) & 0xff;
363 *pos++ = (tkey->tx_iv32 >> 24) & 0xff;
373 crypto_blkcipher_setkey(tkey->tx_tfm_arc4, rc4key, 16);
379 tkey->tx_iv16++;
380 if (tkey->tx_iv16 == 0) {
381 tkey->tx_phase1_done = 0;
382 tkey->tx_iv32++;
395 struct ieee80211_tkip_data *tkey = priv;
401 struct blkcipher_desc desc = {.tfm = tkey->rx_tfm_arc4};
421 if (tkey->key_idx != keyidx) {
422 printk(KERN_DEBUG "TKIP: RX tkey->key_idx=%d frame "
423 "keyidx=%d priv=%p\n", tkey->key_idx, keyidx, priv);
426 if (!tkey->key_set) {
440 if (iv32 < tkey->rx_iv32 ||
441 (iv32 == tkey->rx_iv32 && iv16 <= tkey->rx_iv16)) {
446 tkey->rx_iv32, tkey->rx_iv16, iv32, iv16);
448 tkey->dot11RSNAStatsTKIPReplays++;
452 if (iv32 != tkey->rx_iv32 || !tkey->rx_phase1_done) {
453 tkip_mixing_phase1(tkey->rx_ttak, tkey->key, hdr->addr2, iv32);
454 tkey->rx_phase1_done = 1;
456 tkip_mixing_phase2(rc4key, tkey->key, tkey->rx_ttak, iv16);
460 crypto_blkcipher_setkey(tkey->rx_tfm_arc4, rc4key, 16);
478 if (iv32 != tkey->rx_iv32) {
481 tkey->rx_phase1_done = 0;
488 tkey->dot11RSNAStatsTKIPICVErrors++;
496 tkey->rx_iv32_new = iv32;
497 tkey->rx_iv16_new = iv16;
577 struct ieee80211_tkip_data *tkey = priv;
590 michael_mic_hdr(skb, tkey->tx_hdr);
595 tkey->tx_hdr[12] = *(skb->data + hdr_len - 2) & 0x07;
599 if (michael_mic(tkey->tx_tfm_michael, &tkey->key[16], tkey->tx_hdr,
655 struct ieee80211_tkip_data *tkey = priv;
661 if (!tkey->key_set)
664 michael_mic_hdr(skb, tkey->rx_hdr);
668 tkey->rx_hdr[12] = *(skb->data + hdr_len - 2) & 0x07;
672 if (michael_mic(tkey->rx_tfm_michael, &tkey->key[24], tkey->rx_hdr,
684 tkey->dot11RSNAStatsTKIPLocalMICFailures++;
690 tkey->rx_iv32 = tkey->rx_iv32_new;
691 tkey->rx_iv16 = tkey->rx_iv16_new;
701 struct ieee80211_tkip_data *tkey = priv;
703 struct crypto_hash *tfm = tkey->tx_tfm_michael;
704 struct crypto_blkcipher *tfm2 = tkey->tx_tfm_arc4;
705 struct crypto_hash *tfm3 = tkey->rx_tfm_michael;
706 struct crypto_blkcipher *tfm4 = tkey->rx_tfm_arc4;
708 keyidx = tkey->key_idx;
709 memset(tkey, 0, sizeof(*tkey));
710 tkey->key_idx = keyidx;
711 tkey->tx_tfm_michael = tfm;
712 tkey->tx_tfm_arc4 = tfm2;
713 tkey->rx_tfm_michael = tfm3;
714 tkey->rx_tfm_arc4 = tfm4;
717 memcpy(tkey->key, key, TKIP_KEY_LEN);
718 tkey->key_set = 1;
719 tkey->tx_iv16 = 1; /* TSC is initialized to 1 */
721 tkey->rx_iv32 = (seq[5] << 24) | (seq[4] << 16) |
723 tkey->rx_iv16 = (seq[1] << 8) | seq[0];
726 tkey->key_set = 0;
736 struct ieee80211_tkip_data *tkey = priv;
741 if (!tkey->key_set)
743 memcpy(key, tkey->key, TKIP_KEY_LEN);
747 u16 iv16 = tkey->tx_iv16;
748 u32 iv32 = tkey->tx_iv32;
752 seq[0] = tkey->tx_iv16;
753 seq[1] = tkey->tx_iv16 >> 8;
754 seq[2] = tkey->tx_iv32;
755 seq[3] = tkey->tx_iv32 >> 8;
756 seq[4] = tkey->tx_iv32 >> 16;
757 seq[5] = tkey->tx_iv32 >> 24;