diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-06-30 09:10:46 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-07-02 15:48:33 -0400 |
commit | f4ea83dd743d3e1bec8fdf954ac911c6b12ae87a (patch) | |
tree | 2db594d668648779e1932981410e37258df76b2c /net/mac80211/tx.c | |
parent | 49461622edf74cd1e1a1056cee3ca8dd90cd9556 (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/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 7b930d3c2fba..9bd9faac3c3c 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -327,8 +327,10 @@ static void purge_old_ps_buffers(struct ieee80211_local *local) | |||
327 | rcu_read_unlock(); | 327 | rcu_read_unlock(); |
328 | 328 | ||
329 | local->total_ps_buffered = total; | 329 | local->total_ps_buffered = total; |
330 | #ifdef MAC80211_VERBOSE_PS_DEBUG | ||
330 | printk(KERN_DEBUG "%s: PS buffers full - purged %d frames\n", | 331 | printk(KERN_DEBUG "%s: PS buffers full - purged %d frames\n", |
331 | wiphy_name(local->hw.wiphy), purged); | 332 | wiphy_name(local->hw.wiphy), purged); |
333 | #endif | ||
332 | } | 334 | } |
333 | 335 | ||
334 | static ieee80211_tx_result | 336 | static ieee80211_tx_result |
@@ -358,11 +360,13 @@ ieee80211_tx_h_multicast_ps_buf(struct ieee80211_tx_data *tx) | |||
358 | purge_old_ps_buffers(tx->local); | 360 | purge_old_ps_buffers(tx->local); |
359 | if (skb_queue_len(&tx->sdata->bss->ps_bc_buf) >= | 361 | if (skb_queue_len(&tx->sdata->bss->ps_bc_buf) >= |
360 | AP_MAX_BC_BUFFER) { | 362 | AP_MAX_BC_BUFFER) { |
363 | #ifdef MAC80211_VERBOSE_PS_DEBUG | ||
361 | if (net_ratelimit()) { | 364 | if (net_ratelimit()) { |
362 | printk(KERN_DEBUG "%s: BC TX buffer full - " | 365 | printk(KERN_DEBUG "%s: BC TX buffer full - " |
363 | "dropping the oldest frame\n", | 366 | "dropping the oldest frame\n", |
364 | tx->dev->name); | 367 | tx->dev->name); |
365 | } | 368 | } |
369 | #endif | ||
366 | dev_kfree_skb(skb_dequeue(&tx->sdata->bss->ps_bc_buf)); | 370 | dev_kfree_skb(skb_dequeue(&tx->sdata->bss->ps_bc_buf)); |
367 | } else | 371 | } else |
368 | tx->local->total_ps_buffered++; | 372 | tx->local->total_ps_buffered++; |
@@ -403,11 +407,13 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) | |||
403 | purge_old_ps_buffers(tx->local); | 407 | purge_old_ps_buffers(tx->local); |
404 | if (skb_queue_len(&sta->ps_tx_buf) >= STA_MAX_TX_BUFFER) { | 408 | if (skb_queue_len(&sta->ps_tx_buf) >= STA_MAX_TX_BUFFER) { |
405 | struct sk_buff *old = skb_dequeue(&sta->ps_tx_buf); | 409 | struct sk_buff *old = skb_dequeue(&sta->ps_tx_buf); |
410 | #ifdef MAC80211_VERBOSE_PS_DEBUG | ||
406 | if (net_ratelimit()) { | 411 | if (net_ratelimit()) { |
407 | printk(KERN_DEBUG "%s: STA %s TX " | 412 | printk(KERN_DEBUG "%s: STA %s TX " |
408 | "buffer full - dropping oldest frame\n", | 413 | "buffer full - dropping oldest frame\n", |
409 | tx->dev->name, print_mac(mac, sta->addr)); | 414 | tx->dev->name, print_mac(mac, sta->addr)); |
410 | } | 415 | } |
416 | #endif | ||
411 | dev_kfree_skb(old); | 417 | dev_kfree_skb(old); |
412 | } else | 418 | } else |
413 | tx->local->total_ps_buffered++; | 419 | tx->local->total_ps_buffered++; |
@@ -713,7 +719,6 @@ ieee80211_tx_h_fragment(struct ieee80211_tx_data *tx) | |||
713 | return TX_CONTINUE; | 719 | return TX_CONTINUE; |
714 | 720 | ||
715 | fail: | 721 | fail: |
716 | printk(KERN_DEBUG "%s: failed to fragment frame\n", tx->dev->name); | ||
717 | if (frags) { | 722 | if (frags) { |
718 | for (i = 0; i < num_fragm - 1; i++) | 723 | for (i = 0; i < num_fragm - 1; i++) |
719 | if (frags[i]) | 724 | if (frags[i]) |
@@ -1404,8 +1409,6 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1404 | 1409 | ||
1405 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 1410 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
1406 | if (unlikely(skb->len < ETH_HLEN)) { | 1411 | if (unlikely(skb->len < ETH_HLEN)) { |
1407 | printk(KERN_DEBUG "%s: short skb (len=%d)\n", | ||
1408 | dev->name, skb->len); | ||
1409 | ret = 0; | 1412 | ret = 0; |
1410 | goto fail; | 1413 | goto fail; |
1411 | } | 1414 | } |