iwlwifi: remove powersave debugfs if it is not supported
authorWey-Yi Guy <wey-yi.w.guy@intel.com>
Sun, 25 Apr 2010 16:39:46 +0000 (09:39 -0700)
committerReinette Chatre <reinette.chatre@intel.com>
Mon, 10 May 2010 22:08:46 +0000 (15:08 -0700)
For the devices do not have power save support, remove the power save
control related debugfs files.

Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
drivers/net/wireless/iwlwifi/iwl-debugfs.c

index 0aedbec9cbc88ef6f3ce94047bc9b42f82bb7e3a..f0d9b724766357b2c1cd5a544b7ff8178725fb0f 100644 (file)
@@ -1612,8 +1612,11 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name)
        DEBUGFS_ADD_FILE(interrupt, dir_data, S_IWUSR | S_IRUSR);
        DEBUGFS_ADD_FILE(qos, dir_data, S_IRUSR);
        DEBUGFS_ADD_FILE(led, dir_data, S_IRUSR);
-       DEBUGFS_ADD_FILE(sleep_level_override, dir_data, S_IWUSR | S_IRUSR);
-       DEBUGFS_ADD_FILE(current_sleep_command, dir_data, S_IRUSR);
+       if (!priv->cfg->broken_powersave) {
+               DEBUGFS_ADD_FILE(sleep_level_override, dir_data,
+                                S_IWUSR | S_IRUSR);
+               DEBUGFS_ADD_FILE(current_sleep_command, dir_data, S_IRUSR);
+       }
        DEBUGFS_ADD_FILE(thermal_throttling, dir_data, S_IRUSR);
        DEBUGFS_ADD_FILE(disable_ht40, dir_data, S_IWUSR | S_IRUSR);
        DEBUGFS_ADD_FILE(rx_statistics, dir_debug, S_IRUSR);