• 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/rtl8187se/ieee80211/

Lines Matching refs:tkey

308         struct ieee80211_tkip_data *tkey = priv;
309 struct blkcipher_desc desc = {.tfm = tkey->tx_tfm_arc4};
325 if (!tkey->tx_phase1_done) {
326 tkip_mixing_phase1(tkey->tx_ttak, tkey->key, hdr->addr2,
327 tkey->tx_iv32);
328 tkey->tx_phase1_done = 1;
330 tkip_mixing_phase2(rc4key, tkey->key, tkey->tx_ttak, tkey->tx_iv16);
340 *pos++ = (tkey->key_idx << 6) | (1 << 5) /* Ext IV included */;
341 *pos++ = tkey->tx_iv32 & 0xff;
342 *pos++ = (tkey->tx_iv32 >> 8) & 0xff;
343 *pos++ = (tkey->tx_iv32 >> 16) & 0xff;
344 *pos++ = (tkey->tx_iv32 >> 24) & 0xff;
352 crypto_blkcipher_setkey(tkey->tx_tfm_arc4, rc4key, 16);
356 tkey->tx_iv16++;
357 if (tkey->tx_iv16 == 0) {
358 tkey->tx_phase1_done = 0;
359 tkey->tx_iv32++;
366 struct ieee80211_tkip_data *tkey = priv;
367 struct blkcipher_desc desc = { .tfm = tkey->rx_tfm_arc4 };
392 if (tkey->key_idx != keyidx) {
393 printk(KERN_DEBUG "TKIP: RX tkey->key_idx=%d frame "
394 "keyidx=%d priv=%p\n", tkey->key_idx, keyidx, priv);
397 if (!tkey->key_set) {
409 if (iv32 < tkey->rx_iv32 ||
410 (iv32 == tkey->rx_iv32 && iv16 <= tkey->rx_iv16)) {
415 tkey->rx_iv32, tkey->rx_iv16, iv32, iv16);
417 tkey->dot11RSNAStatsTKIPReplays++;
421 if (iv32 != tkey->rx_iv32 || !tkey->rx_phase1_done) {
422 tkip_mixing_phase1(tkey->rx_ttak, tkey->key, hdr->addr2, iv32);
423 tkey->rx_phase1_done = 1;
425 tkip_mixing_phase2(rc4key, tkey->key, tkey->rx_ttak, iv16);
428 crypto_blkcipher_setkey(tkey->rx_tfm_arc4, rc4key, 16);
445 if (iv32 != tkey->rx_iv32) {
448 tkey->rx_phase1_done = 0;
454 tkey->dot11RSNAStatsTKIPICVErrors++;
460 tkey->rx_iv32_new = iv32;
461 tkey->rx_iv16_new = iv16;
527 struct ieee80211_tkip_data *tkey = priv;
540 michael_mic_hdr(skb, tkey->tx_hdr);
545 tkey->tx_hdr[12] = *(skb->data + hdr_len - 2) & 0x07;
550 if (michael_mic(tkey->tx_tfm_michael, &tkey->key[16], tkey->tx_hdr,
581 struct ieee80211_tkip_data *tkey = priv;
587 if (!tkey->key_set)
590 michael_mic_hdr(skb, tkey->rx_hdr);
594 tkey->rx_hdr[12] = *(skb->data + hdr_len - 2) & 0x07;
598 if (michael_mic(tkey->rx_tfm_michael, &tkey->key[24], tkey->rx_hdr,
611 tkey->dot11RSNAStatsTKIPLocalMICFailures++;
617 tkey->rx_iv32 = tkey->rx_iv32_new;
618 tkey->rx_iv16 = tkey->rx_iv16_new;
628 struct ieee80211_tkip_data *tkey = priv;
630 struct crypto_hash *tfm = tkey->tx_tfm_michael;
631 struct crypto_blkcipher *tfm2 = tkey->tx_tfm_arc4;
632 struct crypto_hash *tfm3 = tkey->rx_tfm_michael;
633 struct crypto_blkcipher *tfm4 = tkey->rx_tfm_arc4;
635 keyidx = tkey->key_idx;
636 memset(tkey, 0, sizeof(*tkey));
637 tkey->key_idx = keyidx;
639 tkey->tx_tfm_michael = tfm;
640 tkey->tx_tfm_arc4 = tfm2;
641 tkey->rx_tfm_michael = tfm3;
642 tkey->rx_tfm_arc4 = tfm4;
645 memcpy(tkey->key, key, TKIP_KEY_LEN);
646 tkey->key_set = 1;
647 tkey->tx_iv16 = 1; /* TSC is initialized to 1 */
649 tkey->rx_iv32 = (seq[5] << 24) | (seq[4] << 16) |
651 tkey->rx_iv16 = (seq[1] << 8) | seq[0];
654 tkey->key_set = 0;
664 struct ieee80211_tkip_data *tkey = priv;
669 if (!tkey->key_set)
671 memcpy(key, tkey->key, TKIP_KEY_LEN);
675 u16 iv16 = tkey->tx_iv16;
676 u32 iv32 = tkey->tx_iv32;
680 seq[0] = tkey->tx_iv16;
681 seq[1] = tkey->tx_iv16 >> 8;
682 seq[2] = tkey->tx_iv32;
683 seq[3] = tkey->tx_iv32 >> 8;
684 seq[4] = tkey->tx_iv32 >> 16;
685 seq[5] = tkey->tx_iv32 >> 24;