diff options
author | Joe Perches <joe@perches.com> | 2012-05-13 17:56:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-15 13:45:03 -0400 |
commit | e87cc4728f0e2fb663e592a1141742b1d6c63256 (patch) | |
tree | b8219696d37f0c8d0521d5853560b97fc96dc667 /net/mac80211/tx.c | |
parent | 3a3bfb61e64476ff1e4ac3122cb6dec9c79b795c (diff) |
net: Convert net_ratelimit uses to net_<level>_ratelimited
Standardize the net core ratelimited logging functions.
Coalesce formats, align arguments.
Change a printk then vprintk sequence to use printf extension %pV.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index e03abc78ee53..5f827a6b0d8d 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -413,9 +413,8 @@ ieee80211_tx_h_multicast_ps_buf(struct ieee80211_tx_data *tx) | |||
413 | 413 | ||
414 | if (skb_queue_len(&tx->sdata->bss->ps_bc_buf) >= AP_MAX_BC_BUFFER) { | 414 | if (skb_queue_len(&tx->sdata->bss->ps_bc_buf) >= AP_MAX_BC_BUFFER) { |
415 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG | 415 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG |
416 | if (net_ratelimit()) | 416 | net_dbg_ratelimited("%s: BC TX buffer full - dropping the oldest frame\n", |
417 | printk(KERN_DEBUG "%s: BC TX buffer full - dropping the oldest frame\n", | 417 | tx->sdata->name); |
418 | tx->sdata->name); | ||
419 | #endif | 418 | #endif |
420 | dev_kfree_skb(skb_dequeue(&tx->sdata->bss->ps_bc_buf)); | 419 | dev_kfree_skb(skb_dequeue(&tx->sdata->bss->ps_bc_buf)); |
421 | } else | 420 | } else |
@@ -476,10 +475,8 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) | |||
476 | if (skb_queue_len(&sta->ps_tx_buf[ac]) >= STA_MAX_TX_BUFFER) { | 475 | if (skb_queue_len(&sta->ps_tx_buf[ac]) >= STA_MAX_TX_BUFFER) { |
477 | struct sk_buff *old = skb_dequeue(&sta->ps_tx_buf[ac]); | 476 | struct sk_buff *old = skb_dequeue(&sta->ps_tx_buf[ac]); |
478 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG | 477 | #ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG |
479 | if (net_ratelimit()) | 478 | net_dbg_ratelimited("%s: STA %pM TX buffer for AC %d full - dropping oldest frame\n", |
480 | printk(KERN_DEBUG "%s: STA %pM TX buffer for " | 479 | tx->sdata->name, sta->sta.addr, ac); |
481 | "AC %d full - dropping oldest frame\n", | ||
482 | tx->sdata->name, sta->sta.addr, ac); | ||
483 | #endif | 480 | #endif |
484 | dev_kfree_skb(old); | 481 | dev_kfree_skb(old); |
485 | } else | 482 | } else |
@@ -1965,10 +1962,8 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1965 | (cpu_to_be16(ethertype) != sdata->control_port_protocol || | 1962 | (cpu_to_be16(ethertype) != sdata->control_port_protocol || |
1966 | !ether_addr_equal(sdata->vif.addr, skb->data + ETH_ALEN)))) { | 1963 | !ether_addr_equal(sdata->vif.addr, skb->data + ETH_ALEN)))) { |
1967 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 1964 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
1968 | if (net_ratelimit()) | 1965 | net_dbg_ratelimited("%s: dropped frame to %pM (unauthorized port)\n", |
1969 | printk(KERN_DEBUG "%s: dropped frame to %pM" | 1966 | dev->name, hdr.addr1); |
1970 | " (unauthorized port)\n", dev->name, | ||
1971 | hdr.addr1); | ||
1972 | #endif | 1967 | #endif |
1973 | 1968 | ||
1974 | I802_DEBUG_INC(local->tx_handlers_drop_unauth_port); | 1969 | I802_DEBUG_INC(local->tx_handlers_drop_unauth_port); |