mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-25 00:52:45 -04:00
mac80211: move sdata debugfs dir to vif
There is need create driver own per interface debugfs files. This is
currently done by drv_{add,remove}_interface_debugfs() callbacks. But it
is possible that after we remove interface from the driver (i.e.
on suspend) we call drv_remove_interface_debugfs() function. Fixing this
problem will require to add call drv_{add,remove}_interface_debugfs()
anytime we create and remove interface in mac80211. So it's better to
add debugfs dir dentry to vif structure to allow to create/remove
custom debugfs driver files on drv_{add,remove}_interface().
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
committed by
Johannes Berg
parent
488b366a45
commit
ddbfe860ac
@@ -295,7 +295,7 @@ void ieee80211_debugfs_key_update_default(struct ieee80211_sub_if_data *sdata)
|
||||
char buf[50];
|
||||
struct ieee80211_key *key;
|
||||
|
||||
if (!sdata->debugfs.dir)
|
||||
if (!sdata->vif.debugfs_dir)
|
||||
return;
|
||||
|
||||
lockdep_assert_held(&sdata->local->key_mtx);
|
||||
@@ -311,7 +311,7 @@ void ieee80211_debugfs_key_update_default(struct ieee80211_sub_if_data *sdata)
|
||||
sprintf(buf, "../keys/%d", key->debugfs.cnt);
|
||||
sdata->debugfs.default_unicast_key =
|
||||
debugfs_create_symlink("default_unicast_key",
|
||||
sdata->debugfs.dir, buf);
|
||||
sdata->vif.debugfs_dir, buf);
|
||||
}
|
||||
|
||||
if (sdata->debugfs.default_multicast_key) {
|
||||
@@ -325,7 +325,7 @@ void ieee80211_debugfs_key_update_default(struct ieee80211_sub_if_data *sdata)
|
||||
sprintf(buf, "../keys/%d", key->debugfs.cnt);
|
||||
sdata->debugfs.default_multicast_key =
|
||||
debugfs_create_symlink("default_multicast_key",
|
||||
sdata->debugfs.dir, buf);
|
||||
sdata->vif.debugfs_dir, buf);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ void ieee80211_debugfs_key_add_mgmt_default(struct ieee80211_sub_if_data *sdata)
|
||||
char buf[50];
|
||||
struct ieee80211_key *key;
|
||||
|
||||
if (!sdata->debugfs.dir)
|
||||
if (!sdata->vif.debugfs_dir)
|
||||
return;
|
||||
|
||||
key = key_mtx_dereference(sdata->local,
|
||||
@@ -343,7 +343,7 @@ void ieee80211_debugfs_key_add_mgmt_default(struct ieee80211_sub_if_data *sdata)
|
||||
sprintf(buf, "../keys/%d", key->debugfs.cnt);
|
||||
sdata->debugfs.default_mgmt_key =
|
||||
debugfs_create_symlink("default_mgmt_key",
|
||||
sdata->debugfs.dir, buf);
|
||||
sdata->vif.debugfs_dir, buf);
|
||||
} else
|
||||
ieee80211_debugfs_key_remove_mgmt_default(sdata);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user