mac80211: Support multiple VIFS per AP in debugfs.
authorBen Greear <greearb@candelatech.com>
Thu, 23 Sep 2010 03:29:01 +0000 (20:29 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 27 Sep 2010 19:57:43 +0000 (15:57 -0400)
Create 'stations' sub-directory under each netdev:[vif-name]
directory to hold all stations for that network device.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/debugfs.c
net/mac80211/debugfs_netdev.c
net/mac80211/debugfs_sta.c
net/mac80211/ieee80211_i.h

index e81ef4e8cb323eeca8ea32492a23cdb96f7a4b43..ebd5b69f562e5a6eade67cbae1a3bd765dc91a46 100644 (file)
@@ -368,7 +368,6 @@ void debugfs_hw_add(struct ieee80211_local *local)
        if (!phyd)
                return;
 
-       local->debugfs.stations = debugfs_create_dir("stations", phyd);
        local->debugfs.keys = debugfs_create_dir("keys", phyd);
 
        DEBUGFS_ADD(frequency);
index 20b2998fa0ed07b68b410f77a82d0f159603d79e..3e12430591b79a75e046f1e817ab6174137a0dc2 100644 (file)
@@ -409,6 +409,9 @@ void ieee80211_debugfs_add_netdev(struct ieee80211_sub_if_data *sdata)
        sprintf(buf, "netdev:%s", sdata->name);
        sdata->debugfs.dir = debugfs_create_dir(buf,
                sdata->local->hw.wiphy->debugfsdir);
+       if (sdata->debugfs.dir)
+               sdata->debugfs.subdir_stations = debugfs_create_dir("stations",
+                       sdata->debugfs.dir);
        add_files(sdata);
 }
 
index 76839d4dfaacabe15c30f886478367ad2b524585..6b7ff9fb4604fd98a907e840f5b65cb638ee142f 100644 (file)
@@ -300,7 +300,7 @@ STA_OPS(ht_capa);
 
 void ieee80211_sta_debugfs_add(struct sta_info *sta)
 {
-       struct dentry *stations_dir = sta->local->debugfs.stations;
+       struct dentry *stations_dir = sta->sdata->debugfs.subdir_stations;
        u8 mac[3*ETH_ALEN];
 
        sta->debugfs.add_has_run = true;
index 78a8d9208cecfd342277e90b92d3323f37d1f1ac..40f7472733891f6feea33d29836c722e2b13a2df 100644 (file)
@@ -564,6 +564,7 @@ struct ieee80211_sub_if_data {
 #ifdef CONFIG_MAC80211_DEBUGFS
        struct {
                struct dentry *dir;
+               struct dentry *subdir_stations;
                struct dentry *default_key;
                struct dentry *default_mgmt_key;
        } debugfs;
@@ -899,7 +900,6 @@ struct ieee80211_local {
 #ifdef CONFIG_MAC80211_DEBUGFS
        struct local_debugfsdentries {
                struct dentry *rcdir;
-               struct dentry *stations;
                struct dentry *keys;
        } debugfs;
 #endif