• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/staging/rtl8192su/ieee80211/

Lines Matching defs:tkey

308 	struct ieee80211_tkip_data *tkey = priv;
313 struct blkcipher_desc desc = { .tfm = tkey->tx_tfm_arc4 };
327 if (!tkey->tx_phase1_done) {
328 tkip_mixing_phase1(tkey->tx_ttak, tkey->key, hdr->addr2,
329 tkey->tx_iv32);
330 tkey->tx_phase1_done = 1;
332 tkip_mixing_phase2(rc4key, tkey->key, tkey->tx_ttak, tkey->tx_iv16);
335 tkey->tx_phase1_done = 1;
345 *pos++ = Hi8(tkey->tx_iv16);
346 *pos++ = (Hi8(tkey->tx_iv16) | 0x20) & 0x7F;
347 *pos++ = Lo8(tkey->tx_iv16);
356 *pos++ = (tkey->key_idx << 6) | (1 << 5) /* Ext IV included */;
357 *pos++ = tkey->tx_iv32 & 0xff;
358 *pos++ = (tkey->tx_iv32 >> 8) & 0xff;
359 *pos++ = (tkey->tx_iv32 >> 16) & 0xff;
360 *pos++ = (tkey->tx_iv32 >> 24) & 0xff;
370 crypto_blkcipher_setkey(tkey->tx_tfm_arc4, rc4key, 16);
375 tkey->tx_iv16++;
376 if (tkey->tx_iv16 == 0) {
377 tkey->tx_phase1_done = 0;
378 tkey->tx_iv32++;
391 struct ieee80211_tkip_data *tkey = priv;
397 struct blkcipher_desc desc = { .tfm = tkey->rx_tfm_arc4 };
417 if (tkey->key_idx != keyidx) {
418 printk(KERN_DEBUG "TKIP: RX tkey->key_idx=%d frame "
419 "keyidx=%d priv=%p\n", tkey->key_idx, keyidx, priv);
422 if (!tkey->key_set) {
436 if ((iv32 < tkey->rx_iv32 ||
437 (iv32 == tkey->rx_iv32 && iv16 <= tkey->rx_iv16))&&tkey->initialized) {
442 tkey->rx_iv32, tkey->rx_iv16, iv32, iv16);
444 tkey->dot11RSNAStatsTKIPReplays++;
447 tkey->initialized = true;
449 if (iv32 != tkey->rx_iv32 || !tkey->rx_phase1_done) {
450 tkip_mixing_phase1(tkey->rx_ttak, tkey->key, hdr->addr2, iv32);
451 tkey->rx_phase1_done = 1;
453 tkip_mixing_phase2(rc4key, tkey->key, tkey->rx_ttak, iv16);
457 crypto_blkcipher_setkey(tkey->rx_tfm_arc4, rc4key, 16);
474 if (iv32 != tkey->rx_iv32) {
477 tkey->rx_phase1_done = 0;
483 tkey->dot11RSNAStatsTKIPICVErrors++;
491 tkey->rx_iv32_new = iv32;
492 tkey->rx_iv16_new = iv16;
558 struct ieee80211_tkip_data *tkey = priv;
571 michael_mic_hdr(skb, tkey->tx_hdr);
574 tkey->tx_hdr[12] = *(skb->data + hdr_len - 2) & 0x07;
578 if (michael_mic(tkey->tx_tfm_michael, &tkey->key[16], tkey->tx_hdr,
609 struct ieee80211_tkip_data *tkey = priv;
615 if (!tkey->key_set)
618 michael_mic_hdr(skb, tkey->rx_hdr);
620 tkey->rx_hdr[12] = *(skb->data + hdr_len - 2) & 0x07;
623 if (michael_mic(tkey->rx_tfm_michael, &tkey->key[24], tkey->rx_hdr,
639 tkey->dot11RSNAStatsTKIPLocalMICFailures++;
646 tkey->rx_iv32 = tkey->rx_iv32_new;
647 tkey->rx_iv16 = tkey->rx_iv16_new;
657 struct ieee80211_tkip_data *tkey = priv;
659 struct crypto_hash *tfm = tkey->tx_tfm_michael;
660 struct crypto_blkcipher *tfm2 = tkey->tx_tfm_arc4;
661 struct crypto_hash *tfm3 = tkey->rx_tfm_michael;
662 struct crypto_blkcipher *tfm4 = tkey->rx_tfm_arc4;
664 keyidx = tkey->key_idx;
665 memset(tkey, 0, sizeof(*tkey));
666 tkey->key_idx = keyidx;
667 tkey->tx_tfm_michael = tfm;
668 tkey->tx_tfm_arc4 = tfm2;
669 tkey->rx_tfm_michael = tfm3;
670 tkey->rx_tfm_arc4 = tfm4;
673 memcpy(tkey->key, key, TKIP_KEY_LEN);
674 tkey->key_set = 1;
675 tkey->tx_iv16 = 1; /* TSC is initialized to 1 */
677 tkey->rx_iv32 = (seq[5] << 24) | (seq[4] << 16) |
679 tkey->rx_iv16 = (seq[1] << 8) | seq[0];
682 tkey->key_set = 0;
692 struct ieee80211_tkip_data *tkey = priv;
697 if (!tkey->key_set)
699 memcpy(key, tkey->key, TKIP_KEY_LEN);
703 u16 iv16 = tkey->tx_iv16;
704 u32 iv32 = tkey->tx_iv32;
708 seq[0] = tkey->tx_iv16;
709 seq[1] = tkey->tx_iv16 >> 8;
710 seq[2] = tkey->tx_iv32;
711 seq[3] = tkey->tx_iv32 >> 8;
712 seq[4] = tkey->tx_iv32 >> 16;
713 seq[5] = tkey->tx_iv32 >> 24;