aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/debug.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/debug.c227
1 files changed, 122 insertions, 105 deletions
diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c
index 4cccc29964f6..0bf7313b8a17 100644
--- a/drivers/net/wireless/ath/ath5k/debug.c
+++ b/drivers/net/wireless/ath/ath5k/debug.c
@@ -71,8 +71,6 @@ module_param_named(debug, ath5k_debug, uint, 0);
71#include "reg.h" 71#include "reg.h"
72#include "ani.h" 72#include "ani.h"
73 73
74static struct dentry *ath5k_global_debugfs;
75
76static int ath5k_debugfs_open(struct inode *inode, struct file *file) 74static int ath5k_debugfs_open(struct inode *inode, struct file *file)
77{ 75{
78 file->private_data = inode->i_private; 76 file->private_data = inode->i_private;
@@ -271,6 +269,7 @@ static const struct file_operations fops_beacon = {
271 .write = write_file_beacon, 269 .write = write_file_beacon,
272 .open = ath5k_debugfs_open, 270 .open = ath5k_debugfs_open,
273 .owner = THIS_MODULE, 271 .owner = THIS_MODULE,
272 .llseek = default_llseek,
274}; 273};
275 274
276 275
@@ -290,6 +289,7 @@ static const struct file_operations fops_reset = {
290 .write = write_file_reset, 289 .write = write_file_reset,
291 .open = ath5k_debugfs_open, 290 .open = ath5k_debugfs_open,
292 .owner = THIS_MODULE, 291 .owner = THIS_MODULE,
292 .llseek = noop_llseek,
293}; 293};
294 294
295 295
@@ -308,10 +308,10 @@ static const struct {
308 { ATH5K_DEBUG_CALIBRATE, "calib", "periodic calibration" }, 308 { ATH5K_DEBUG_CALIBRATE, "calib", "periodic calibration" },
309 { ATH5K_DEBUG_TXPOWER, "txpower", "transmit power setting" }, 309 { ATH5K_DEBUG_TXPOWER, "txpower", "transmit power setting" },
310 { ATH5K_DEBUG_LED, "led", "LED management" }, 310 { ATH5K_DEBUG_LED, "led", "LED management" },
311 { ATH5K_DEBUG_DUMP_RX, "dumprx", "print received skb content" },
312 { ATH5K_DEBUG_DUMP_TX, "dumptx", "print transmit skb content" },
313 { ATH5K_DEBUG_DUMPBANDS, "dumpbands", "dump bands" }, 311 { ATH5K_DEBUG_DUMPBANDS, "dumpbands", "dump bands" },
312 { ATH5K_DEBUG_DMA, "dma", "dma start/stop" },
314 { ATH5K_DEBUG_ANI, "ani", "adaptive noise immunity" }, 313 { ATH5K_DEBUG_ANI, "ani", "adaptive noise immunity" },
314 { ATH5K_DEBUG_DESC, "desc", "descriptor chains" },
315 { ATH5K_DEBUG_ANY, "all", "show all debug levels" }, 315 { ATH5K_DEBUG_ANY, "all", "show all debug levels" },
316}; 316};
317 317
@@ -369,6 +369,7 @@ static const struct file_operations fops_debug = {
369 .write = write_file_debug, 369 .write = write_file_debug,
370 .open = ath5k_debugfs_open, 370 .open = ath5k_debugfs_open,
371 .owner = THIS_MODULE, 371 .owner = THIS_MODULE,
372 .llseek = default_llseek,
372}; 373};
373 374
374 375
@@ -480,6 +481,61 @@ static const struct file_operations fops_antenna = {
480 .write = write_file_antenna, 481 .write = write_file_antenna,
481 .open = ath5k_debugfs_open, 482 .open = ath5k_debugfs_open,
482 .owner = THIS_MODULE, 483 .owner = THIS_MODULE,
484 .llseek = default_llseek,
485};
486
487/* debugfs: misc */
488
489static ssize_t read_file_misc(struct file *file, char __user *user_buf,
490 size_t count, loff_t *ppos)
491{
492 struct ath5k_softc *sc = file->private_data;
493 char buf[700];
494 unsigned int len = 0;
495 u32 filt = ath5k_hw_get_rx_filter(sc->ah);
496
497 len += snprintf(buf+len, sizeof(buf)-len, "bssid-mask: %pM\n",
498 sc->bssidmask);
499 len += snprintf(buf+len, sizeof(buf)-len, "filter-flags: 0x%x ",
500 filt);
501 if (filt & AR5K_RX_FILTER_UCAST)
502 len += snprintf(buf+len, sizeof(buf)-len, " UCAST");
503 if (filt & AR5K_RX_FILTER_MCAST)
504 len += snprintf(buf+len, sizeof(buf)-len, " MCAST");
505 if (filt & AR5K_RX_FILTER_BCAST)
506 len += snprintf(buf+len, sizeof(buf)-len, " BCAST");
507 if (filt & AR5K_RX_FILTER_CONTROL)
508 len += snprintf(buf+len, sizeof(buf)-len, " CONTROL");
509 if (filt & AR5K_RX_FILTER_BEACON)
510 len += snprintf(buf+len, sizeof(buf)-len, " BEACON");
511 if (filt & AR5K_RX_FILTER_PROM)
512 len += snprintf(buf+len, sizeof(buf)-len, " PROM");
513 if (filt & AR5K_RX_FILTER_XRPOLL)
514 len += snprintf(buf+len, sizeof(buf)-len, " XRPOLL");
515 if (filt & AR5K_RX_FILTER_PROBEREQ)
516 len += snprintf(buf+len, sizeof(buf)-len, " PROBEREQ");
517 if (filt & AR5K_RX_FILTER_PHYERR_5212)
518 len += snprintf(buf+len, sizeof(buf)-len, " PHYERR-5212");
519 if (filt & AR5K_RX_FILTER_RADARERR_5212)
520 len += snprintf(buf+len, sizeof(buf)-len, " RADARERR-5212");
521 if (filt & AR5K_RX_FILTER_PHYERR_5211)
522 snprintf(buf+len, sizeof(buf)-len, " PHYERR-5211");
523 if (filt & AR5K_RX_FILTER_RADARERR_5211)
524 len += snprintf(buf+len, sizeof(buf)-len, " RADARERR-5211");
525
526 len += snprintf(buf+len, sizeof(buf)-len, "\nopmode: %s (%d)\n",
527 ath_opmode_to_string(sc->opmode), sc->opmode);
528
529 if (len > sizeof(buf))
530 len = sizeof(buf);
531
532 return simple_read_from_buffer(user_buf, count, ppos, buf, len);
533}
534
535static const struct file_operations fops_misc = {
536 .read = read_file_misc,
537 .open = ath5k_debugfs_open,
538 .owner = THIS_MODULE,
483}; 539};
484 540
485 541
@@ -496,60 +552,64 @@ static ssize_t read_file_frameerrors(struct file *file, char __user *user_buf,
496 552
497 len += snprintf(buf+len, sizeof(buf)-len, 553 len += snprintf(buf+len, sizeof(buf)-len,
498 "RX\n---------------------\n"); 554 "RX\n---------------------\n");
499 len += snprintf(buf+len, sizeof(buf)-len, "CRC\t%d\t(%d%%)\n", 555 len += snprintf(buf+len, sizeof(buf)-len, "CRC\t%u\t(%u%%)\n",
500 st->rxerr_crc, 556 st->rxerr_crc,
501 st->rx_all_count > 0 ? 557 st->rx_all_count > 0 ?
502 st->rxerr_crc*100/st->rx_all_count : 0); 558 st->rxerr_crc*100/st->rx_all_count : 0);
503 len += snprintf(buf+len, sizeof(buf)-len, "PHY\t%d\t(%d%%)\n", 559 len += snprintf(buf+len, sizeof(buf)-len, "PHY\t%u\t(%u%%)\n",
504 st->rxerr_phy, 560 st->rxerr_phy,
505 st->rx_all_count > 0 ? 561 st->rx_all_count > 0 ?
506 st->rxerr_phy*100/st->rx_all_count : 0); 562 st->rxerr_phy*100/st->rx_all_count : 0);
507 for (i = 0; i < 32; i++) { 563 for (i = 0; i < 32; i++) {
508 if (st->rxerr_phy_code[i]) 564 if (st->rxerr_phy_code[i])
509 len += snprintf(buf+len, sizeof(buf)-len, 565 len += snprintf(buf+len, sizeof(buf)-len,
510 " phy_err[%d]\t%d\n", 566 " phy_err[%u]\t%u\n",
511 i, st->rxerr_phy_code[i]); 567 i, st->rxerr_phy_code[i]);
512 } 568 }
513 569
514 len += snprintf(buf+len, sizeof(buf)-len, "FIFO\t%d\t(%d%%)\n", 570 len += snprintf(buf+len, sizeof(buf)-len, "FIFO\t%u\t(%u%%)\n",
515 st->rxerr_fifo, 571 st->rxerr_fifo,
516 st->rx_all_count > 0 ? 572 st->rx_all_count > 0 ?
517 st->rxerr_fifo*100/st->rx_all_count : 0); 573 st->rxerr_fifo*100/st->rx_all_count : 0);
518 len += snprintf(buf+len, sizeof(buf)-len, "decrypt\t%d\t(%d%%)\n", 574 len += snprintf(buf+len, sizeof(buf)-len, "decrypt\t%u\t(%u%%)\n",
519 st->rxerr_decrypt, 575 st->rxerr_decrypt,
520 st->rx_all_count > 0 ? 576 st->rx_all_count > 0 ?
521 st->rxerr_decrypt*100/st->rx_all_count : 0); 577 st->rxerr_decrypt*100/st->rx_all_count : 0);
522 len += snprintf(buf+len, sizeof(buf)-len, "MIC\t%d\t(%d%%)\n", 578 len += snprintf(buf+len, sizeof(buf)-len, "MIC\t%u\t(%u%%)\n",
523 st->rxerr_mic, 579 st->rxerr_mic,
524 st->rx_all_count > 0 ? 580 st->rx_all_count > 0 ?
525 st->rxerr_mic*100/st->rx_all_count : 0); 581 st->rxerr_mic*100/st->rx_all_count : 0);
526 len += snprintf(buf+len, sizeof(buf)-len, "process\t%d\t(%d%%)\n", 582 len += snprintf(buf+len, sizeof(buf)-len, "process\t%u\t(%u%%)\n",
527 st->rxerr_proc, 583 st->rxerr_proc,
528 st->rx_all_count > 0 ? 584 st->rx_all_count > 0 ?
529 st->rxerr_proc*100/st->rx_all_count : 0); 585 st->rxerr_proc*100/st->rx_all_count : 0);
530 len += snprintf(buf+len, sizeof(buf)-len, "jumbo\t%d\t(%d%%)\n", 586 len += snprintf(buf+len, sizeof(buf)-len, "jumbo\t%u\t(%u%%)\n",
531 st->rxerr_jumbo, 587 st->rxerr_jumbo,
532 st->rx_all_count > 0 ? 588 st->rx_all_count > 0 ?
533 st->rxerr_jumbo*100/st->rx_all_count : 0); 589 st->rxerr_jumbo*100/st->rx_all_count : 0);
534 len += snprintf(buf+len, sizeof(buf)-len, "[RX all\t%d]\n", 590 len += snprintf(buf+len, sizeof(buf)-len, "[RX all\t%u]\n",
535 st->rx_all_count); 591 st->rx_all_count);
592 len += snprintf(buf+len, sizeof(buf)-len, "RX-all-bytes\t%u\n",
593 st->rx_bytes_count);
536 594
537 len += snprintf(buf+len, sizeof(buf)-len, 595 len += snprintf(buf+len, sizeof(buf)-len,
538 "\nTX\n---------------------\n"); 596 "\nTX\n---------------------\n");
539 len += snprintf(buf+len, sizeof(buf)-len, "retry\t%d\t(%d%%)\n", 597 len += snprintf(buf+len, sizeof(buf)-len, "retry\t%u\t(%u%%)\n",
540 st->txerr_retry, 598 st->txerr_retry,
541 st->tx_all_count > 0 ? 599 st->tx_all_count > 0 ?
542 st->txerr_retry*100/st->tx_all_count : 0); 600 st->txerr_retry*100/st->tx_all_count : 0);
543 len += snprintf(buf+len, sizeof(buf)-len, "FIFO\t%d\t(%d%%)\n", 601 len += snprintf(buf+len, sizeof(buf)-len, "FIFO\t%u\t(%u%%)\n",
544 st->txerr_fifo, 602 st->txerr_fifo,
545 st->tx_all_count > 0 ? 603 st->tx_all_count > 0 ?
546 st->txerr_fifo*100/st->tx_all_count : 0); 604 st->txerr_fifo*100/st->tx_all_count : 0);
547 len += snprintf(buf+len, sizeof(buf)-len, "filter\t%d\t(%d%%)\n", 605 len += snprintf(buf+len, sizeof(buf)-len, "filter\t%u\t(%u%%)\n",
548 st->txerr_filt, 606 st->txerr_filt,
549 st->tx_all_count > 0 ? 607 st->tx_all_count > 0 ?
550 st->txerr_filt*100/st->tx_all_count : 0); 608 st->txerr_filt*100/st->tx_all_count : 0);
551 len += snprintf(buf+len, sizeof(buf)-len, "[TX all\t%d]\n", 609 len += snprintf(buf+len, sizeof(buf)-len, "[TX all\t%u]\n",
552 st->tx_all_count); 610 st->tx_all_count);
611 len += snprintf(buf+len, sizeof(buf)-len, "TX-all-bytes\t%u\n",
612 st->tx_bytes_count);
553 613
554 if (len > sizeof(buf)) 614 if (len > sizeof(buf))
555 len = sizeof(buf); 615 len = sizeof(buf);
@@ -591,6 +651,7 @@ static const struct file_operations fops_frameerrors = {
591 .write = write_file_frameerrors, 651 .write = write_file_frameerrors,
592 .open = ath5k_debugfs_open, 652 .open = ath5k_debugfs_open,
593 .owner = THIS_MODULE, 653 .owner = THIS_MODULE,
654 .llseek = default_llseek,
594}; 655};
595 656
596 657
@@ -656,21 +717,22 @@ static ssize_t read_file_ani(struct file *file, char __user *user_buf,
656 st->mib_intr); 717 st->mib_intr);
657 len += snprintf(buf+len, sizeof(buf)-len, 718 len += snprintf(buf+len, sizeof(buf)-len,
658 "beacon RSSI average:\t%d\n", 719 "beacon RSSI average:\t%d\n",
659 sc->ah->ah_beacon_rssi_avg.avg); 720 (int)ewma_read(&sc->ah->ah_beacon_rssi_avg));
721
722#define CC_PRINT(_struct, _field) \
723 _struct._field, \
724 _struct.cycles > 0 ? \
725 _struct._field*100/_struct.cycles : 0
726
660 len += snprintf(buf+len, sizeof(buf)-len, "profcnt tx\t\t%u\t(%d%%)\n", 727 len += snprintf(buf+len, sizeof(buf)-len, "profcnt tx\t\t%u\t(%d%%)\n",
661 as->pfc_tx, 728 CC_PRINT(as->last_cc, tx_frame));
662 as->pfc_cycles > 0 ?
663 as->pfc_tx*100/as->pfc_cycles : 0);
664 len += snprintf(buf+len, sizeof(buf)-len, "profcnt rx\t\t%u\t(%d%%)\n", 729 len += snprintf(buf+len, sizeof(buf)-len, "profcnt rx\t\t%u\t(%d%%)\n",
665 as->pfc_rx, 730 CC_PRINT(as->last_cc, rx_frame));
666 as->pfc_cycles > 0 ?
667 as->pfc_rx*100/as->pfc_cycles : 0);
668 len += snprintf(buf+len, sizeof(buf)-len, "profcnt busy\t\t%u\t(%d%%)\n", 731 len += snprintf(buf+len, sizeof(buf)-len, "profcnt busy\t\t%u\t(%d%%)\n",
669 as->pfc_busy, 732 CC_PRINT(as->last_cc, rx_busy));
670 as->pfc_cycles > 0 ? 733#undef CC_PRINT
671 as->pfc_busy*100/as->pfc_cycles : 0);
672 len += snprintf(buf+len, sizeof(buf)-len, "profcnt cycles\t\t%u\n", 734 len += snprintf(buf+len, sizeof(buf)-len, "profcnt cycles\t\t%u\n",
673 as->pfc_cycles); 735 as->last_cc.cycles);
674 len += snprintf(buf+len, sizeof(buf)-len, 736 len += snprintf(buf+len, sizeof(buf)-len,
675 "listen time\t\t%d\tlast: %d\n", 737 "listen time\t\t%d\tlast: %d\n",
676 as->listen_time, as->last_listen); 738 as->listen_time, as->last_listen);
@@ -748,6 +810,7 @@ static const struct file_operations fops_ani = {
748 .write = write_file_ani, 810 .write = write_file_ani,
749 .open = ath5k_debugfs_open, 811 .open = ath5k_debugfs_open,
750 .owner = THIS_MODULE, 812 .owner = THIS_MODULE,
813 .llseek = default_llseek,
751}; 814};
752 815
753 816
@@ -762,7 +825,7 @@ static ssize_t read_file_queue(struct file *file, char __user *user_buf,
762 825
763 struct ath5k_txq *txq; 826 struct ath5k_txq *txq;
764 struct ath5k_buf *bf, *bf0; 827 struct ath5k_buf *bf, *bf0;
765 int i, n = 0; 828 int i, n;
766 829
767 len += snprintf(buf+len, sizeof(buf)-len, 830 len += snprintf(buf+len, sizeof(buf)-len,
768 "available txbuffers: %d\n", sc->txbuf_len); 831 "available txbuffers: %d\n", sc->txbuf_len);
@@ -776,9 +839,16 @@ static ssize_t read_file_queue(struct file *file, char __user *user_buf,
776 if (!txq->setup) 839 if (!txq->setup)
777 continue; 840 continue;
778 841
842 n = 0;
843 spin_lock_bh(&txq->lock);
779 list_for_each_entry_safe(bf, bf0, &txq->q, list) 844 list_for_each_entry_safe(bf, bf0, &txq->q, list)
780 n++; 845 n++;
781 len += snprintf(buf+len, sizeof(buf)-len, " len: %d\n", n); 846 spin_unlock_bh(&txq->lock);
847
848 len += snprintf(buf+len, sizeof(buf)-len,
849 " len: %d bufs: %d\n", txq->txq_len, n);
850 len += snprintf(buf+len, sizeof(buf)-len,
851 " stuck: %d\n", txq->txq_stuck);
782 } 852 }
783 853
784 if (len > sizeof(buf)) 854 if (len > sizeof(buf))
@@ -811,80 +881,45 @@ static const struct file_operations fops_queue = {
811 .write = write_file_queue, 881 .write = write_file_queue,
812 .open = ath5k_debugfs_open, 882 .open = ath5k_debugfs_open,
813 .owner = THIS_MODULE, 883 .owner = THIS_MODULE,
884 .llseek = default_llseek,
814}; 885};
815 886
816 887
817/* init */
818
819void
820ath5k_debug_init(void)
821{
822 ath5k_global_debugfs = debugfs_create_dir("ath5k", NULL);
823}
824
825void 888void
826ath5k_debug_init_device(struct ath5k_softc *sc) 889ath5k_debug_init_device(struct ath5k_softc *sc)
827{ 890{
891 struct dentry *phydir;
892
828 sc->debug.level = ath5k_debug; 893 sc->debug.level = ath5k_debug;
829 894
830 sc->debug.debugfs_phydir = debugfs_create_dir(wiphy_name(sc->hw->wiphy), 895 phydir = debugfs_create_dir("ath5k", sc->hw->wiphy->debugfsdir);
831 ath5k_global_debugfs); 896 if (!phydir)
897 return;
832 898
833 sc->debug.debugfs_debug = debugfs_create_file("debug", 899 debugfs_create_file("debug", S_IWUSR | S_IRUSR, phydir, sc,
834 S_IWUSR | S_IRUSR, 900 &fops_debug);
835 sc->debug.debugfs_phydir, sc, &fops_debug);
836 901
837 sc->debug.debugfs_registers = debugfs_create_file("registers", S_IRUSR, 902 debugfs_create_file("registers", S_IRUSR, phydir, sc, &fops_registers);
838 sc->debug.debugfs_phydir, sc, &fops_registers);
839 903
840 sc->debug.debugfs_beacon = debugfs_create_file("beacon", 904 debugfs_create_file("beacon", S_IWUSR | S_IRUSR, phydir, sc,
841 S_IWUSR | S_IRUSR, 905 &fops_beacon);
842 sc->debug.debugfs_phydir, sc, &fops_beacon);
843 906
844 sc->debug.debugfs_reset = debugfs_create_file("reset", S_IWUSR, 907 debugfs_create_file("reset", S_IWUSR, phydir, sc, &fops_reset);
845 sc->debug.debugfs_phydir, sc, &fops_reset);
846 908
847 sc->debug.debugfs_antenna = debugfs_create_file("antenna", 909 debugfs_create_file("antenna", S_IWUSR | S_IRUSR, phydir, sc,
848 S_IWUSR | S_IRUSR, 910 &fops_antenna);
849 sc->debug.debugfs_phydir, sc, &fops_antenna);
850 911
851 sc->debug.debugfs_frameerrors = debugfs_create_file("frameerrors", 912 debugfs_create_file("misc", S_IRUSR, phydir, sc, &fops_misc);
852 S_IWUSR | S_IRUSR,
853 sc->debug.debugfs_phydir, sc,
854 &fops_frameerrors);
855 913
856 sc->debug.debugfs_ani = debugfs_create_file("ani", 914 debugfs_create_file("frameerrors", S_IWUSR | S_IRUSR, phydir, sc,
857 S_IWUSR | S_IRUSR, 915 &fops_frameerrors);
858 sc->debug.debugfs_phydir, sc,
859 &fops_ani);
860 916
861 sc->debug.debugfs_queue = debugfs_create_file("queue", 917 debugfs_create_file("ani", S_IWUSR | S_IRUSR, phydir, sc, &fops_ani);
862 S_IWUSR | S_IRUSR,
863 sc->debug.debugfs_phydir, sc,
864 &fops_queue);
865}
866 918
867void 919 debugfs_create_file("queue", S_IWUSR | S_IRUSR, phydir, sc,
868ath5k_debug_finish(void) 920 &fops_queue);
869{
870 debugfs_remove(ath5k_global_debugfs);
871} 921}
872 922
873void
874ath5k_debug_finish_device(struct ath5k_softc *sc)
875{
876 debugfs_remove(sc->debug.debugfs_debug);
877 debugfs_remove(sc->debug.debugfs_registers);
878 debugfs_remove(sc->debug.debugfs_beacon);
879 debugfs_remove(sc->debug.debugfs_reset);
880 debugfs_remove(sc->debug.debugfs_antenna);
881 debugfs_remove(sc->debug.debugfs_frameerrors);
882 debugfs_remove(sc->debug.debugfs_ani);
883 debugfs_remove(sc->debug.debugfs_queue);
884 debugfs_remove(sc->debug.debugfs_phydir);
885}
886
887
888/* functions used in other places */ 923/* functions used in other places */
889 924
890void 925void
@@ -955,7 +990,7 @@ ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah)
955 struct ath5k_rx_status rs = {}; 990 struct ath5k_rx_status rs = {};
956 int status; 991 int status;
957 992
958 if (likely(!(sc->debug.level & ATH5K_DEBUG_RESET))) 993 if (likely(!(sc->debug.level & ATH5K_DEBUG_DESC)))
959 return; 994 return;
960 995
961 printk(KERN_DEBUG "rxdp %x, rxlink %p\n", 996 printk(KERN_DEBUG "rxdp %x, rxlink %p\n",
@@ -972,24 +1007,6 @@ ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah)
972} 1007}
973 1008
974void 1009void
975ath5k_debug_dump_skb(struct ath5k_softc *sc,
976 struct sk_buff *skb, const char *prefix, int tx)
977{
978 char buf[16];
979
980 if (likely(!((tx && (sc->debug.level & ATH5K_DEBUG_DUMP_TX)) ||
981 (!tx && (sc->debug.level & ATH5K_DEBUG_DUMP_RX)))))
982 return;
983
984 snprintf(buf, sizeof(buf), "%s %s", wiphy_name(sc->hw->wiphy), prefix);
985
986 print_hex_dump_bytes(buf, DUMP_PREFIX_NONE, skb->data,
987 min(200U, skb->len));
988
989 printk(KERN_DEBUG "\n");
990}
991
992void
993ath5k_debug_printtxbuf(struct ath5k_softc *sc, struct ath5k_buf *bf) 1010ath5k_debug_printtxbuf(struct ath5k_softc *sc, struct ath5k_buf *bf)
994{ 1011{
995 struct ath5k_desc *ds = bf->desc; 1012 struct ath5k_desc *ds = bf->desc;
@@ -997,7 +1014,7 @@ ath5k_debug_printtxbuf(struct ath5k_softc *sc, struct ath5k_buf *bf)
997 struct ath5k_tx_status ts = {}; 1014 struct ath5k_tx_status ts = {};
998 int done; 1015 int done;
999 1016
1000 if (likely(!(sc->debug.level & ATH5K_DEBUG_RESET))) 1017 if (likely(!(sc->debug.level & ATH5K_DEBUG_DESC)))
1001 return; 1018 return;
1002 1019
1003 done = sc->ah->ah_proc_tx_desc(sc->ah, bf->desc, &ts); 1020 done = sc->ah->ah_proc_tx_desc(sc->ah, bf->desc, &ts);