diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c | 134 |
1 files changed, 43 insertions, 91 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c index d1834aa7edf0..71a5f31cd7cc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c | |||
@@ -39,10 +39,7 @@ static int iwl_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz) | |||
39 | int p = 0; | 39 | int p = 0; |
40 | u32 flag; | 40 | u32 flag; |
41 | 41 | ||
42 | if (iwl_bt_statistics(priv)) | 42 | flag = le32_to_cpu(priv->statistics.flag); |
43 | flag = le32_to_cpu(priv->_agn.statistics_bt.flag); | ||
44 | else | ||
45 | flag = le32_to_cpu(priv->_agn.statistics.flag); | ||
46 | 43 | ||
47 | p += scnprintf(buf + p, bufsz - p, "Statistics Flag(0x%X):\n", flag); | 44 | p += scnprintf(buf + p, bufsz - p, "Statistics Flag(0x%X):\n", flag); |
48 | if (flag & UCODE_STATISTICS_CLEAR_MSK) | 45 | if (flag & UCODE_STATISTICS_CLEAR_MSK) |
@@ -88,43 +85,22 @@ ssize_t iwl_ucode_rx_stats_read(struct file *file, char __user *user_buf, | |||
88 | * the last statistics notification from uCode | 85 | * the last statistics notification from uCode |
89 | * might not reflect the current uCode activity | 86 | * might not reflect the current uCode activity |
90 | */ | 87 | */ |
91 | if (iwl_bt_statistics(priv)) { | 88 | ofdm = &priv->statistics.rx_ofdm; |
92 | ofdm = &priv->_agn.statistics_bt.rx.ofdm; | 89 | cck = &priv->statistics.rx_cck; |
93 | cck = &priv->_agn.statistics_bt.rx.cck; | 90 | general = &priv->statistics.rx_non_phy; |
94 | general = &priv->_agn.statistics_bt.rx.general.common; | 91 | ht = &priv->statistics.rx_ofdm_ht; |
95 | ht = &priv->_agn.statistics_bt.rx.ofdm_ht; | 92 | accum_ofdm = &priv->accum_stats.rx_ofdm; |
96 | accum_ofdm = &priv->_agn.accum_statistics_bt.rx.ofdm; | 93 | accum_cck = &priv->accum_stats.rx_cck; |
97 | accum_cck = &priv->_agn.accum_statistics_bt.rx.cck; | 94 | accum_general = &priv->accum_stats.rx_non_phy; |
98 | accum_general = | 95 | accum_ht = &priv->accum_stats.rx_ofdm_ht; |
99 | &priv->_agn.accum_statistics_bt.rx.general.common; | 96 | delta_ofdm = &priv->delta_stats.rx_ofdm; |
100 | accum_ht = &priv->_agn.accum_statistics_bt.rx.ofdm_ht; | 97 | delta_cck = &priv->delta_stats.rx_cck; |
101 | delta_ofdm = &priv->_agn.delta_statistics_bt.rx.ofdm; | 98 | delta_general = &priv->delta_stats.rx_non_phy; |
102 | delta_cck = &priv->_agn.delta_statistics_bt.rx.cck; | 99 | delta_ht = &priv->delta_stats.rx_ofdm_ht; |
103 | delta_general = | 100 | max_ofdm = &priv->max_delta_stats.rx_ofdm; |
104 | &priv->_agn.delta_statistics_bt.rx.general.common; | 101 | max_cck = &priv->max_delta_stats.rx_cck; |
105 | delta_ht = &priv->_agn.delta_statistics_bt.rx.ofdm_ht; | 102 | max_general = &priv->max_delta_stats.rx_non_phy; |
106 | max_ofdm = &priv->_agn.max_delta_bt.rx.ofdm; | 103 | max_ht = &priv->max_delta_stats.rx_ofdm_ht; |
107 | max_cck = &priv->_agn.max_delta_bt.rx.cck; | ||
108 | max_general = &priv->_agn.max_delta_bt.rx.general.common; | ||
109 | max_ht = &priv->_agn.max_delta_bt.rx.ofdm_ht; | ||
110 | } else { | ||
111 | ofdm = &priv->_agn.statistics.rx.ofdm; | ||
112 | cck = &priv->_agn.statistics.rx.cck; | ||
113 | general = &priv->_agn.statistics.rx.general; | ||
114 | ht = &priv->_agn.statistics.rx.ofdm_ht; | ||
115 | accum_ofdm = &priv->_agn.accum_statistics.rx.ofdm; | ||
116 | accum_cck = &priv->_agn.accum_statistics.rx.cck; | ||
117 | accum_general = &priv->_agn.accum_statistics.rx.general; | ||
118 | accum_ht = &priv->_agn.accum_statistics.rx.ofdm_ht; | ||
119 | delta_ofdm = &priv->_agn.delta_statistics.rx.ofdm; | ||
120 | delta_cck = &priv->_agn.delta_statistics.rx.cck; | ||
121 | delta_general = &priv->_agn.delta_statistics.rx.general; | ||
122 | delta_ht = &priv->_agn.delta_statistics.rx.ofdm_ht; | ||
123 | max_ofdm = &priv->_agn.max_delta.rx.ofdm; | ||
124 | max_cck = &priv->_agn.max_delta.rx.cck; | ||
125 | max_general = &priv->_agn.max_delta.rx.general; | ||
126 | max_ht = &priv->_agn.max_delta.rx.ofdm_ht; | ||
127 | } | ||
128 | 104 | ||
129 | pos += iwl_statistics_flag(priv, buf, bufsz); | 105 | pos += iwl_statistics_flag(priv, buf, bufsz); |
130 | pos += scnprintf(buf + pos, bufsz - pos, | 106 | pos += scnprintf(buf + pos, bufsz - pos, |
@@ -531,20 +507,13 @@ ssize_t iwl_ucode_tx_stats_read(struct file *file, | |||
531 | } | 507 | } |
532 | 508 | ||
533 | /* the statistic information display here is based on | 509 | /* the statistic information display here is based on |
534 | * the last statistics notification from uCode | 510 | * the last statistics notification from uCode |
535 | * might not reflect the current uCode activity | 511 | * might not reflect the current uCode activity |
536 | */ | 512 | */ |
537 | if (iwl_bt_statistics(priv)) { | 513 | tx = &priv->statistics.tx; |
538 | tx = &priv->_agn.statistics_bt.tx; | 514 | accum_tx = &priv->accum_stats.tx; |
539 | accum_tx = &priv->_agn.accum_statistics_bt.tx; | 515 | delta_tx = &priv->delta_stats.tx; |
540 | delta_tx = &priv->_agn.delta_statistics_bt.tx; | 516 | max_tx = &priv->max_delta_stats.tx; |
541 | max_tx = &priv->_agn.max_delta_bt.tx; | ||
542 | } else { | ||
543 | tx = &priv->_agn.statistics.tx; | ||
544 | accum_tx = &priv->_agn.accum_statistics.tx; | ||
545 | delta_tx = &priv->_agn.delta_statistics.tx; | ||
546 | max_tx = &priv->_agn.max_delta.tx; | ||
547 | } | ||
548 | 517 | ||
549 | pos += iwl_statistics_flag(priv, buf, bufsz); | 518 | pos += iwl_statistics_flag(priv, buf, bufsz); |
550 | pos += scnprintf(buf + pos, bufsz - pos, | 519 | pos += scnprintf(buf + pos, bufsz - pos, |
@@ -731,36 +700,21 @@ ssize_t iwl_ucode_general_stats_read(struct file *file, char __user *user_buf, | |||
731 | } | 700 | } |
732 | 701 | ||
733 | /* the statistic information display here is based on | 702 | /* the statistic information display here is based on |
734 | * the last statistics notification from uCode | 703 | * the last statistics notification from uCode |
735 | * might not reflect the current uCode activity | 704 | * might not reflect the current uCode activity |
736 | */ | 705 | */ |
737 | if (iwl_bt_statistics(priv)) { | 706 | general = &priv->statistics.common; |
738 | general = &priv->_agn.statistics_bt.general.common; | 707 | dbg = &priv->statistics.common.dbg; |
739 | dbg = &priv->_agn.statistics_bt.general.common.dbg; | 708 | div = &priv->statistics.common.div; |
740 | div = &priv->_agn.statistics_bt.general.common.div; | 709 | accum_general = &priv->accum_stats.common; |
741 | accum_general = &priv->_agn.accum_statistics_bt.general.common; | 710 | accum_dbg = &priv->accum_stats.common.dbg; |
742 | accum_dbg = &priv->_agn.accum_statistics_bt.general.common.dbg; | 711 | accum_div = &priv->accum_stats.common.div; |
743 | accum_div = &priv->_agn.accum_statistics_bt.general.common.div; | 712 | delta_general = &priv->delta_stats.common; |
744 | delta_general = &priv->_agn.delta_statistics_bt.general.common; | 713 | max_general = &priv->max_delta_stats.common; |
745 | max_general = &priv->_agn.max_delta_bt.general.common; | 714 | delta_dbg = &priv->delta_stats.common.dbg; |
746 | delta_dbg = &priv->_agn.delta_statistics_bt.general.common.dbg; | 715 | max_dbg = &priv->max_delta_stats.common.dbg; |
747 | max_dbg = &priv->_agn.max_delta_bt.general.common.dbg; | 716 | delta_div = &priv->delta_stats.common.div; |
748 | delta_div = &priv->_agn.delta_statistics_bt.general.common.div; | 717 | max_div = &priv->max_delta_stats.common.div; |
749 | max_div = &priv->_agn.max_delta_bt.general.common.div; | ||
750 | } else { | ||
751 | general = &priv->_agn.statistics.general.common; | ||
752 | dbg = &priv->_agn.statistics.general.common.dbg; | ||
753 | div = &priv->_agn.statistics.general.common.div; | ||
754 | accum_general = &priv->_agn.accum_statistics.general.common; | ||
755 | accum_dbg = &priv->_agn.accum_statistics.general.common.dbg; | ||
756 | accum_div = &priv->_agn.accum_statistics.general.common.div; | ||
757 | delta_general = &priv->_agn.delta_statistics.general.common; | ||
758 | max_general = &priv->_agn.max_delta.general.common; | ||
759 | delta_dbg = &priv->_agn.delta_statistics.general.common.dbg; | ||
760 | max_dbg = &priv->_agn.max_delta.general.common.dbg; | ||
761 | delta_div = &priv->_agn.delta_statistics.general.common.div; | ||
762 | max_div = &priv->_agn.max_delta.general.common.div; | ||
763 | } | ||
764 | 718 | ||
765 | pos += iwl_statistics_flag(priv, buf, bufsz); | 719 | pos += iwl_statistics_flag(priv, buf, bufsz); |
766 | pos += scnprintf(buf + pos, bufsz - pos, | 720 | pos += scnprintf(buf + pos, bufsz - pos, |
@@ -876,8 +830,8 @@ ssize_t iwl_ucode_bt_stats_read(struct file *file, | |||
876 | * the last statistics notification from uCode | 830 | * the last statistics notification from uCode |
877 | * might not reflect the current uCode activity | 831 | * might not reflect the current uCode activity |
878 | */ | 832 | */ |
879 | bt = &priv->_agn.statistics_bt.general.activity; | 833 | bt = &priv->statistics.bt_activity; |
880 | accum_bt = &priv->_agn.accum_statistics_bt.general.activity; | 834 | accum_bt = &priv->accum_stats.bt_activity; |
881 | 835 | ||
882 | pos += iwl_statistics_flag(priv, buf, bufsz); | 836 | pos += iwl_statistics_flag(priv, buf, bufsz); |
883 | pos += scnprintf(buf + pos, bufsz - pos, "Statistics_BT:\n"); | 837 | pos += scnprintf(buf + pos, bufsz - pos, "Statistics_BT:\n"); |
@@ -918,10 +872,8 @@ ssize_t iwl_ucode_bt_stats_read(struct file *file, | |||
918 | 872 | ||
919 | pos += scnprintf(buf + pos, bufsz - pos, | 873 | pos += scnprintf(buf + pos, bufsz - pos, |
920 | "(rx)num_bt_kills:\t\t%u\t\t\t%u\n", | 874 | "(rx)num_bt_kills:\t\t%u\t\t\t%u\n", |
921 | le32_to_cpu(priv->_agn.statistics_bt.rx. | 875 | le32_to_cpu(priv->statistics.num_bt_kills), |
922 | general.num_bt_kills), | 876 | priv->statistics.accum_num_bt_kills); |
923 | priv->_agn.accum_statistics_bt.rx. | ||
924 | general.num_bt_kills); | ||
925 | 877 | ||
926 | ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos); | 878 | ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos); |
927 | kfree(buf); | 879 | kfree(buf); |