diff options
author | Alexander Bondar <alexander.bondar@intel.com> | 2013-06-23 13:31:07 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-07-16 06:55:05 -0400 |
commit | 0ecb376375d662987eba2f6e3bfd4bd532bb3907 (patch) | |
tree | 74e3802b5a1b12f6815e7df29081b40877f6f567 /drivers/net/wireless/iwlwifi/mvm/debugfs.c | |
parent | 707aee401d2467baa785a697f40a6e2d9ee79ad5 (diff) |
iwlwifi: mvm: Fix VIF specific debugfs directory creation
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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/debugfs.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/debugfs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/iwlwifi/mvm/debugfs.c index e56ed2a84888..c24a744910ac 100644 --- a/drivers/net/wireless/iwlwifi/mvm/debugfs.c +++ b/drivers/net/wireless/iwlwifi/mvm/debugfs.c | |||
@@ -988,7 +988,11 @@ void iwl_mvm_vif_dbgfs_register(struct iwl_mvm *mvm, struct ieee80211_vif *vif) | |||
988 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); | 988 | struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); |
989 | char buf[100]; | 989 | char buf[100]; |
990 | 990 | ||
991 | if (!dbgfs_dir) | 991 | /* |
992 | * Check if debugfs directory already exist before creating it. | ||
993 | * This may happen when, for example, resetting hw or suspend-resume | ||
994 | */ | ||
995 | if (!dbgfs_dir || mvmvif->dbgfs_dir) | ||
992 | return; | 996 | return; |
993 | 997 | ||
994 | mvmvif->dbgfs_dir = debugfs_create_dir("iwlmvm", dbgfs_dir); | 998 | mvmvif->dbgfs_dir = debugfs_create_dir("iwlmvm", dbgfs_dir); |