]> Pileus Git - ~andy/linux/commitdiff
iwlwifi: mvm: Fix VIF specific debugfs directory creation
authorAlexander Bondar <alexander.bondar@intel.com>
Sun, 23 Jun 2013 17:31:07 +0000 (20:31 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 16 Jul 2013 10:55:05 +0000 (13:55 +0300)
Avoid creating VIF specific debugfs directory if already exist.
This may happen when, for example, resetting hw, suspend-resume.

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
drivers/net/wireless/iwlwifi/mvm/debugfs.c

index e56ed2a848886ce6c9001ef9a69a12d54c5f102b..c24a744910acd447c0b7376670e5e97b038cb09c 100644 (file)
@@ -988,7 +988,11 @@ void iwl_mvm_vif_dbgfs_register(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
        struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
        char buf[100];
 
-       if (!dbgfs_dir)
+       /*
+        * Check if debugfs directory already exist before creating it.
+        * This may happen when, for example, resetting hw or suspend-resume
+        */
+       if (!dbgfs_dir || mvmvif->dbgfs_dir)
                return;
 
        mvmvif->dbgfs_dir = debugfs_create_dir("iwlmvm", dbgfs_dir);