aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/wep.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-06-30 09:10:46 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-07-02 15:48:33 -0400
commitf4ea83dd743d3e1bec8fdf954ac911c6b12ae87a (patch)
tree2db594d668648779e1932981410e37258df76b2c /net/mac80211/wep.c
parent49461622edf74cd1e1a1056cee3ca8dd90cd9556 (diff)
mac80211: rework debug settings and make debugging safer
This patch reworks the mac80211 debug settings making them more focused and adding help text for those that didn't have one. It also removes a number of printks that can be triggered remotely and add no value, e.g. "too short deauthentication frame received - ignoring". If somebody really needs to debug that they should just add a monitor interface and look at the frames in wireshark. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/wep.c')
-rw-r--r--net/mac80211/wep.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c
index 35b664d00e23..872d2fcd1a5b 100644
--- a/net/mac80211/wep.c
+++ b/net/mac80211/wep.c
@@ -253,11 +253,8 @@ int ieee80211_wep_decrypt(struct ieee80211_local *local, struct sk_buff *skb,
253 253
254 if (ieee80211_wep_decrypt_data(local->wep_rx_tfm, rc4key, klen, 254 if (ieee80211_wep_decrypt_data(local->wep_rx_tfm, rc4key, klen,
255 skb->data + hdrlen + WEP_IV_LEN, 255 skb->data + hdrlen + WEP_IV_LEN,
256 len)) { 256 len))
257 if (net_ratelimit())
258 printk(KERN_DEBUG "WEP decrypt failed (ICV)\n");
259 ret = -1; 257 ret = -1;
260 }
261 258
262 kfree(rc4key); 259 kfree(rc4key);
263 260
@@ -301,14 +298,8 @@ ieee80211_crypto_wep_decrypt(struct ieee80211_rx_data *rx)
301 return RX_CONTINUE; 298 return RX_CONTINUE;
302 299
303 if (!(rx->status->flag & RX_FLAG_DECRYPTED)) { 300 if (!(rx->status->flag & RX_FLAG_DECRYPTED)) {
304 if (ieee80211_wep_decrypt(rx->local, rx->skb, rx->key)) { 301 if (ieee80211_wep_decrypt(rx->local, rx->skb, rx->key))
305#ifdef CONFIG_MAC80211_DEBUG
306 if (net_ratelimit())
307 printk(KERN_DEBUG "%s: RX WEP frame, decrypt "
308 "failed\n", rx->dev->name);
309#endif /* CONFIG_MAC80211_DEBUG */
310 return RX_DROP_UNUSABLE; 302 return RX_DROP_UNUSABLE;
311 }
312 } else if (!(rx->status->flag & RX_FLAG_IV_STRIPPED)) { 303 } else if (!(rx->status->flag & RX_FLAG_IV_STRIPPED)) {
313 ieee80211_wep_remove_iv(rx->local, rx->skb, rx->key); 304 ieee80211_wep_remove_iv(rx->local, rx->skb, rx->key);
314 /* remove ICV */ 305 /* remove ICV */