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:
Stanislaw Gruszka
2013-03-08 14:46:14 +01:00
committed by Johannes Berg
parent 488b366a45
commit ddbfe860ac
5 changed files with 25 additions and 19 deletions

View File

@@ -1067,6 +1067,9 @@ enum ieee80211_vif_flags {
* path needing to access it; even though the netdev carrier will always
* be off when it is %NULL there can still be races and packets could be
* processed after it switches back to %NULL.
* @debugfs_dir: debugfs dentry, can be used by drivers to create own per
* interface debug files. Note that it will be NULL for the virtual
* monitor interface (if that is requested.)
* @drv_priv: data area for driver use, will always be aligned to
* sizeof(void *).
*/
@@ -1083,6 +1086,10 @@ struct ieee80211_vif {
u32 driver_flags;
#ifdef CONFIG_MAC80211_DEBUGFS
struct dentry *debugfs_dir;
#endif
/* must be last */
u8 drv_priv[0] __aligned(sizeof(void *));
};