diff options
author | Joe Perches <joe@perches.com> | 2010-07-26 17:39:58 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-27 15:14:13 -0400 |
commit | c96c31e499b70964cfc88744046c998bb710e4b8 (patch) | |
tree | 0157102fbc952e3646690f3491199607669eed69 /drivers/net/wireless/ath/ar9170 | |
parent | e1db74fcc3d95c8a051ec457241b5aa65a01a603 (diff) |
drivers/net/wireless: Use wiphy_<level>
Standardize the logging macros used.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ar9170')
-rw-r--r-- | drivers/net/wireless/ath/ar9170/cmd.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ar9170/led.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ar9170/main.c | 172 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ar9170/phy.c | 8 |
4 files changed, 88 insertions, 103 deletions
diff --git a/drivers/net/wireless/ath/ar9170/cmd.c b/drivers/net/wireless/ath/ar9170/cmd.c index cf6f5c4174a6..4604de09a8b2 100644 --- a/drivers/net/wireless/ath/ar9170/cmd.c +++ b/drivers/net/wireless/ath/ar9170/cmd.c | |||
@@ -48,8 +48,7 @@ int ar9170_write_mem(struct ar9170 *ar, const __le32 *data, size_t len) | |||
48 | 48 | ||
49 | err = ar->exec_cmd(ar, AR9170_CMD_WMEM, len, (u8 *) data, 0, NULL); | 49 | err = ar->exec_cmd(ar, AR9170_CMD_WMEM, len, (u8 *) data, 0, NULL); |
50 | if (err) | 50 | if (err) |
51 | printk(KERN_DEBUG "%s: writing memory failed\n", | 51 | wiphy_debug(ar->hw->wiphy, "writing memory failed\n"); |
52 | wiphy_name(ar->hw->wiphy)); | ||
53 | return err; | 52 | return err; |
54 | } | 53 | } |
55 | 54 | ||
@@ -67,8 +66,8 @@ int ar9170_write_reg(struct ar9170 *ar, const u32 reg, const u32 val) | |||
67 | err = ar->exec_cmd(ar, AR9170_CMD_WREG, sizeof(buf), | 66 | err = ar->exec_cmd(ar, AR9170_CMD_WREG, sizeof(buf), |
68 | (u8 *) buf, 0, NULL); | 67 | (u8 *) buf, 0, NULL); |
69 | if (err) | 68 | if (err) |
70 | printk(KERN_DEBUG "%s: writing reg %#x (val %#x) failed\n", | 69 | wiphy_debug(ar->hw->wiphy, "writing reg %#x (val %#x) failed\n", |
71 | wiphy_name(ar->hw->wiphy), reg, val); | 70 | reg, val); |
72 | return err; | 71 | return err; |
73 | } | 72 | } |
74 | 73 | ||
diff --git a/drivers/net/wireless/ath/ar9170/led.c b/drivers/net/wireless/ath/ar9170/led.c index 86c4e79f6bc8..832d90087f8a 100644 --- a/drivers/net/wireless/ath/ar9170/led.c +++ b/drivers/net/wireless/ath/ar9170/led.c | |||
@@ -133,8 +133,8 @@ static int ar9170_register_led(struct ar9170 *ar, int i, char *name, | |||
133 | err = led_classdev_register(wiphy_dev(ar->hw->wiphy), | 133 | err = led_classdev_register(wiphy_dev(ar->hw->wiphy), |
134 | &ar->leds[i].l); | 134 | &ar->leds[i].l); |
135 | if (err) | 135 | if (err) |
136 | printk(KERN_ERR "%s: failed to register %s LED (%d).\n", | 136 | wiphy_err(ar->hw->wiphy, "failed to register %s LED (%d).\n", |
137 | wiphy_name(ar->hw->wiphy), ar->leds[i].name, err); | 137 | ar->leds[i].name, err); |
138 | else | 138 | else |
139 | ar->leds[i].registered = true; | 139 | ar->leds[i].registered = true; |
140 | 140 | ||
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c index 2abc87578994..5e2c51433967 100644 --- a/drivers/net/wireless/ath/ar9170/main.c +++ b/drivers/net/wireless/ath/ar9170/main.c | |||
@@ -198,12 +198,13 @@ static void ar9170_print_txheader(struct ar9170 *ar, struct sk_buff *skb) | |||
198 | struct ar9170_tx_info *arinfo = (void *) txinfo->rate_driver_data; | 198 | struct ar9170_tx_info *arinfo = (void *) txinfo->rate_driver_data; |
199 | struct ieee80211_hdr *hdr = (void *) txc->frame_data; | 199 | struct ieee80211_hdr *hdr = (void *) txc->frame_data; |
200 | 200 | ||
201 | printk(KERN_DEBUG "%s: => FRAME [skb:%p, q:%d, DA:[%pM] s:%d " | 201 | wiphy_debug(ar->hw->wiphy, |
202 | "mac_ctrl:%04x, phy_ctrl:%08x, timeout:[%d ms]]\n", | 202 | "=> FRAME [skb:%p, q:%d, DA:[%pM] s:%d " |
203 | wiphy_name(ar->hw->wiphy), skb, skb_get_queue_mapping(skb), | 203 | "mac_ctrl:%04x, phy_ctrl:%08x, timeout:[%d ms]]\n", |
204 | ieee80211_get_DA(hdr), ar9170_get_seq_h(hdr), | 204 | skb, skb_get_queue_mapping(skb), |
205 | le16_to_cpu(txc->mac_control), le32_to_cpu(txc->phy_control), | 205 | ieee80211_get_DA(hdr), ar9170_get_seq_h(hdr), |
206 | jiffies_to_msecs(arinfo->timeout - jiffies)); | 206 | le16_to_cpu(txc->mac_control), le32_to_cpu(txc->phy_control), |
207 | jiffies_to_msecs(arinfo->timeout - jiffies)); | ||
207 | } | 208 | } |
208 | 209 | ||
209 | static void __ar9170_dump_txqueue(struct ar9170 *ar, | 210 | static void __ar9170_dump_txqueue(struct ar9170 *ar, |
@@ -213,8 +214,8 @@ static void __ar9170_dump_txqueue(struct ar9170 *ar, | |||
213 | int i = 0; | 214 | int i = 0; |
214 | 215 | ||
215 | printk(KERN_DEBUG "---[ cut here ]---\n"); | 216 | printk(KERN_DEBUG "---[ cut here ]---\n"); |
216 | printk(KERN_DEBUG "%s: %d entries in queue.\n", | 217 | wiphy_debug(ar->hw->wiphy, "%d entries in queue.\n", |
217 | wiphy_name(ar->hw->wiphy), skb_queue_len(queue)); | 218 | skb_queue_len(queue)); |
218 | 219 | ||
219 | skb_queue_walk(queue, skb) { | 220 | skb_queue_walk(queue, skb) { |
220 | printk(KERN_DEBUG "index:%d =>\n", i++); | 221 | printk(KERN_DEBUG "index:%d =>\n", i++); |
@@ -244,15 +245,14 @@ static void __ar9170_dump_txstats(struct ar9170 *ar) | |||
244 | { | 245 | { |
245 | int i; | 246 | int i; |
246 | 247 | ||
247 | printk(KERN_DEBUG "%s: QoS queue stats\n", | 248 | wiphy_debug(ar->hw->wiphy, "qos queue stats\n"); |
248 | wiphy_name(ar->hw->wiphy)); | ||
249 | 249 | ||
250 | for (i = 0; i < __AR9170_NUM_TXQ; i++) | 250 | for (i = 0; i < __AR9170_NUM_TXQ; i++) |
251 | printk(KERN_DEBUG "%s: queue:%d limit:%d len:%d waitack:%d " | 251 | wiphy_debug(ar->hw->wiphy, |
252 | " stopped:%d\n", wiphy_name(ar->hw->wiphy), i, | 252 | "queue:%d limit:%d len:%d waitack:%d stopped:%d\n", |
253 | ar->tx_stats[i].limit, ar->tx_stats[i].len, | 253 | i, ar->tx_stats[i].limit, ar->tx_stats[i].len, |
254 | skb_queue_len(&ar->tx_status[i]), | 254 | skb_queue_len(&ar->tx_status[i]), |
255 | ieee80211_queue_stopped(ar->hw, i)); | 255 | ieee80211_queue_stopped(ar->hw, i)); |
256 | } | 256 | } |
257 | #endif /* AR9170_QUEUE_STOP_DEBUG */ | 257 | #endif /* AR9170_QUEUE_STOP_DEBUG */ |
258 | 258 | ||
@@ -274,9 +274,9 @@ static void ar9170_recycle_expired(struct ar9170 *ar, | |||
274 | 274 | ||
275 | if (time_is_before_jiffies(arinfo->timeout)) { | 275 | if (time_is_before_jiffies(arinfo->timeout)) { |
276 | #ifdef AR9170_QUEUE_DEBUG | 276 | #ifdef AR9170_QUEUE_DEBUG |
277 | printk(KERN_DEBUG "%s: [%ld > %ld] frame expired => " | 277 | wiphy_debug(ar->hw->wiphy, |
278 | "recycle\n", wiphy_name(ar->hw->wiphy), | 278 | "[%ld > %ld] frame expired => recycle\n", |
279 | jiffies, arinfo->timeout); | 279 | jiffies, arinfo->timeout); |
280 | ar9170_print_txheader(ar, skb); | 280 | ar9170_print_txheader(ar, skb); |
281 | #endif /* AR9170_QUEUE_DEBUG */ | 281 | #endif /* AR9170_QUEUE_DEBUG */ |
282 | __skb_unlink(skb, queue); | 282 | __skb_unlink(skb, queue); |
@@ -317,8 +317,8 @@ static void ar9170_tx_status(struct ar9170 *ar, struct sk_buff *skb, | |||
317 | break; | 317 | break; |
318 | 318 | ||
319 | default: | 319 | default: |
320 | printk(KERN_ERR "%s: invalid tx_status response (%x).\n", | 320 | wiphy_err(ar->hw->wiphy, |
321 | wiphy_name(ar->hw->wiphy), tx_status); | 321 | "invalid tx_status response (%x)\n", tx_status); |
322 | break; | 322 | break; |
323 | } | 323 | } |
324 | 324 | ||
@@ -339,8 +339,7 @@ void ar9170_tx_callback(struct ar9170 *ar, struct sk_buff *skb) | |||
339 | 339 | ||
340 | if (ar->tx_stats[queue].len < AR9170_NUM_TX_LIMIT_SOFT) { | 340 | if (ar->tx_stats[queue].len < AR9170_NUM_TX_LIMIT_SOFT) { |
341 | #ifdef AR9170_QUEUE_STOP_DEBUG | 341 | #ifdef AR9170_QUEUE_STOP_DEBUG |
342 | printk(KERN_DEBUG "%s: wake queue %d\n", | 342 | wiphy_debug(ar->hw->wiphy, "wake queue %d\n", queue); |
343 | wiphy_name(ar->hw->wiphy), queue); | ||
344 | __ar9170_dump_txstats(ar); | 343 | __ar9170_dump_txstats(ar); |
345 | #endif /* AR9170_QUEUE_STOP_DEBUG */ | 344 | #endif /* AR9170_QUEUE_STOP_DEBUG */ |
346 | ieee80211_wake_queue(ar->hw, queue); | 345 | ieee80211_wake_queue(ar->hw, queue); |
@@ -387,9 +386,9 @@ static struct sk_buff *ar9170_get_queued_skb(struct ar9170 *ar, | |||
387 | 386 | ||
388 | if (mac && compare_ether_addr(ieee80211_get_DA(hdr), mac)) { | 387 | if (mac && compare_ether_addr(ieee80211_get_DA(hdr), mac)) { |
389 | #ifdef AR9170_QUEUE_DEBUG | 388 | #ifdef AR9170_QUEUE_DEBUG |
390 | printk(KERN_DEBUG "%s: skip frame => DA %pM != %pM\n", | 389 | wiphy_debug(ar->hw->wiphy, |
391 | wiphy_name(ar->hw->wiphy), mac, | 390 | "skip frame => da %pm != %pm\n", |
392 | ieee80211_get_DA(hdr)); | 391 | mac, ieee80211_get_DA(hdr)); |
393 | ar9170_print_txheader(ar, skb); | 392 | ar9170_print_txheader(ar, skb); |
394 | #endif /* AR9170_QUEUE_DEBUG */ | 393 | #endif /* AR9170_QUEUE_DEBUG */ |
395 | continue; | 394 | continue; |
@@ -400,8 +399,8 @@ static struct sk_buff *ar9170_get_queued_skb(struct ar9170 *ar, | |||
400 | 399 | ||
401 | if ((rate != AR9170_TX_INVALID_RATE) && (r != rate)) { | 400 | if ((rate != AR9170_TX_INVALID_RATE) && (r != rate)) { |
402 | #ifdef AR9170_QUEUE_DEBUG | 401 | #ifdef AR9170_QUEUE_DEBUG |
403 | printk(KERN_DEBUG "%s: skip frame => rate %d != %d\n", | 402 | wiphy_debug(ar->hw->wiphy, |
404 | wiphy_name(ar->hw->wiphy), rate, r); | 403 | "skip frame => rate %d != %d\n", rate, r); |
405 | ar9170_print_txheader(ar, skb); | 404 | ar9170_print_txheader(ar, skb); |
406 | #endif /* AR9170_QUEUE_DEBUG */ | 405 | #endif /* AR9170_QUEUE_DEBUG */ |
407 | continue; | 406 | continue; |
@@ -413,9 +412,9 @@ static struct sk_buff *ar9170_get_queued_skb(struct ar9170 *ar, | |||
413 | } | 412 | } |
414 | 413 | ||
415 | #ifdef AR9170_QUEUE_DEBUG | 414 | #ifdef AR9170_QUEUE_DEBUG |
416 | printk(KERN_ERR "%s: ESS:[%pM] does not have any " | 415 | wiphy_err(ar->hw->wiphy, |
417 | "outstanding frames in queue.\n", | 416 | "ESS:[%pM] does not have any outstanding frames in queue.\n", |
418 | wiphy_name(ar->hw->wiphy), mac); | 417 | mac); |
419 | __ar9170_dump_txqueue(ar, queue); | 418 | __ar9170_dump_txqueue(ar, queue); |
420 | #endif /* AR9170_QUEUE_DEBUG */ | 419 | #endif /* AR9170_QUEUE_DEBUG */ |
421 | spin_unlock_irqrestore(&queue->lock, flags); | 420 | spin_unlock_irqrestore(&queue->lock, flags); |
@@ -444,8 +443,8 @@ static void ar9170_tx_janitor(struct work_struct *work) | |||
444 | 443 | ||
445 | for (i = 0; i < __AR9170_NUM_TXQ; i++) { | 444 | for (i = 0; i < __AR9170_NUM_TXQ; i++) { |
446 | #ifdef AR9170_QUEUE_DEBUG | 445 | #ifdef AR9170_QUEUE_DEBUG |
447 | printk(KERN_DEBUG "%s: garbage collector scans queue:%d\n", | 446 | wiphy_debug(ar->hw->wiphy, "garbage collector scans queue:%d\n", |
448 | wiphy_name(ar->hw->wiphy), i); | 447 | i); |
449 | ar9170_dump_txqueue(ar, &ar->tx_pending[i]); | 448 | ar9170_dump_txqueue(ar, &ar->tx_pending[i]); |
450 | ar9170_dump_txqueue(ar, &ar->tx_status[i]); | 449 | ar9170_dump_txqueue(ar, &ar->tx_status[i]); |
451 | #endif /* AR9170_QUEUE_DEBUG */ | 450 | #endif /* AR9170_QUEUE_DEBUG */ |
@@ -495,8 +494,9 @@ void ar9170_handle_command_response(struct ar9170 *ar, void *buf, u32 len) | |||
495 | u32 q = (phy & AR9170_TX_PHY_QOS_MASK) >> | 494 | u32 q = (phy & AR9170_TX_PHY_QOS_MASK) >> |
496 | AR9170_TX_PHY_QOS_SHIFT; | 495 | AR9170_TX_PHY_QOS_SHIFT; |
497 | #ifdef AR9170_QUEUE_DEBUG | 496 | #ifdef AR9170_QUEUE_DEBUG |
498 | printk(KERN_DEBUG "%s: recv tx_status for %pM, p:%08x, q:%d\n", | 497 | wiphy_debug(ar->hw->wiphy, |
499 | wiphy_name(ar->hw->wiphy), cmd->tx_status.dst, phy, q); | 498 | "recv tx_status for %pm, p:%08x, q:%d\n", |
499 | cmd->tx_status.dst, phy, q); | ||
500 | #endif /* AR9170_QUEUE_DEBUG */ | 500 | #endif /* AR9170_QUEUE_DEBUG */ |
501 | 501 | ||
502 | skb = ar9170_get_queued_skb(ar, cmd->tx_status.dst, | 502 | skb = ar9170_get_queued_skb(ar, cmd->tx_status.dst, |
@@ -582,7 +582,7 @@ void ar9170_handle_command_response(struct ar9170 *ar, void *buf, u32 len) | |||
582 | break; | 582 | break; |
583 | 583 | ||
584 | default: | 584 | default: |
585 | printk(KERN_INFO "received unhandled event %x\n", cmd->type); | 585 | pr_info("received unhandled event %x\n", cmd->type); |
586 | print_hex_dump_bytes("dump:", DUMP_PREFIX_NONE, buf, len); | 586 | print_hex_dump_bytes("dump:", DUMP_PREFIX_NONE, buf, len); |
587 | break; | 587 | break; |
588 | } | 588 | } |
@@ -675,9 +675,9 @@ static int ar9170_rx_mac_status(struct ar9170 *ar, | |||
675 | /* TODO: update netdevice's RX dropped/errors statistics */ | 675 | /* TODO: update netdevice's RX dropped/errors statistics */ |
676 | 676 | ||
677 | if (ar9170_nag_limiter(ar)) | 677 | if (ar9170_nag_limiter(ar)) |
678 | printk(KERN_DEBUG "%s: received frame with " | 678 | wiphy_debug(ar->hw->wiphy, |
679 | "suspicious error code (%#x).\n", | 679 | "received frame with suspicious error code (%#x).\n", |
680 | wiphy_name(ar->hw->wiphy), error); | 680 | error); |
681 | 681 | ||
682 | return -EINVAL; | 682 | return -EINVAL; |
683 | } | 683 | } |
@@ -704,9 +704,9 @@ static int ar9170_rx_mac_status(struct ar9170 *ar, | |||
704 | break; | 704 | break; |
705 | default: | 705 | default: |
706 | if (ar9170_nag_limiter(ar)) | 706 | if (ar9170_nag_limiter(ar)) |
707 | printk(KERN_ERR "%s: invalid plcp cck rate " | 707 | wiphy_err(ar->hw->wiphy, |
708 | "(%x).\n", wiphy_name(ar->hw->wiphy), | 708 | "invalid plcp cck rate (%x).\n", |
709 | head->plcp[0]); | 709 | head->plcp[0]); |
710 | return -EINVAL; | 710 | return -EINVAL; |
711 | } | 711 | } |
712 | break; | 712 | break; |
@@ -740,9 +740,9 @@ static int ar9170_rx_mac_status(struct ar9170 *ar, | |||
740 | break; | 740 | break; |
741 | default: | 741 | default: |
742 | if (ar9170_nag_limiter(ar)) | 742 | if (ar9170_nag_limiter(ar)) |
743 | printk(KERN_ERR "%s: invalid plcp ofdm rate " | 743 | wiphy_err(ar->hw->wiphy, |
744 | "(%x).\n", wiphy_name(ar->hw->wiphy), | 744 | "invalid plcp ofdm rate (%x).\n", |
745 | head->plcp[0]); | 745 | head->plcp[0]); |
746 | return -EINVAL; | 746 | return -EINVAL; |
747 | } | 747 | } |
748 | if (status->band == IEEE80211_BAND_2GHZ) | 748 | if (status->band == IEEE80211_BAND_2GHZ) |
@@ -761,8 +761,7 @@ static int ar9170_rx_mac_status(struct ar9170 *ar, | |||
761 | 761 | ||
762 | default: | 762 | default: |
763 | if (ar9170_nag_limiter(ar)) | 763 | if (ar9170_nag_limiter(ar)) |
764 | printk(KERN_ERR "%s: invalid modulation\n", | 764 | wiphy_err(ar->hw->wiphy, "invalid modulation\n"); |
765 | wiphy_name(ar->hw->wiphy)); | ||
766 | return -EINVAL; | 765 | return -EINVAL; |
767 | } | 766 | } |
768 | 767 | ||
@@ -863,8 +862,8 @@ static void ar9170_handle_mpdu(struct ar9170 *ar, u8 *buf, int len) | |||
863 | ar->rx_mpdu.has_plcp = true; | 862 | ar->rx_mpdu.has_plcp = true; |
864 | } else { | 863 | } else { |
865 | if (ar9170_nag_limiter(ar)) | 864 | if (ar9170_nag_limiter(ar)) |
866 | printk(KERN_ERR "%s: plcp info is clipped.\n", | 865 | wiphy_err(ar->hw->wiphy, |
867 | wiphy_name(ar->hw->wiphy)); | 866 | "plcp info is clipped.\n"); |
868 | return ; | 867 | return ; |
869 | } | 868 | } |
870 | break; | 869 | break; |
@@ -877,8 +876,8 @@ static void ar9170_handle_mpdu(struct ar9170 *ar, u8 *buf, int len) | |||
877 | phy = (void *)(buf + mpdu_len); | 876 | phy = (void *)(buf + mpdu_len); |
878 | } else { | 877 | } else { |
879 | if (ar9170_nag_limiter(ar)) | 878 | if (ar9170_nag_limiter(ar)) |
880 | printk(KERN_ERR "%s: frame tail is clipped.\n", | 879 | wiphy_err(ar->hw->wiphy, |
881 | wiphy_name(ar->hw->wiphy)); | 880 | "frame tail is clipped.\n"); |
882 | return ; | 881 | return ; |
883 | } | 882 | } |
884 | 883 | ||
@@ -888,9 +887,8 @@ static void ar9170_handle_mpdu(struct ar9170 *ar, u8 *buf, int len) | |||
888 | if (!ar9170_nag_limiter(ar)) | 887 | if (!ar9170_nag_limiter(ar)) |
889 | return ; | 888 | return ; |
890 | 889 | ||
891 | printk(KERN_ERR "%s: rx stream did not start " | 890 | wiphy_err(ar->hw->wiphy, |
892 | "with a first_mpdu frame tag.\n", | 891 | "rx stream did not start with a first_mpdu frame tag.\n"); |
893 | wiphy_name(ar->hw->wiphy)); | ||
894 | 892 | ||
895 | return ; | 893 | return ; |
896 | } | 894 | } |
@@ -954,8 +952,8 @@ void ar9170_rx(struct ar9170 *ar, struct sk_buff *skb) | |||
954 | if (!ar->rx_failover_missing) { | 952 | if (!ar->rx_failover_missing) { |
955 | /* this is no "short read". */ | 953 | /* this is no "short read". */ |
956 | if (ar9170_nag_limiter(ar)) { | 954 | if (ar9170_nag_limiter(ar)) { |
957 | printk(KERN_ERR "%s: missing tag!\n", | 955 | wiphy_err(ar->hw->wiphy, |
958 | wiphy_name(ar->hw->wiphy)); | 956 | "missing tag!\n"); |
959 | goto err_telluser; | 957 | goto err_telluser; |
960 | } else | 958 | } else |
961 | goto err_silent; | 959 | goto err_silent; |
@@ -963,9 +961,8 @@ void ar9170_rx(struct ar9170 *ar, struct sk_buff *skb) | |||
963 | 961 | ||
964 | if (ar->rx_failover_missing > tlen) { | 962 | if (ar->rx_failover_missing > tlen) { |
965 | if (ar9170_nag_limiter(ar)) { | 963 | if (ar9170_nag_limiter(ar)) { |
966 | printk(KERN_ERR "%s: possible multi " | 964 | wiphy_err(ar->hw->wiphy, |
967 | "stream corruption!\n", | 965 | "possible multi stream corruption!\n"); |
968 | wiphy_name(ar->hw->wiphy)); | ||
969 | goto err_telluser; | 966 | goto err_telluser; |
970 | } else | 967 | } else |
971 | goto err_silent; | 968 | goto err_silent; |
@@ -997,9 +994,8 @@ void ar9170_rx(struct ar9170 *ar, struct sk_buff *skb) | |||
997 | if (ar->rx_failover_missing) { | 994 | if (ar->rx_failover_missing) { |
998 | /* TODO: handle double stream corruption. */ | 995 | /* TODO: handle double stream corruption. */ |
999 | if (ar9170_nag_limiter(ar)) { | 996 | if (ar9170_nag_limiter(ar)) { |
1000 | printk(KERN_ERR "%s: double rx stream " | 997 | wiphy_err(ar->hw->wiphy, |
1001 | "corruption!\n", | 998 | "double rx stream corruption!\n"); |
1002 | wiphy_name(ar->hw->wiphy)); | ||
1003 | goto err_telluser; | 999 | goto err_telluser; |
1004 | } else | 1000 | } else |
1005 | goto err_silent; | 1001 | goto err_silent; |
@@ -1042,9 +1038,9 @@ void ar9170_rx(struct ar9170 *ar, struct sk_buff *skb) | |||
1042 | 1038 | ||
1043 | if (tlen) { | 1039 | if (tlen) { |
1044 | if (net_ratelimit()) | 1040 | if (net_ratelimit()) |
1045 | printk(KERN_ERR "%s: %d bytes of unprocessed " | 1041 | wiphy_err(ar->hw->wiphy, |
1046 | "data left in rx stream!\n", | 1042 | "%d bytes of unprocessed data left in rx stream!\n", |
1047 | wiphy_name(ar->hw->wiphy), tlen); | 1043 | tlen); |
1048 | 1044 | ||
1049 | goto err_telluser; | 1045 | goto err_telluser; |
1050 | } | 1046 | } |
@@ -1052,10 +1048,9 @@ void ar9170_rx(struct ar9170 *ar, struct sk_buff *skb) | |||
1052 | return ; | 1048 | return ; |
1053 | 1049 | ||
1054 | err_telluser: | 1050 | err_telluser: |
1055 | printk(KERN_ERR "%s: damaged RX stream data [want:%d, " | 1051 | wiphy_err(ar->hw->wiphy, |
1056 | "data:%d, rx:%d, pending:%d ]\n", | 1052 | "damaged RX stream data [want:%d, data:%d, rx:%d, pending:%d ]\n", |
1057 | wiphy_name(ar->hw->wiphy), clen, wlen, tlen, | 1053 | clen, wlen, tlen, ar->rx_failover_missing); |
1058 | ar->rx_failover_missing); | ||
1059 | 1054 | ||
1060 | if (ar->rx_failover_missing) | 1055 | if (ar->rx_failover_missing) |
1061 | print_hex_dump_bytes("rxbuf:", DUMP_PREFIX_OFFSET, | 1056 | print_hex_dump_bytes("rxbuf:", DUMP_PREFIX_OFFSET, |
@@ -1065,9 +1060,8 @@ err_telluser: | |||
1065 | print_hex_dump_bytes("stream:", DUMP_PREFIX_OFFSET, | 1060 | print_hex_dump_bytes("stream:", DUMP_PREFIX_OFFSET, |
1066 | skb->data, skb->len); | 1061 | skb->data, skb->len); |
1067 | 1062 | ||
1068 | printk(KERN_ERR "%s: please check your hardware and cables, if " | 1063 | wiphy_err(ar->hw->wiphy, |
1069 | "you see this message frequently.\n", | 1064 | "If you see this message frequently, please check your hardware and cables.\n"); |
1070 | wiphy_name(ar->hw->wiphy)); | ||
1071 | 1065 | ||
1072 | err_silent: | 1066 | err_silent: |
1073 | if (ar->rx_failover_missing) { | 1067 | if (ar->rx_failover_missing) { |
@@ -1384,10 +1378,10 @@ static void ar9170_tx(struct ar9170 *ar) | |||
1384 | 1378 | ||
1385 | if (remaining_space < frames) { | 1379 | if (remaining_space < frames) { |
1386 | #ifdef AR9170_QUEUE_DEBUG | 1380 | #ifdef AR9170_QUEUE_DEBUG |
1387 | printk(KERN_DEBUG "%s: tx quota reached queue:%d, " | 1381 | wiphy_debug(ar->hw->wiphy, |
1388 | "remaining slots:%d, needed:%d\n", | 1382 | "tx quota reached queue:%d, " |
1389 | wiphy_name(ar->hw->wiphy), i, remaining_space, | 1383 | "remaining slots:%d, needed:%d\n", |
1390 | frames); | 1384 | i, remaining_space, frames); |
1391 | #endif /* AR9170_QUEUE_DEBUG */ | 1385 | #endif /* AR9170_QUEUE_DEBUG */ |
1392 | frames = remaining_space; | 1386 | frames = remaining_space; |
1393 | } | 1387 | } |
@@ -1396,18 +1390,14 @@ static void ar9170_tx(struct ar9170 *ar) | |||
1396 | ar->tx_stats[i].count += frames; | 1390 | ar->tx_stats[i].count += frames; |
1397 | if (ar->tx_stats[i].len >= ar->tx_stats[i].limit) { | 1391 | if (ar->tx_stats[i].len >= ar->tx_stats[i].limit) { |
1398 | #ifdef AR9170_QUEUE_DEBUG | 1392 | #ifdef AR9170_QUEUE_DEBUG |
1399 | printk(KERN_DEBUG "%s: queue %d full\n", | 1393 | wiphy_debug(ar->hw->wiphy, "queue %d full\n", i); |
1400 | wiphy_name(ar->hw->wiphy), i); | 1394 | wiphy_debug(ar->hw->wiphy, "stuck frames: ===>\n"); |
1401 | |||
1402 | printk(KERN_DEBUG "%s: stuck frames: ===>\n", | ||
1403 | wiphy_name(ar->hw->wiphy)); | ||
1404 | ar9170_dump_txqueue(ar, &ar->tx_pending[i]); | 1395 | ar9170_dump_txqueue(ar, &ar->tx_pending[i]); |
1405 | ar9170_dump_txqueue(ar, &ar->tx_status[i]); | 1396 | ar9170_dump_txqueue(ar, &ar->tx_status[i]); |
1406 | #endif /* AR9170_QUEUE_DEBUG */ | 1397 | #endif /* AR9170_QUEUE_DEBUG */ |
1407 | 1398 | ||
1408 | #ifdef AR9170_QUEUE_STOP_DEBUG | 1399 | #ifdef AR9170_QUEUE_STOP_DEBUG |
1409 | printk(KERN_DEBUG "%s: stop queue %d\n", | 1400 | wiphy_debug(ar->hw->wiphy, "stop queue %d\n", i); |
1410 | wiphy_name(ar->hw->wiphy), i); | ||
1411 | __ar9170_dump_txstats(ar); | 1401 | __ar9170_dump_txstats(ar); |
1412 | #endif /* AR9170_QUEUE_STOP_DEBUG */ | 1402 | #endif /* AR9170_QUEUE_STOP_DEBUG */ |
1413 | ieee80211_stop_queue(ar->hw, i); | 1403 | ieee80211_stop_queue(ar->hw, i); |
@@ -1435,8 +1425,7 @@ static void ar9170_tx(struct ar9170 *ar) | |||
1435 | msecs_to_jiffies(AR9170_TX_TIMEOUT); | 1425 | msecs_to_jiffies(AR9170_TX_TIMEOUT); |
1436 | 1426 | ||
1437 | #ifdef AR9170_QUEUE_DEBUG | 1427 | #ifdef AR9170_QUEUE_DEBUG |
1438 | printk(KERN_DEBUG "%s: send frame q:%d =>\n", | 1428 | wiphy_debug(ar->hw->wiphy, "send frame q:%d =>\n", i); |
1439 | wiphy_name(ar->hw->wiphy), i); | ||
1440 | ar9170_print_txheader(ar, skb); | 1429 | ar9170_print_txheader(ar, skb); |
1441 | #endif /* AR9170_QUEUE_DEBUG */ | 1430 | #endif /* AR9170_QUEUE_DEBUG */ |
1442 | 1431 | ||
@@ -1453,26 +1442,25 @@ static void ar9170_tx(struct ar9170 *ar) | |||
1453 | } | 1442 | } |
1454 | 1443 | ||
1455 | #ifdef AR9170_QUEUE_DEBUG | 1444 | #ifdef AR9170_QUEUE_DEBUG |
1456 | printk(KERN_DEBUG "%s: ar9170_tx report for queue %d\n", | 1445 | wiphy_debug(ar->hw->wiphy, |
1457 | wiphy_name(ar->hw->wiphy), i); | 1446 | "ar9170_tx report for queue %d\n", i); |
1458 | 1447 | ||
1459 | printk(KERN_DEBUG "%s: unprocessed pending frames left:\n", | 1448 | wiphy_debug(ar->hw->wiphy, |
1460 | wiphy_name(ar->hw->wiphy)); | 1449 | "unprocessed pending frames left:\n"); |
1461 | ar9170_dump_txqueue(ar, &ar->tx_pending[i]); | 1450 | ar9170_dump_txqueue(ar, &ar->tx_pending[i]); |
1462 | #endif /* AR9170_QUEUE_DEBUG */ | 1451 | #endif /* AR9170_QUEUE_DEBUG */ |
1463 | 1452 | ||
1464 | if (unlikely(frames_failed)) { | 1453 | if (unlikely(frames_failed)) { |
1465 | #ifdef AR9170_QUEUE_DEBUG | 1454 | #ifdef AR9170_QUEUE_DEBUG |
1466 | printk(KERN_DEBUG "%s: frames failed %d =>\n", | 1455 | wiphy_debug(ar->hw->wiphy, |
1467 | wiphy_name(ar->hw->wiphy), frames_failed); | 1456 | "frames failed %d =>\n", frames_failed); |
1468 | #endif /* AR9170_QUEUE_DEBUG */ | 1457 | #endif /* AR9170_QUEUE_DEBUG */ |
1469 | 1458 | ||
1470 | spin_lock_irqsave(&ar->tx_stats_lock, flags); | 1459 | spin_lock_irqsave(&ar->tx_stats_lock, flags); |
1471 | ar->tx_stats[i].len -= frames_failed; | 1460 | ar->tx_stats[i].len -= frames_failed; |
1472 | ar->tx_stats[i].count -= frames_failed; | 1461 | ar->tx_stats[i].count -= frames_failed; |
1473 | #ifdef AR9170_QUEUE_STOP_DEBUG | 1462 | #ifdef AR9170_QUEUE_STOP_DEBUG |
1474 | printk(KERN_DEBUG "%s: wake queue %d\n", | 1463 | wiphy_debug(ar->hw->wiphy, "wake queue %d\n", i); |
1475 | wiphy_name(ar->hw->wiphy), i); | ||
1476 | __ar9170_dump_txstats(ar); | 1464 | __ar9170_dump_txstats(ar); |
1477 | #endif /* AR9170_QUEUE_STOP_DEBUG */ | 1465 | #endif /* AR9170_QUEUE_STOP_DEBUG */ |
1478 | ieee80211_wake_queue(ar->hw, i); | 1466 | ieee80211_wake_queue(ar->hw, i); |
diff --git a/drivers/net/wireless/ath/ar9170/phy.c b/drivers/net/wireless/ath/ar9170/phy.c index 45a415ea809a..0dbfcf79ac96 100644 --- a/drivers/net/wireless/ath/ar9170/phy.c +++ b/drivers/net/wireless/ath/ar9170/phy.c | |||
@@ -670,8 +670,7 @@ static int ar9170_init_rf_banks_0_7(struct ar9170 *ar, bool band5ghz) | |||
670 | ar9170_regwrite_finish(); | 670 | ar9170_regwrite_finish(); |
671 | err = ar9170_regwrite_result(); | 671 | err = ar9170_regwrite_result(); |
672 | if (err) | 672 | if (err) |
673 | printk(KERN_ERR "%s: rf init failed\n", | 673 | wiphy_err(ar->hw->wiphy, "rf init failed\n"); |
674 | wiphy_name(ar->hw->wiphy)); | ||
675 | return err; | 674 | return err; |
676 | } | 675 | } |
677 | 676 | ||
@@ -1702,9 +1701,8 @@ int ar9170_set_channel(struct ar9170 *ar, struct ieee80211_channel *channel, | |||
1702 | 0x200 | ar->phy_heavy_clip); | 1701 | 0x200 | ar->phy_heavy_clip); |
1703 | if (err) { | 1702 | if (err) { |
1704 | if (ar9170_nag_limiter(ar)) | 1703 | if (ar9170_nag_limiter(ar)) |
1705 | printk(KERN_ERR "%s: failed to set " | 1704 | wiphy_err(ar->hw->wiphy, |
1706 | "heavy clip\n", | 1705 | "failed to set heavy clip\n"); |
1707 | wiphy_name(ar->hw->wiphy)); | ||
1708 | } | 1706 | } |
1709 | } | 1707 | } |
1710 | 1708 | ||