Commit 4c84a8f1 authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

iwlwifi: clean up debugfs code

The debugfs code can be made a whole lot more
efficient by using debugfs_remove_recursive(),
the large chunk of variables can completely go
away and by moving two variables we no longer
need to allocate an extra chunk of memory.
Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 158bea07
...@@ -67,63 +67,6 @@ do { \ ...@@ -67,63 +67,6 @@ do { \
DUMP_PREFIX_OFFSET, 16, 1, p, len, 1); \ DUMP_PREFIX_OFFSET, 16, 1, p, len, 1); \
} while (0) } while (0)
#ifdef CONFIG_IWLWIFI_DEBUGFS
struct iwl_debugfs {
const char *name;
struct dentry *dir_drv;
struct dentry *dir_data;
struct dentry *dir_debug;
struct dentry *dir_rf;
struct dir_data_files {
struct dentry *file_sram;
struct dentry *file_nvm;
struct dentry *file_stations;
struct dentry *file_log_event;
struct dentry *file_channels;
struct dentry *file_status;
struct dentry *file_interrupt;
struct dentry *file_qos;
struct dentry *file_thermal_throttling;
struct dentry *file_led;
struct dentry *file_disable_ht40;
struct dentry *file_sleep_level_override;
struct dentry *file_current_sleep_command;
} dbgfs_data_files;
struct dir_rf_files {
struct dentry *file_disable_sensitivity;
struct dentry *file_disable_chain_noise;
struct dentry *file_disable_tx_power;
} dbgfs_rf_files;
struct dir_debug_files {
struct dentry *file_rx_statistics;
struct dentry *file_tx_statistics;
struct dentry *file_traffic_log;
struct dentry *file_rx_queue;
struct dentry *file_tx_queue;
struct dentry *file_ucode_rx_stats;
struct dentry *file_ucode_tx_stats;
struct dentry *file_ucode_general_stats;
struct dentry *file_sensitivity;
struct dentry *file_chain_noise;
struct dentry *file_tx_power;
struct dentry *file_power_save_status;
struct dentry *file_clear_ucode_statistics;
struct dentry *file_clear_traffic_statistics;
struct dentry *file_csr;
struct dentry *file_ucode_tracing;
struct dentry *file_fh_reg;
struct dentry *file_missed_beacon;
struct dentry *file_internal_scan;
struct dentry *file_plcp_delta;
} dbgfs_debug_files;
u32 sram_offset;
u32 sram_len;
};
int iwl_dbgfs_register(struct iwl_priv *priv, const char *name);
void iwl_dbgfs_unregister(struct iwl_priv *priv);
#endif
#else #else
#define IWL_DEBUG(__priv, level, fmt, args...) #define IWL_DEBUG(__priv, level, fmt, args...)
#define IWL_DEBUG_LIMIT(__priv, level, fmt, args...) #define IWL_DEBUG_LIMIT(__priv, level, fmt, args...)
...@@ -132,9 +75,10 @@ static inline void iwl_print_hex_dump(struct iwl_priv *priv, int level, ...@@ -132,9 +75,10 @@ static inline void iwl_print_hex_dump(struct iwl_priv *priv, int level,
{} {}
#endif /* CONFIG_IWLWIFI_DEBUG */ #endif /* CONFIG_IWLWIFI_DEBUG */
#ifdef CONFIG_IWLWIFI_DEBUGFS
int iwl_dbgfs_register(struct iwl_priv *priv, const char *name);
#ifndef CONFIG_IWLWIFI_DEBUGFS void iwl_dbgfs_unregister(struct iwl_priv *priv);
#else
static inline int iwl_dbgfs_register(struct iwl_priv *priv, const char *name) static inline int iwl_dbgfs_register(struct iwl_priv *priv, const char *name)
{ {
return 0; return 0;
......
This diff is collapsed.
...@@ -1309,7 +1309,8 @@ struct iwl_priv { ...@@ -1309,7 +1309,8 @@ struct iwl_priv {
u16 rx_traffic_idx; u16 rx_traffic_idx;
u8 *tx_traffic; u8 *tx_traffic;
u8 *rx_traffic; u8 *rx_traffic;
struct iwl_debugfs *dbgfs; struct dentry *debugfs_dir;
u32 dbgfs_sram_offset, dbgfs_sram_len;
#endif /* CONFIG_IWLWIFI_DEBUGFS */ #endif /* CONFIG_IWLWIFI_DEBUGFS */
#endif /* CONFIG_IWLWIFI_DEBUG */ #endif /* CONFIG_IWLWIFI_DEBUG */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment