Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+16
+10
net/wireless/Kconfig
··· 102 102 103 103 config LIB80211_CRYPT_TKIP 104 104 tristate 105 + 106 + config LIB80211_DEBUG 107 + bool "lib80211 debugging messages" 108 + depends on LIB80211 109 + default n 110 + ---help--- 111 + You can enable this if you want verbose debugging messages 112 + from lib80211. 113 + 114 + If unsure, say N.
+2
net/wireless/lib80211_crypt_ccmp.c
··· 337 337 pos += 8; 338 338 339 339 if (ccmp_replay_check(pn, key->rx_pn)) { 340 + #ifdef CONFIG_LIB80211_DEBUG 340 341 if (net_ratelimit()) { 341 342 printk(KERN_DEBUG "CCMP: replay detected: STA=%pM " 342 343 "previous PN %02x%02x%02x%02x%02x%02x " ··· 347 346 key->rx_pn[3], key->rx_pn[4], key->rx_pn[5], 348 347 pn[0], pn[1], pn[2], pn[3], pn[4], pn[5]); 349 348 } 349 + #endif 350 350 key->dot11RSNAStatsCCMPReplays++; 351 351 return -4; 352 352 }
+4
net/wireless/lib80211_crypt_tkip.c
··· 465 465 pos += 8; 466 466 467 467 if (tkip_replay_check(iv32, iv16, tkey->rx_iv32, tkey->rx_iv16)) { 468 + #ifdef CONFIG_LIB80211_DEBUG 468 469 if (net_ratelimit()) { 469 470 printk(KERN_DEBUG "TKIP: replay detected: STA=%pM" 470 471 " previous TSC %08x%04x received TSC " 471 472 "%08x%04x\n", hdr->addr2, 472 473 tkey->rx_iv32, tkey->rx_iv16, iv32, iv16); 473 474 } 475 + #endif 474 476 tkey->dot11RSNAStatsTKIPReplays++; 475 477 return -4; 476 478 } ··· 507 505 * it needs to be recalculated for the next packet. */ 508 506 tkey->rx_phase1_done = 0; 509 507 } 508 + #ifdef CONFIG_LIB80211_DEBUG 510 509 if (net_ratelimit()) { 511 510 printk(KERN_DEBUG "TKIP: ICV error detected: STA=" 512 511 "%pM\n", hdr->addr2); 513 512 } 513 + #endif 514 514 tkey->dot11RSNAStatsTKIPICVErrors++; 515 515 return -5; 516 516 }