diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2009-07-09 13:33:36 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-24 15:05:09 -0400 |
commit | f5ad69fa47e7b204d0032d569812544cd9a351fb (patch) | |
tree | eb6f34d9642f93b681128b8e706304466cd5feaf /drivers/net/wireless/iwlwifi/iwl-debugfs.c | |
parent | 80e5b06a1b0d9a6aa88dc5c9e93ba49510c52b45 (diff) |
iwlwifi: move show_qos to debugfs
This move the show_qos file from sysfs to debugfs because the "one
value per file" sysfs rule.
The file is located in
/sys/kernel/debug/ieee80211/phy0/iwlagn/data
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-debugfs.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index f32ac74b69ac..e38ec81b839b 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -566,6 +566,28 @@ static ssize_t iwl_dbgfs_interrupt_write(struct file *file, | |||
566 | return count; | 566 | return count; |
567 | } | 567 | } |
568 | 568 | ||
569 | static ssize_t iwl_dbgfs_qos_read(struct file *file, char __user *user_buf, | ||
570 | size_t count, loff_t *ppos) | ||
571 | { | ||
572 | struct iwl_priv *priv = (struct iwl_priv *)file->private_data; | ||
573 | int pos = 0, i; | ||
574 | char buf[256]; | ||
575 | const size_t bufsz = sizeof(buf); | ||
576 | ssize_t ret; | ||
577 | |||
578 | for (i = 0; i < AC_NUM; i++) { | ||
579 | pos += scnprintf(buf + pos, bufsz - pos, | ||
580 | "\tcw_min\tcw_max\taifsn\ttxop\n"); | ||
581 | pos += scnprintf(buf + pos, bufsz - pos, | ||
582 | "AC[%d]\t%u\t%u\t%u\t%u\n", i, | ||
583 | priv->qos_data.def_qos_parm.ac[i].cw_min, | ||
584 | priv->qos_data.def_qos_parm.ac[i].cw_max, | ||
585 | priv->qos_data.def_qos_parm.ac[i].aifsn, | ||
586 | priv->qos_data.def_qos_parm.ac[i].edca_txop); | ||
587 | } | ||
588 | ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos); | ||
589 | return ret; | ||
590 | } | ||
569 | 591 | ||
570 | DEBUGFS_READ_WRITE_FILE_OPS(sram); | 592 | DEBUGFS_READ_WRITE_FILE_OPS(sram); |
571 | DEBUGFS_WRITE_FILE_OPS(log_event); | 593 | DEBUGFS_WRITE_FILE_OPS(log_event); |
@@ -576,6 +598,7 @@ DEBUGFS_READ_FILE_OPS(tx_statistics); | |||
576 | DEBUGFS_READ_FILE_OPS(channels); | 598 | DEBUGFS_READ_FILE_OPS(channels); |
577 | DEBUGFS_READ_FILE_OPS(status); | 599 | DEBUGFS_READ_FILE_OPS(status); |
578 | DEBUGFS_READ_WRITE_FILE_OPS(interrupt); | 600 | DEBUGFS_READ_WRITE_FILE_OPS(interrupt); |
601 | DEBUGFS_READ_FILE_OPS(qos); | ||
579 | 602 | ||
580 | /* | 603 | /* |
581 | * Create the debugfs files and directories | 604 | * Create the debugfs files and directories |
@@ -612,6 +635,7 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name) | |||
612 | DEBUGFS_ADD_FILE(channels, data); | 635 | DEBUGFS_ADD_FILE(channels, data); |
613 | DEBUGFS_ADD_FILE(status, data); | 636 | DEBUGFS_ADD_FILE(status, data); |
614 | DEBUGFS_ADD_FILE(interrupt, data); | 637 | DEBUGFS_ADD_FILE(interrupt, data); |
638 | DEBUGFS_ADD_FILE(qos, data); | ||
615 | DEBUGFS_ADD_BOOL(disable_sensitivity, rf, &priv->disable_sens_cal); | 639 | DEBUGFS_ADD_BOOL(disable_sensitivity, rf, &priv->disable_sens_cal); |
616 | DEBUGFS_ADD_BOOL(disable_chain_noise, rf, | 640 | DEBUGFS_ADD_BOOL(disable_chain_noise, rf, |
617 | &priv->disable_chain_noise_cal); | 641 | &priv->disable_chain_noise_cal); |
@@ -646,6 +670,7 @@ void iwl_dbgfs_unregister(struct iwl_priv *priv) | |||
646 | DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_channels); | 670 | DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_channels); |
647 | DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_status); | 671 | DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_status); |
648 | DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_interrupt); | 672 | DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_interrupt); |
673 | DEBUGFS_REMOVE(priv->dbgfs->dbgfs_data_files.file_qos); | ||
649 | DEBUGFS_REMOVE(priv->dbgfs->dir_data); | 674 | DEBUGFS_REMOVE(priv->dbgfs->dir_data); |
650 | DEBUGFS_REMOVE(priv->dbgfs->dbgfs_rf_files.file_disable_sensitivity); | 675 | DEBUGFS_REMOVE(priv->dbgfs->dbgfs_rf_files.file_disable_sensitivity); |
651 | DEBUGFS_REMOVE(priv->dbgfs->dbgfs_rf_files.file_disable_chain_noise); | 676 | DEBUGFS_REMOVE(priv->dbgfs->dbgfs_rf_files.file_disable_chain_noise); |