aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy/iwl-4965-debugfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlegacy/iwl-4965-debugfs.c')
-rw-r--r--drivers/net/wireless/iwlegacy/iwl-4965-debugfs.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl-4965-debugfs.c b/drivers/net/wireless/iwlegacy/iwl-4965-debugfs.c
index 1c93665766e4..3c2876ffadc5 100644
--- a/drivers/net/wireless/iwlegacy/iwl-4965-debugfs.c
+++ b/drivers/net/wireless/iwlegacy/iwl-4965-debugfs.c
@@ -33,7 +33,7 @@ static const char *fmt_table = " %-30s %10u %10u %10u %10u\n";
33static const char *fmt_header = 33static const char *fmt_header =
34 "%-32s current cumulative delta max\n"; 34 "%-32s current cumulative delta max\n";
35 35
36static int iwl4965_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz) 36static int il4965_statistics_flag(struct il_priv *priv, char *buf, int bufsz)
37{ 37{
38 int p = 0; 38 int p = 0;
39 u32 flag; 39 u32 flag;
@@ -54,10 +54,10 @@ static int iwl4965_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz)
54 return p; 54 return p;
55} 55}
56 56
57ssize_t iwl4965_ucode_rx_stats_read(struct file *file, char __user *user_buf, 57ssize_t il4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
58 size_t count, loff_t *ppos) 58 size_t count, loff_t *ppos)
59{ 59{
60 struct iwl_priv *priv = file->private_data; 60 struct il_priv *priv = file->private_data;
61 int pos = 0; 61 int pos = 0;
62 char *buf; 62 char *buf;
63 int bufsz = sizeof(struct statistics_rx_phy) * 40 + 63 int bufsz = sizeof(struct statistics_rx_phy) * 40 +
@@ -70,12 +70,12 @@ ssize_t iwl4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
70 struct statistics_rx_non_phy *delta_general, *max_general; 70 struct statistics_rx_non_phy *delta_general, *max_general;
71 struct statistics_rx_ht_phy *ht, *accum_ht, *delta_ht, *max_ht; 71 struct statistics_rx_ht_phy *ht, *accum_ht, *delta_ht, *max_ht;
72 72
73 if (!iwl_legacy_is_alive(priv)) 73 if (!il_is_alive(priv))
74 return -EAGAIN; 74 return -EAGAIN;
75 75
76 buf = kzalloc(bufsz, GFP_KERNEL); 76 buf = kzalloc(bufsz, GFP_KERNEL);
77 if (!buf) { 77 if (!buf) {
78 IWL_ERR(priv, "Can not allocate Buffer\n"); 78 IL_ERR(priv, "Can not allocate Buffer\n");
79 return -ENOMEM; 79 return -ENOMEM;
80 } 80 }
81 81
@@ -101,7 +101,7 @@ ssize_t iwl4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
101 max_general = &priv->_4965.max_delta.rx.general; 101 max_general = &priv->_4965.max_delta.rx.general;
102 max_ht = &priv->_4965.max_delta.rx.ofdm_ht; 102 max_ht = &priv->_4965.max_delta.rx.ofdm_ht;
103 103
104 pos += iwl4965_statistics_flag(priv, buf, bufsz); 104 pos += il4965_statistics_flag(priv, buf, bufsz);
105 pos += scnprintf(buf + pos, bufsz - pos, 105 pos += scnprintf(buf + pos, bufsz - pos,
106 fmt_header, "Statistics_Rx - OFDM:"); 106 fmt_header, "Statistics_Rx - OFDM:");
107 pos += scnprintf(buf + pos, bufsz - pos, 107 pos += scnprintf(buf + pos, bufsz - pos,
@@ -485,23 +485,23 @@ ssize_t iwl4965_ucode_rx_stats_read(struct file *file, char __user *user_buf,
485 return ret; 485 return ret;
486} 486}
487 487
488ssize_t iwl4965_ucode_tx_stats_read(struct file *file, 488ssize_t il4965_ucode_tx_stats_read(struct file *file,
489 char __user *user_buf, 489 char __user *user_buf,
490 size_t count, loff_t *ppos) 490 size_t count, loff_t *ppos)
491{ 491{
492 struct iwl_priv *priv = file->private_data; 492 struct il_priv *priv = file->private_data;
493 int pos = 0; 493 int pos = 0;
494 char *buf; 494 char *buf;
495 int bufsz = (sizeof(struct statistics_tx) * 48) + 250; 495 int bufsz = (sizeof(struct statistics_tx) * 48) + 250;
496 ssize_t ret; 496 ssize_t ret;
497 struct statistics_tx *tx, *accum_tx, *delta_tx, *max_tx; 497 struct statistics_tx *tx, *accum_tx, *delta_tx, *max_tx;
498 498
499 if (!iwl_legacy_is_alive(priv)) 499 if (!il_is_alive(priv))
500 return -EAGAIN; 500 return -EAGAIN;
501 501
502 buf = kzalloc(bufsz, GFP_KERNEL); 502 buf = kzalloc(bufsz, GFP_KERNEL);
503 if (!buf) { 503 if (!buf) {
504 IWL_ERR(priv, "Can not allocate Buffer\n"); 504 IL_ERR(priv, "Can not allocate Buffer\n");
505 return -ENOMEM; 505 return -ENOMEM;
506 } 506 }
507 507
@@ -514,7 +514,7 @@ ssize_t iwl4965_ucode_tx_stats_read(struct file *file,
514 delta_tx = &priv->_4965.delta_statistics.tx; 514 delta_tx = &priv->_4965.delta_statistics.tx;
515 max_tx = &priv->_4965.max_delta.tx; 515 max_tx = &priv->_4965.max_delta.tx;
516 516
517 pos += iwl4965_statistics_flag(priv, buf, bufsz); 517 pos += il4965_statistics_flag(priv, buf, bufsz);
518 pos += scnprintf(buf + pos, bufsz - pos, 518 pos += scnprintf(buf + pos, bufsz - pos,
519 fmt_header, "Statistics_Tx:"); 519 fmt_header, "Statistics_Tx:");
520 pos += scnprintf(buf + pos, bufsz - pos, 520 pos += scnprintf(buf + pos, bufsz - pos,
@@ -661,10 +661,10 @@ ssize_t iwl4965_ucode_tx_stats_read(struct file *file,
661} 661}
662 662
663ssize_t 663ssize_t
664iwl4965_ucode_general_stats_read(struct file *file, char __user *user_buf, 664il4965_ucode_general_stats_read(struct file *file, char __user *user_buf,
665 size_t count, loff_t *ppos) 665 size_t count, loff_t *ppos)
666{ 666{
667 struct iwl_priv *priv = file->private_data; 667 struct il_priv *priv = file->private_data;
668 int pos = 0; 668 int pos = 0;
669 char *buf; 669 char *buf;
670 int bufsz = sizeof(struct statistics_general) * 10 + 300; 670 int bufsz = sizeof(struct statistics_general) * 10 + 300;
@@ -674,12 +674,12 @@ iwl4965_ucode_general_stats_read(struct file *file, char __user *user_buf,
674 struct statistics_dbg *dbg, *accum_dbg, *delta_dbg, *max_dbg; 674 struct statistics_dbg *dbg, *accum_dbg, *delta_dbg, *max_dbg;
675 struct statistics_div *div, *accum_div, *delta_div, *max_div; 675 struct statistics_div *div, *accum_div, *delta_div, *max_div;
676 676
677 if (!iwl_legacy_is_alive(priv)) 677 if (!il_is_alive(priv))
678 return -EAGAIN; 678 return -EAGAIN;
679 679
680 buf = kzalloc(bufsz, GFP_KERNEL); 680 buf = kzalloc(bufsz, GFP_KERNEL);
681 if (!buf) { 681 if (!buf) {
682 IWL_ERR(priv, "Can not allocate Buffer\n"); 682 IL_ERR(priv, "Can not allocate Buffer\n");
683 return -ENOMEM; 683 return -ENOMEM;
684 } 684 }
685 685
@@ -700,7 +700,7 @@ iwl4965_ucode_general_stats_read(struct file *file, char __user *user_buf,
700 delta_div = &priv->_4965.delta_statistics.general.common.div; 700 delta_div = &priv->_4965.delta_statistics.general.common.div;
701 max_div = &priv->_4965.max_delta.general.common.div; 701 max_div = &priv->_4965.max_delta.general.common.div;
702 702
703 pos += iwl4965_statistics_flag(priv, buf, bufsz); 703 pos += il4965_statistics_flag(priv, buf, bufsz);
704 pos += scnprintf(buf + pos, bufsz - pos, 704 pos += scnprintf(buf + pos, bufsz - pos,
705 fmt_header, "Statistics_General:"); 705 fmt_header, "Statistics_General:");
706 pos += scnprintf(buf + pos, bufsz - pos, 706 pos += scnprintf(buf + pos, bufsz - pos,