aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee80211
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2007-04-09 12:24:41 -0400
committerJeff Garzik <jeff@garzik.org>2007-04-28 11:01:04 -0400
commitaeb998c124786e8c7fbd6eab347230469e911872 (patch)
tree93894a8364843421681b5250aae45479c77ff4bb /net/ieee80211
parent5d082fe85bf77f11aebb98d3bd29d66284d46851 (diff)
[PATCH] ieee80211-crypt: Make some TKIP and CCMP error logging conditional
There are messages arising from ieee80211_crypt that spam the logs of casual users. These are changed to be logged only if the user specifically requests the IEEE80211_DEBUG_DROP messages. In either case, the error/drop count is incremented. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/ieee80211')
-rw-r--r--net/ieee80211/ieee80211_crypt_ccmp.c2
-rw-r--r--net/ieee80211/ieee80211_crypt_tkip.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/net/ieee80211/ieee80211_crypt_ccmp.c b/net/ieee80211/ieee80211_crypt_ccmp.c
index 7ec8314d8d15..b016b4104de6 100644
--- a/net/ieee80211/ieee80211_crypt_ccmp.c
+++ b/net/ieee80211/ieee80211_crypt_ccmp.c
@@ -338,7 +338,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
338 338
339 if (ccmp_replay_check(pn, key->rx_pn)) { 339 if (ccmp_replay_check(pn, key->rx_pn)) {
340 if (net_ratelimit()) { 340 if (net_ratelimit()) {
341 printk(KERN_DEBUG "CCMP: replay detected: STA=" MAC_FMT 341 IEEE80211_DEBUG_DROP("CCMP: replay detected: STA=" MAC_FMT
342 " previous PN %02x%02x%02x%02x%02x%02x " 342 " previous PN %02x%02x%02x%02x%02x%02x "
343 "received PN %02x%02x%02x%02x%02x%02x\n", 343 "received PN %02x%02x%02x%02x%02x%02x\n",
344 MAC_ARG(hdr->addr2), MAC_ARG(key->rx_pn), 344 MAC_ARG(hdr->addr2), MAC_ARG(key->rx_pn),
diff --git a/net/ieee80211/ieee80211_crypt_tkip.c b/net/ieee80211/ieee80211_crypt_tkip.c
index bd0988f8d3f3..5a48d8e0aec1 100644
--- a/net/ieee80211/ieee80211_crypt_tkip.c
+++ b/net/ieee80211/ieee80211_crypt_tkip.c
@@ -465,7 +465,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
465 465
466 if (tkip_replay_check(iv32, iv16, tkey->rx_iv32, tkey->rx_iv16)) { 466 if (tkip_replay_check(iv32, iv16, tkey->rx_iv32, tkey->rx_iv16)) {
467 if (net_ratelimit()) { 467 if (net_ratelimit()) {
468 printk(KERN_DEBUG "TKIP: replay detected: STA=" MAC_FMT 468 IEEE80211_DEBUG_DROP("TKIP: replay detected: STA=" MAC_FMT
469 " previous TSC %08x%04x received TSC " 469 " previous TSC %08x%04x received TSC "
470 "%08x%04x\n", MAC_ARG(hdr->addr2), 470 "%08x%04x\n", MAC_ARG(hdr->addr2),
471 tkey->rx_iv32, tkey->rx_iv16, iv32, iv16); 471 tkey->rx_iv32, tkey->rx_iv16, iv32, iv16);
@@ -507,7 +507,7 @@ static int ieee80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
507 tkey->rx_phase1_done = 0; 507 tkey->rx_phase1_done = 0;
508 } 508 }
509 if (net_ratelimit()) { 509 if (net_ratelimit()) {
510 printk(KERN_DEBUG "TKIP: ICV error detected: STA=" 510 IEEE80211_DEBUG_DROP("TKIP: ICV error detected: STA="
511 MAC_FMT "\n", MAC_ARG(hdr->addr2)); 511 MAC_FMT "\n", MAC_ARG(hdr->addr2));
512 } 512 }
513 tkey->dot11RSNAStatsTKIPICVErrors++; 513 tkey->dot11RSNAStatsTKIPICVErrors++;