Loading net/mac80211/Kconfig +1 −1 Original line number Original line Diff line number Diff line Loading @@ -150,7 +150,7 @@ config MAC80211_LOWTX_FRAME_DUMP If unsure, say N and insert the debugging code If unsure, say N and insert the debugging code you require into the driver you are debugging. you require into the driver you are debugging. config TKIP_DEBUG config MAC80211_TKIP_DEBUG bool "TKIP debugging" bool "TKIP debugging" depends on MAC80211_DEBUG depends on MAC80211_DEBUG Loading net/mac80211/tkip.c +10 −10 Original line number Original line Diff line number Diff line Loading @@ -167,7 +167,7 @@ void ieee80211_get_tkip_key(struct ieee80211_key_conf *keyconf, tk = &key->conf.key[ALG_TKIP_TEMP_ENCR_KEY]; tk = &key->conf.key[ALG_TKIP_TEMP_ENCR_KEY]; ctx = &key->u.tkip.tx; ctx = &key->u.tkip.tx; #ifdef CONFIG_TKIP_DEBUG #ifdef CONFIG_MAC80211_TKIP_DEBUG printk(KERN_DEBUG "TKIP encrypt: iv16 = 0x%04x, iv32 = 0x%08x\n", printk(KERN_DEBUG "TKIP encrypt: iv16 = 0x%04x, iv32 = 0x%08x\n", iv16, iv32); iv16, iv32); Loading @@ -177,7 +177,7 @@ void ieee80211_get_tkip_key(struct ieee80211_key_conf *keyconf, printk(KERN_DEBUG "Wrap around of iv16 in the middle of a " printk(KERN_DEBUG "Wrap around of iv16 in the middle of a " "fragmented packet\n"); "fragmented packet\n"); } } #endif /* CONFIG_TKIP_DEBUG */ #endif /* Update the p1k only when the iv16 in the packet wraps around, this /* Update the p1k only when the iv16 in the packet wraps around, this * might occur after the wrap around of iv16 in the key in case of * might occur after the wrap around of iv16 in the key in case of Loading Loading @@ -240,7 +240,7 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm, keyid = pos[3]; keyid = pos[3]; iv32 = get_unaligned_le32(pos + 4); iv32 = get_unaligned_le32(pos + 4); pos += 8; pos += 8; #ifdef CONFIG_TKIP_DEBUG #ifdef CONFIG_MAC80211_TKIP_DEBUG { { int i; int i; printk(KERN_DEBUG "TKIP decrypt: data(len=%zd)", payload_len); printk(KERN_DEBUG "TKIP decrypt: data(len=%zd)", payload_len); Loading @@ -250,7 +250,7 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm, printk(KERN_DEBUG "TKIP decrypt: iv16=%04x iv32=%08x\n", printk(KERN_DEBUG "TKIP decrypt: iv16=%04x iv32=%08x\n", iv16, iv32); iv16, iv32); } } #endif /* CONFIG_TKIP_DEBUG */ #endif if (!(keyid & (1 << 5))) if (!(keyid & (1 << 5))) return TKIP_DECRYPT_NO_EXT_IV; return TKIP_DECRYPT_NO_EXT_IV; Loading @@ -262,14 +262,14 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm, (iv32 < key->u.tkip.rx[queue].iv32 || (iv32 < key->u.tkip.rx[queue].iv32 || (iv32 == key->u.tkip.rx[queue].iv32 && (iv32 == key->u.tkip.rx[queue].iv32 && iv16 <= key->u.tkip.rx[queue].iv16))) { iv16 <= key->u.tkip.rx[queue].iv16))) { #ifdef CONFIG_TKIP_DEBUG #ifdef CONFIG_MAC80211_TKIP_DEBUG DECLARE_MAC_BUF(mac); DECLARE_MAC_BUF(mac); printk(KERN_DEBUG "TKIP replay detected for RX frame from " printk(KERN_DEBUG "TKIP replay detected for RX frame from " "%s (RX IV (%04x,%02x) <= prev. IV (%04x,%02x)\n", "%s (RX IV (%04x,%02x) <= prev. IV (%04x,%02x)\n", print_mac(mac, ta), print_mac(mac, ta), iv32, iv16, key->u.tkip.rx[queue].iv32, iv32, iv16, key->u.tkip.rx[queue].iv32, key->u.tkip.rx[queue].iv16); key->u.tkip.rx[queue].iv16); #endif /* CONFIG_TKIP_DEBUG */ #endif return TKIP_DECRYPT_REPLAY; return TKIP_DECRYPT_REPLAY; } } Loading @@ -283,7 +283,7 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm, key->u.tkip.rx[queue].iv32 != iv32) { key->u.tkip.rx[queue].iv32 != iv32) { /* IV16 wrapped around - perform TKIP phase 1 */ /* IV16 wrapped around - perform TKIP phase 1 */ tkip_mixing_phase1(tk, &key->u.tkip.rx[queue], ta, iv32); tkip_mixing_phase1(tk, &key->u.tkip.rx[queue], ta, iv32); #ifdef CONFIG_TKIP_DEBUG #ifdef CONFIG_MAC80211_TKIP_DEBUG { { int i; int i; DECLARE_MAC_BUF(mac); DECLARE_MAC_BUF(mac); Loading @@ -299,7 +299,7 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm, printk("%04x ", key->u.tkip.rx[queue].p1k[i]); printk("%04x ", key->u.tkip.rx[queue].p1k[i]); printk("\n"); printk("\n"); } } #endif /* CONFIG_TKIP_DEBUG */ #endif if (key->local->ops->update_tkip_key && if (key->local->ops->update_tkip_key && key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) { key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) { u8 bcast[ETH_ALEN] = u8 bcast[ETH_ALEN] = Loading @@ -316,7 +316,7 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm, } } tkip_mixing_phase2(tk, &key->u.tkip.rx[queue], iv16, rc4key); tkip_mixing_phase2(tk, &key->u.tkip.rx[queue], iv16, rc4key); #ifdef CONFIG_TKIP_DEBUG #ifdef CONFIG_MAC80211_TKIP_DEBUG { { int i; int i; printk(KERN_DEBUG "TKIP decrypt: Phase2 rc4key="); printk(KERN_DEBUG "TKIP decrypt: Phase2 rc4key="); Loading @@ -324,7 +324,7 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm, printk("%02x ", rc4key[i]); printk("%02x ", rc4key[i]); printk("\n"); printk("\n"); } } #endif /* CONFIG_TKIP_DEBUG */ #endif res = ieee80211_wep_decrypt_data(tfm, rc4key, 16, pos, payload_len - 12); res = ieee80211_wep_decrypt_data(tfm, rc4key, 16, pos, payload_len - 12); done: done: Loading Loading
net/mac80211/Kconfig +1 −1 Original line number Original line Diff line number Diff line Loading @@ -150,7 +150,7 @@ config MAC80211_LOWTX_FRAME_DUMP If unsure, say N and insert the debugging code If unsure, say N and insert the debugging code you require into the driver you are debugging. you require into the driver you are debugging. config TKIP_DEBUG config MAC80211_TKIP_DEBUG bool "TKIP debugging" bool "TKIP debugging" depends on MAC80211_DEBUG depends on MAC80211_DEBUG Loading
net/mac80211/tkip.c +10 −10 Original line number Original line Diff line number Diff line Loading @@ -167,7 +167,7 @@ void ieee80211_get_tkip_key(struct ieee80211_key_conf *keyconf, tk = &key->conf.key[ALG_TKIP_TEMP_ENCR_KEY]; tk = &key->conf.key[ALG_TKIP_TEMP_ENCR_KEY]; ctx = &key->u.tkip.tx; ctx = &key->u.tkip.tx; #ifdef CONFIG_TKIP_DEBUG #ifdef CONFIG_MAC80211_TKIP_DEBUG printk(KERN_DEBUG "TKIP encrypt: iv16 = 0x%04x, iv32 = 0x%08x\n", printk(KERN_DEBUG "TKIP encrypt: iv16 = 0x%04x, iv32 = 0x%08x\n", iv16, iv32); iv16, iv32); Loading @@ -177,7 +177,7 @@ void ieee80211_get_tkip_key(struct ieee80211_key_conf *keyconf, printk(KERN_DEBUG "Wrap around of iv16 in the middle of a " printk(KERN_DEBUG "Wrap around of iv16 in the middle of a " "fragmented packet\n"); "fragmented packet\n"); } } #endif /* CONFIG_TKIP_DEBUG */ #endif /* Update the p1k only when the iv16 in the packet wraps around, this /* Update the p1k only when the iv16 in the packet wraps around, this * might occur after the wrap around of iv16 in the key in case of * might occur after the wrap around of iv16 in the key in case of Loading Loading @@ -240,7 +240,7 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm, keyid = pos[3]; keyid = pos[3]; iv32 = get_unaligned_le32(pos + 4); iv32 = get_unaligned_le32(pos + 4); pos += 8; pos += 8; #ifdef CONFIG_TKIP_DEBUG #ifdef CONFIG_MAC80211_TKIP_DEBUG { { int i; int i; printk(KERN_DEBUG "TKIP decrypt: data(len=%zd)", payload_len); printk(KERN_DEBUG "TKIP decrypt: data(len=%zd)", payload_len); Loading @@ -250,7 +250,7 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm, printk(KERN_DEBUG "TKIP decrypt: iv16=%04x iv32=%08x\n", printk(KERN_DEBUG "TKIP decrypt: iv16=%04x iv32=%08x\n", iv16, iv32); iv16, iv32); } } #endif /* CONFIG_TKIP_DEBUG */ #endif if (!(keyid & (1 << 5))) if (!(keyid & (1 << 5))) return TKIP_DECRYPT_NO_EXT_IV; return TKIP_DECRYPT_NO_EXT_IV; Loading @@ -262,14 +262,14 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm, (iv32 < key->u.tkip.rx[queue].iv32 || (iv32 < key->u.tkip.rx[queue].iv32 || (iv32 == key->u.tkip.rx[queue].iv32 && (iv32 == key->u.tkip.rx[queue].iv32 && iv16 <= key->u.tkip.rx[queue].iv16))) { iv16 <= key->u.tkip.rx[queue].iv16))) { #ifdef CONFIG_TKIP_DEBUG #ifdef CONFIG_MAC80211_TKIP_DEBUG DECLARE_MAC_BUF(mac); DECLARE_MAC_BUF(mac); printk(KERN_DEBUG "TKIP replay detected for RX frame from " printk(KERN_DEBUG "TKIP replay detected for RX frame from " "%s (RX IV (%04x,%02x) <= prev. IV (%04x,%02x)\n", "%s (RX IV (%04x,%02x) <= prev. IV (%04x,%02x)\n", print_mac(mac, ta), print_mac(mac, ta), iv32, iv16, key->u.tkip.rx[queue].iv32, iv32, iv16, key->u.tkip.rx[queue].iv32, key->u.tkip.rx[queue].iv16); key->u.tkip.rx[queue].iv16); #endif /* CONFIG_TKIP_DEBUG */ #endif return TKIP_DECRYPT_REPLAY; return TKIP_DECRYPT_REPLAY; } } Loading @@ -283,7 +283,7 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm, key->u.tkip.rx[queue].iv32 != iv32) { key->u.tkip.rx[queue].iv32 != iv32) { /* IV16 wrapped around - perform TKIP phase 1 */ /* IV16 wrapped around - perform TKIP phase 1 */ tkip_mixing_phase1(tk, &key->u.tkip.rx[queue], ta, iv32); tkip_mixing_phase1(tk, &key->u.tkip.rx[queue], ta, iv32); #ifdef CONFIG_TKIP_DEBUG #ifdef CONFIG_MAC80211_TKIP_DEBUG { { int i; int i; DECLARE_MAC_BUF(mac); DECLARE_MAC_BUF(mac); Loading @@ -299,7 +299,7 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm, printk("%04x ", key->u.tkip.rx[queue].p1k[i]); printk("%04x ", key->u.tkip.rx[queue].p1k[i]); printk("\n"); printk("\n"); } } #endif /* CONFIG_TKIP_DEBUG */ #endif if (key->local->ops->update_tkip_key && if (key->local->ops->update_tkip_key && key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) { key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) { u8 bcast[ETH_ALEN] = u8 bcast[ETH_ALEN] = Loading @@ -316,7 +316,7 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm, } } tkip_mixing_phase2(tk, &key->u.tkip.rx[queue], iv16, rc4key); tkip_mixing_phase2(tk, &key->u.tkip.rx[queue], iv16, rc4key); #ifdef CONFIG_TKIP_DEBUG #ifdef CONFIG_MAC80211_TKIP_DEBUG { { int i; int i; printk(KERN_DEBUG "TKIP decrypt: Phase2 rc4key="); printk(KERN_DEBUG "TKIP decrypt: Phase2 rc4key="); Loading @@ -324,7 +324,7 @@ int ieee80211_tkip_decrypt_data(struct crypto_blkcipher *tfm, printk("%02x ", rc4key[i]); printk("%02x ", rc4key[i]); printk("\n"); printk("\n"); } } #endif /* CONFIG_TKIP_DEBUG */ #endif res = ieee80211_wep_decrypt_data(tfm, rc4key, 16, pos, payload_len - 12); res = ieee80211_wep_decrypt_data(tfm, rc4key, 16, pos, payload_len - 12); done: done: Loading