diff options
Diffstat (limited to 'net/mac80211/tkip.c')
| -rw-r--r-- | net/mac80211/tkip.c | 46 | 
1 files changed, 1 insertions, 45 deletions
diff --git a/net/mac80211/tkip.c b/net/mac80211/tkip.c index 51077a956a8..57e14d59e12 100644 --- a/net/mac80211/tkip.c +++ b/net/mac80211/tkip.c @@ -260,17 +260,6 @@ int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,  	keyid = pos[3];  	iv32 = get_unaligned_le32(pos + 4);  	pos += 8; -#ifdef CONFIG_MAC80211_TKIP_DEBUG -	{ -		int i; -		printk(KERN_DEBUG "TKIP decrypt: data(len=%zd)", payload_len); -		for (i = 0; i < payload_len; i++) -			printk(" %02x", payload[i]); -		printk("\n"); -		printk(KERN_DEBUG "TKIP decrypt: iv16=%04x iv32=%08x\n", -		       iv16, iv32); -	} -#endif  	if (!(keyid & (1 << 5)))  		return TKIP_DECRYPT_NO_EXT_IV; @@ -281,16 +270,8 @@ int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,  	if (key->u.tkip.rx[queue].state != TKIP_STATE_NOT_INIT &&  	    (iv32 < key->u.tkip.rx[queue].iv32 ||  	     (iv32 == key->u.tkip.rx[queue].iv32 && -	      iv16 <= key->u.tkip.rx[queue].iv16))) { -#ifdef CONFIG_MAC80211_TKIP_DEBUG -		printk(KERN_DEBUG "TKIP replay detected for RX frame from " -		       "%pM (RX IV (%04x,%02x) <= prev. IV (%04x,%02x)\n", -		       ta, -		       iv32, iv16, key->u.tkip.rx[queue].iv32, -		       key->u.tkip.rx[queue].iv16); -#endif +	      iv16 <= key->u.tkip.rx[queue].iv16)))  		return TKIP_DECRYPT_REPLAY; -	}  	if (only_iv) {  		res = TKIP_DECRYPT_OK; @@ -302,22 +283,6 @@ int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,  	    key->u.tkip.rx[queue].iv32 != iv32) {  		/* IV16 wrapped around - perform TKIP phase 1 */  		tkip_mixing_phase1(tk, &key->u.tkip.rx[queue], ta, iv32); -#ifdef CONFIG_MAC80211_TKIP_DEBUG -		{ -			int i; -			u8 key_offset = NL80211_TKIP_DATA_OFFSET_ENCR_KEY; -			printk(KERN_DEBUG "TKIP decrypt: Phase1 TA=%pM" -			       " TK=", ta); -			for (i = 0; i < 16; i++) -				printk("%02x ", -				       key->conf.key[key_offset + i]); -			printk("\n"); -			printk(KERN_DEBUG "TKIP decrypt: P1K="); -			for (i = 0; i < 5; i++) -				printk("%04x ", key->u.tkip.rx[queue].p1k[i]); -			printk("\n"); -		} -#endif  	}  	if (key->local->ops->update_tkip_key &&  	    key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE && @@ -333,15 +298,6 @@ int ieee80211_tkip_decrypt_data(struct crypto_cipher *tfm,  	}  	tkip_mixing_phase2(tk, &key->u.tkip.rx[queue], iv16, rc4key); -#ifdef CONFIG_MAC80211_TKIP_DEBUG -	{ -		int i; -		printk(KERN_DEBUG "TKIP decrypt: Phase2 rc4key="); -		for (i = 0; i < 16; i++) -			printk("%02x ", rc4key[i]); -		printk("\n"); -	} -#endif  	res = ieee80211_wep_decrypt_data(tfm, rc4key, 16, pos, payload_len - 12);   done:  |