diff options
author | Winkler, Tomas <tomas.winkler@intel.com> | 2008-12-21 22:31:20 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 15:58:44 -0500 |
commit | 2ddfa129bbf3dca708ffb0eb29d08de32cacd547 (patch) | |
tree | fd67976edea02db4c130ef514036d8bac9f268be /drivers/net/wireless/iwlwifi | |
parent | 29701e5abf155d76fc8ab785a172c4ccf6cf47ee (diff) |
iwlwifi: move sysfs status entry to debugfs
This patch moves priv->status sysfs entry to debugfs. It is for
debugging only anyway.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debug.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 10 |
3 files changed, 10 insertions, 12 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 0dc8eed16404..01e744962d6c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -3652,16 +3652,6 @@ static ssize_t show_statistics(struct device *d, | |||
3652 | 3652 | ||
3653 | static DEVICE_ATTR(statistics, S_IRUGO, show_statistics, NULL); | 3653 | static DEVICE_ATTR(statistics, S_IRUGO, show_statistics, NULL); |
3654 | 3654 | ||
3655 | static ssize_t show_status(struct device *d, | ||
3656 | struct device_attribute *attr, char *buf) | ||
3657 | { | ||
3658 | struct iwl_priv *priv = (struct iwl_priv *)d->driver_data; | ||
3659 | if (!iwl_is_alive(priv)) | ||
3660 | return -EAGAIN; | ||
3661 | return sprintf(buf, "0x%08x\n", (int)priv->status); | ||
3662 | } | ||
3663 | |||
3664 | static DEVICE_ATTR(status, S_IRUGO, show_status, NULL); | ||
3665 | 3655 | ||
3666 | /***************************************************************************** | 3656 | /***************************************************************************** |
3667 | * | 3657 | * |
@@ -3717,7 +3707,6 @@ static struct attribute *iwl_sysfs_entries[] = { | |||
3717 | &dev_attr_power_level.attr, | 3707 | &dev_attr_power_level.attr, |
3718 | &dev_attr_retry_rate.attr, | 3708 | &dev_attr_retry_rate.attr, |
3719 | &dev_attr_statistics.attr, | 3709 | &dev_attr_statistics.attr, |
3720 | &dev_attr_status.attr, | ||
3721 | &dev_attr_temperature.attr, | 3710 | &dev_attr_temperature.attr, |
3722 | &dev_attr_tx_power.attr, | 3711 | &dev_attr_tx_power.attr, |
3723 | #ifdef CONFIG_IWLWIFI_DEBUG | 3712 | #ifdef CONFIG_IWLWIFI_DEBUG |
diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h index 56c13b458de7..7c4ee0cd81c6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debug.h +++ b/drivers/net/wireless/iwlwifi/iwl-debug.h | |||
@@ -61,6 +61,7 @@ struct iwl_debugfs { | |||
61 | struct dentry *file_tx_statistics; | 61 | struct dentry *file_tx_statistics; |
62 | struct dentry *file_log_event; | 62 | struct dentry *file_log_event; |
63 | struct dentry *file_channels; | 63 | struct dentry *file_channels; |
64 | struct dentry *file_status; | ||
64 | } dbgfs_data_files; | 65 | } dbgfs_data_files; |
65 | struct dir_rf_files { | 66 | struct dir_rf_files { |
66 | struct dentry *file_disable_sensitivity; | 67 | struct dentry *file_disable_sensitivity; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index d5253a179dec..1e142fbac616 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -63,6 +63,14 @@ | |||
63 | goto err; \ | 63 | goto err; \ |
64 | } while (0) | 64 | } while (0) |
65 | 65 | ||
66 | #define DEBUGFS_ADD_X32(name, parent, ptr) do { \ | ||
67 | dbgfs->dbgfs_##parent##_files.file_##name = \ | ||
68 | debugfs_create_x32(#name, 0444, dbgfs->dir_##parent, ptr); \ | ||
69 | if (IS_ERR(dbgfs->dbgfs_##parent##_files.file_##name) \ | ||
70 | || !dbgfs->dbgfs_##parent##_files.file_##name) \ | ||
71 | goto err; \ | ||
72 | } while (0) | ||
73 | |||
66 | #define DEBUGFS_REMOVE(name) do { \ | 74 | #define DEBUGFS_REMOVE(name) do { \ |
67 | debugfs_remove(name); \ | 75 | debugfs_remove(name); \ |
68 | name = NULL; \ | 76 | name = NULL; \ |
@@ -420,7 +428,6 @@ static ssize_t iwl_dbgfs_channels_read(struct file *file, char __user *user_buf, | |||
420 | return ret; | 428 | return ret; |
421 | } | 429 | } |
422 | 430 | ||
423 | |||
424 | DEBUGFS_READ_WRITE_FILE_OPS(sram); | 431 | DEBUGFS_READ_WRITE_FILE_OPS(sram); |
425 | DEBUGFS_WRITE_FILE_OPS(log_event); | 432 | DEBUGFS_WRITE_FILE_OPS(log_event); |
426 | DEBUGFS_READ_FILE_OPS(eeprom); | 433 | DEBUGFS_READ_FILE_OPS(eeprom); |
@@ -462,6 +469,7 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name) | |||
462 | DEBUGFS_ADD_FILE(rx_statistics, data); | 469 | DEBUGFS_ADD_FILE(rx_statistics, data); |
463 | DEBUGFS_ADD_FILE(tx_statistics, data); | 470 | DEBUGFS_ADD_FILE(tx_statistics, data); |
464 | DEBUGFS_ADD_FILE(channels, data); | 471 | DEBUGFS_ADD_FILE(channels, data); |
472 | DEBUGFS_ADD_X32(status, data, (u32 *)&priv->status); | ||
465 | DEBUGFS_ADD_BOOL(disable_sensitivity, rf, &priv->disable_sens_cal); | 473 | DEBUGFS_ADD_BOOL(disable_sensitivity, rf, &priv->disable_sens_cal); |
466 | DEBUGFS_ADD_BOOL(disable_chain_noise, rf, | 474 | DEBUGFS_ADD_BOOL(disable_chain_noise, rf, |
467 | &priv->disable_chain_noise_cal); | 475 | &priv->disable_chain_noise_cal); |