mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
ieee80211: Stop net_ratelimit/IEEE80211_DEBUG_DROP log pollution
if (net_ratelimit()) IEEE80211_DEBUG_DROP(...) can pollute the logs with messages like: printk: 1 messages suppressed. printk: 2 messages suppressed. printk: 7 messages suppressed. if debugging information is disabled. These messages are printed by net_ratelimit(). Add a wrapper to net_ratelimit() that takes into account the log level, so that net_ratelimit() is called only when we really want to print something. Signed-off-by: Guillaume Chazarain <[email protected]> Signed-off-by: John W. Linville <[email protected]>
This commit is contained in:
parent
4b50e388f8
commit
92468c53cf
3 changed files with 11 additions and 3 deletions
|
|
@ -338,7 +338,7 @@ static int ieee80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
|
|||
pos += 8;
|
||||
|
||||
if (ccmp_replay_check(pn, key->rx_pn)) {
|
||||
if (net_ratelimit()) {
|
||||
if (ieee80211_ratelimit_debug(IEEE80211_DL_DROP)) {
|
||||
IEEE80211_DEBUG_DROP("CCMP: replay detected: STA=%s "
|
||||
"previous PN %02x%02x%02x%02x%02x%02x "
|
||||
"received PN %02x%02x%02x%02x%02x%02x\n",
|
||||
|
|
|
|||
|
|
@ -464,7 +464,7 @@ static int ieee80211_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)) {
|
||||
if (net_ratelimit()) {
|
||||
if (ieee80211_ratelimit_debug(IEEE80211_DL_DROP)) {
|
||||
IEEE80211_DEBUG_DROP("TKIP: replay detected: STA=%s"
|
||||
" previous TSC %08x%04x received TSC "
|
||||
"%08x%04x\n", print_mac(mac, hdr->addr2),
|
||||
|
|
@ -504,7 +504,7 @@ static int ieee80211_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;
|
||||
}
|
||||
if (net_ratelimit()) {
|
||||
if (ieee80211_ratelimit_debug(IEEE80211_DL_DROP)) {
|
||||
IEEE80211_DEBUG_DROP("TKIP: ICV error detected: STA="
|
||||
"%s\n", print_mac(mac, hdr->addr2));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue