diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/rx.c | 2 | ||||
-rw-r--r-- | net/mac80211/wep.c | 2 | ||||
-rw-r--r-- | net/mac80211/wpa.c | 18 |
3 files changed, 16 insertions, 6 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index ece77766ea2b..428a9fcf57d6 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -509,9 +509,11 @@ ieee80211_rx_h_decrypt(struct ieee80211_txrx_data *rx) | |||
509 | rx->key->tx_rx_count++; | 509 | rx->key->tx_rx_count++; |
510 | /* TODO: add threshold stuff again */ | 510 | /* TODO: add threshold stuff again */ |
511 | } else { | 511 | } else { |
512 | #ifdef CONFIG_MAC80211_DEBUG | ||
512 | if (net_ratelimit()) | 513 | if (net_ratelimit()) |
513 | printk(KERN_DEBUG "%s: RX protected frame," | 514 | printk(KERN_DEBUG "%s: RX protected frame," |
514 | " but have no key\n", rx->dev->name); | 515 | " but have no key\n", rx->dev->name); |
516 | #endif /* CONFIG_MAC80211_DEBUG */ | ||
515 | return TXRX_DROP; | 517 | return TXRX_DROP; |
516 | } | 518 | } |
517 | 519 | ||
diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c index a84a23310ff4..9bf0e1cc530a 100644 --- a/net/mac80211/wep.c +++ b/net/mac80211/wep.c | |||
@@ -314,9 +314,11 @@ ieee80211_crypto_wep_decrypt(struct ieee80211_txrx_data *rx) | |||
314 | 314 | ||
315 | if (!(rx->u.rx.status->flag & RX_FLAG_DECRYPTED)) { | 315 | if (!(rx->u.rx.status->flag & RX_FLAG_DECRYPTED)) { |
316 | if (ieee80211_wep_decrypt(rx->local, rx->skb, rx->key)) { | 316 | if (ieee80211_wep_decrypt(rx->local, rx->skb, rx->key)) { |
317 | #ifdef CONFIG_MAC80211_DEBUG | ||
317 | if (net_ratelimit()) | 318 | if (net_ratelimit()) |
318 | printk(KERN_DEBUG "%s: RX WEP frame, decrypt " | 319 | printk(KERN_DEBUG "%s: RX WEP frame, decrypt " |
319 | "failed\n", rx->dev->name); | 320 | "failed\n", rx->dev->name); |
321 | #endif /* CONFIG_MAC80211_DEBUG */ | ||
320 | return TXRX_DROP; | 322 | return TXRX_DROP; |
321 | } | 323 | } |
322 | } else if (!(rx->u.rx.status->flag & RX_FLAG_IV_STRIPPED)) { | 324 | } else if (!(rx->u.rx.status->flag & RX_FLAG_IV_STRIPPED)) { |
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c index 6695efba57ec..20cec1cb956f 100644 --- a/net/mac80211/wpa.c +++ b/net/mac80211/wpa.c | |||
@@ -323,9 +323,12 @@ ieee80211_crypto_tkip_decrypt(struct ieee80211_txrx_data *rx) | |||
323 | &rx->u.rx.tkip_iv32, | 323 | &rx->u.rx.tkip_iv32, |
324 | &rx->u.rx.tkip_iv16); | 324 | &rx->u.rx.tkip_iv16); |
325 | if (res != TKIP_DECRYPT_OK || wpa_test) { | 325 | if (res != TKIP_DECRYPT_OK || wpa_test) { |
326 | printk(KERN_DEBUG "%s: TKIP decrypt failed for RX frame from " | 326 | #ifdef CONFIG_MAC80211_DEBUG |
327 | "%s (res=%d)\n", | 327 | if (net_ratelimit()) |
328 | rx->dev->name, print_mac(mac, rx->sta->addr), res); | 328 | printk(KERN_DEBUG "%s: TKIP decrypt failed for RX " |
329 | "frame from %s (res=%d)\n", rx->dev->name, | ||
330 | print_mac(mac, rx->sta->addr), res); | ||
331 | #endif /* CONFIG_MAC80211_DEBUG */ | ||
329 | return TXRX_DROP; | 332 | return TXRX_DROP; |
330 | } | 333 | } |
331 | 334 | ||
@@ -594,9 +597,12 @@ ieee80211_crypto_ccmp_decrypt(struct ieee80211_txrx_data *rx) | |||
594 | skb->data + hdrlen + CCMP_HDR_LEN, data_len, | 597 | skb->data + hdrlen + CCMP_HDR_LEN, data_len, |
595 | skb->data + skb->len - CCMP_MIC_LEN, | 598 | skb->data + skb->len - CCMP_MIC_LEN, |
596 | skb->data + hdrlen + CCMP_HDR_LEN)) { | 599 | skb->data + hdrlen + CCMP_HDR_LEN)) { |
597 | printk(KERN_DEBUG "%s: CCMP decrypt failed for RX " | 600 | #ifdef CONFIG_MAC80211_DEBUG |
598 | "frame from %s\n", rx->dev->name, | 601 | if (net_ratelimit()) |
599 | print_mac(mac, rx->sta->addr)); | 602 | printk(KERN_DEBUG "%s: CCMP decrypt failed " |
603 | "for RX frame from %s\n", rx->dev->name, | ||
604 | print_mac(mac, rx->sta->addr)); | ||
605 | #endif /* CONFIG_MAC80211_DEBUG */ | ||
600 | return TXRX_DROP; | 606 | return TXRX_DROP; |
601 | } | 607 | } |
602 | } | 608 | } |