summary refs log tree commit diff
path: root/net/wireless/lib80211_crypt_tkip.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2009-03-11 11:05:25 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-03-16 18:01:58 -0400
commit6f16bf3bdb94b567e2b6663378efb2dbf40db133 (patch)
tree5ec502ad4c5b590182221a8af7394e05d738a56c /net/wireless/lib80211_crypt_tkip.c
parentea8dbdd17099a9a5864ebd4c87e01e657b19c7ab (diff)
downloadlinux-6f16bf3bdb94b567e2b6663378efb2dbf40db133.tar.gz
lib80211: silence excessive crypto debugging messages
When they were part of the now defunct ieee80211 component, these
messages were only visible when special debugging settings were enabled.
Let's mirror that with a new lib80211 debugging Kconfig option.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/lib80211_crypt_tkip.c')
-rw-r--r--net/wireless/lib80211_crypt_tkip.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/wireless/lib80211_crypt_tkip.c b/net/wireless/lib80211_crypt_tkip.c
index 7e8e22bfed90..c36287399d7e 100644
--- a/net/wireless/lib80211_crypt_tkip.c
+++ b/net/wireless/lib80211_crypt_tkip.c
@@ -465,12 +465,14 @@ static int lib80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
 	pos += 8;
 
 	if (tkip_replay_check(iv32, iv16, tkey->rx_iv32, tkey->rx_iv16)) {
+#ifdef CONFIG_LIB80211_DEBUG
 		if (net_ratelimit()) {
 			printk(KERN_DEBUG "TKIP: replay detected: STA=%pM"
 			       " previous TSC %08x%04x received TSC "
 			       "%08x%04x\n", hdr->addr2,
 			       tkey->rx_iv32, tkey->rx_iv16, iv32, iv16);
 		}
+#endif
 		tkey->dot11RSNAStatsTKIPReplays++;
 		return -4;
 	}
@@ -505,10 +507,12 @@ static int lib80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
 			 * it needs to be recalculated for the next packet. */
 			tkey->rx_phase1_done = 0;
 		}
+#ifdef CONFIG_LIB80211_DEBUG
 		if (net_ratelimit()) {
 			printk(KERN_DEBUG "TKIP: ICV error detected: STA="
 			       "%pM\n", hdr->addr2);
 		}
+#endif
 		tkey->dot11RSNAStatsTKIPICVErrors++;
 		return -5;
 	}