Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 368959
b: refs/heads/master
c: ddbfe86
h: refs/heads/master
i:
  368957: 18ce458
  368955: 85d3701
  368951: 6a7859c
  368943: 89495ba
  368927: fb4f996
  368895: b0fe80f
v: v3
  • Loading branch information
Stanislaw Gruszka authored and Johannes Berg committed Mar 18, 2013
1 parent 74843f5 commit ab1d243
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 488b366a452934141959384c7a1b52b22d6154ef
refs/heads/master: ddbfe860acc39d4856a86186eb8a292426ea6224
7 changes: 7 additions & 0 deletions trunk/include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *).
*/
Expand All @@ -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 *));
};
Expand Down
10 changes: 5 additions & 5 deletions trunk/net/mac80211/debugfs_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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) {
Expand All @@ -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);
}
}

Expand All @@ -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,
Expand All @@ -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);
}
Expand Down
22 changes: 11 additions & 11 deletions trunk/net/mac80211/debugfs_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ IEEE80211_IF_FILE(dot11MeshAwakeWindowDuration,
#endif

#define DEBUGFS_ADD_MODE(name, mode) \
debugfs_create_file(#name, mode, sdata->debugfs.dir, \
debugfs_create_file(#name, mode, sdata->vif.debugfs_dir, \
sdata, &name##_ops);

#define DEBUGFS_ADD(name) DEBUGFS_ADD_MODE(name, 0400)
Expand Down Expand Up @@ -577,7 +577,7 @@ static void add_mesh_files(struct ieee80211_sub_if_data *sdata)
static void add_mesh_stats(struct ieee80211_sub_if_data *sdata)
{
struct dentry *dir = debugfs_create_dir("mesh_stats",
sdata->debugfs.dir);
sdata->vif.debugfs_dir);
#define MESHSTATS_ADD(name)\
debugfs_create_file(#name, 0400, dir, sdata, &name##_ops);

Expand All @@ -594,7 +594,7 @@ static void add_mesh_stats(struct ieee80211_sub_if_data *sdata)
static void add_mesh_config(struct ieee80211_sub_if_data *sdata)
{
struct dentry *dir = debugfs_create_dir("mesh_config",
sdata->debugfs.dir);
sdata->vif.debugfs_dir);

#define MESHPARAMS_ADD(name) \
debugfs_create_file(#name, 0600, dir, sdata, &name##_ops);
Expand Down Expand Up @@ -631,7 +631,7 @@ static void add_mesh_config(struct ieee80211_sub_if_data *sdata)

static void add_files(struct ieee80211_sub_if_data *sdata)
{
if (!sdata->debugfs.dir)
if (!sdata->vif.debugfs_dir)
return;

DEBUGFS_ADD(flags);
Expand Down Expand Up @@ -673,29 +673,29 @@ void ieee80211_debugfs_add_netdev(struct ieee80211_sub_if_data *sdata)
char buf[10+IFNAMSIZ];

sprintf(buf, "netdev:%s", sdata->name);
sdata->debugfs.dir = debugfs_create_dir(buf,
sdata->vif.debugfs_dir = debugfs_create_dir(buf,
sdata->local->hw.wiphy->debugfsdir);
if (sdata->debugfs.dir)
if (sdata->vif.debugfs_dir)
sdata->debugfs.subdir_stations = debugfs_create_dir("stations",
sdata->debugfs.dir);
sdata->vif.debugfs_dir);
add_files(sdata);
}

void ieee80211_debugfs_remove_netdev(struct ieee80211_sub_if_data *sdata)
{
if (!sdata->debugfs.dir)
if (!sdata->vif.debugfs_dir)
return;

debugfs_remove_recursive(sdata->debugfs.dir);
sdata->debugfs.dir = NULL;
debugfs_remove_recursive(sdata->vif.debugfs_dir);
sdata->vif.debugfs_dir = NULL;
}

void ieee80211_debugfs_rename_netdev(struct ieee80211_sub_if_data *sdata)
{
struct dentry *dir;
char buf[10 + IFNAMSIZ];

dir = sdata->debugfs.dir;
dir = sdata->vif.debugfs_dir;

if (!dir)
return;
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/mac80211/driver-ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ void drv_add_interface_debugfs(struct ieee80211_local *local,
return;

local->ops->add_interface_debugfs(&local->hw, &sdata->vif,
sdata->debugfs.dir);
sdata->vif.debugfs_dir);
}

static inline
Expand All @@ -575,7 +575,7 @@ void drv_remove_interface_debugfs(struct ieee80211_local *local,
return;

local->ops->remove_interface_debugfs(&local->hw, &sdata->vif,
sdata->debugfs.dir);
sdata->vif.debugfs_dir);
}
#else
static inline
Expand Down
1 change: 0 additions & 1 deletion trunk/net/mac80211/ieee80211_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,6 @@ struct ieee80211_sub_if_data {

#ifdef CONFIG_MAC80211_DEBUGFS
struct {
struct dentry *dir;
struct dentry *subdir_stations;
struct dentry *default_unicast_key;
struct dentry *default_multicast_key;
Expand Down

0 comments on commit ab1d243

Please sign in to comment.