Skip to content

Commit

Permalink
iwlwifi: mvm: Fix VIF specific debugfs directory creation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Bondar authored and Johannes Berg committed Jul 16, 2013
1 parent 707aee4 commit 0ecb376
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/net/wireless/iwlwifi/mvm/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0ecb376

Please sign in to comment.