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: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
158bea07c6
commit
4c84a8f167
@@ -67,63 +67,6 @@ do { \
|
||||
DUMP_PREFIX_OFFSET, 16, 1, p, len, 1); \
|
||||
} 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
|
||||
#define IWL_DEBUG(__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,
|
||||
{}
|
||||
#endif /* CONFIG_IWLWIFI_DEBUG */
|
||||
|
||||
|
||||
|
||||
#ifndef CONFIG_IWLWIFI_DEBUGFS
|
||||
#ifdef CONFIG_IWLWIFI_DEBUGFS
|
||||
int iwl_dbgfs_register(struct iwl_priv *priv, const char *name);
|
||||
void iwl_dbgfs_unregister(struct iwl_priv *priv);
|
||||
#else
|
||||
static inline int iwl_dbgfs_register(struct iwl_priv *priv, const char *name)
|
||||
{
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user