Skip to contentSkip to conversation

mac80211: Support multiple VIFS per AP in debugfs.

mac80211 [email protected] 4 participants 5 messages Sep 23, 2010 – Nov 10, 2010 1 message not in the archive mac80211

lore
Share & tools
lore
#0 lore raw

From: Ben Greear <[email protected]>

Create 'stations' sub-directory under each netdev:[vif-name] directory to hold all stations for that network device.

---
:100644 100644 e81ef4e... ebd5b69... M net/mac80211/debugfs.c
:100644 100644 20b2998... 3e12430... M net/mac80211/debugfs_netdev.c
:100644 100644 76839d4... 6b7ff9f... M net/mac80211/debugfs_sta.c
:100644 100644 9346a6b... 3c7c230... M net/mac80211/ieee80211_i.h

 net/mac80211/debugfs.c        |    1 -
 net/mac80211/debugfs_netdev.c |    3 +++
 net/mac80211/debugfs_sta.c    |    2 +-
 net/mac80211/ieee80211_i.h    |    2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)
net/mac80211/debugfs.c +0 -1
index e81ef4e..ebd5b69 100644
@@ -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);
net/mac80211/debugfs_netdev.c +3 -0
index 20b2998..3e12430 100644
@@ -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);
 }
 
net/mac80211/debugfs_sta.c +1 -1
index 76839d4..6b7ff9f 100644
@@ -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;
net/mac80211/ieee80211_i.h +1 -1
index 9346a6b..3c7c230 100644
@@ -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
Signature · 1 line
1.7.2.3
maintainer Acked-by
#1 lore raw
Quoted 6 lines · On Wed, 2010-09-22 at 20:29 -0700, [email protected] wrote:

From: Ben Greear <[email protected]>

Create 'stations' sub-directory under each netdev:[vif-name] directory to hold all stations for that network device.

Quoted 70 lines

---
:100644 100644 e81ef4e... ebd5b69... M net/mac80211/debugfs.c
:100644 100644 20b2998... 3e12430... M net/mac80211/debugfs_netdev.c
:100644 100644 76839d4... 6b7ff9f... M net/mac80211/debugfs_sta.c
:100644 100644 9346a6b... 3c7c230... M net/mac80211/ieee80211_i.h

 net/mac80211/debugfs.c        |    1 -
 net/mac80211/debugfs_netdev.c |    3 +++
 net/mac80211/debugfs_sta.c    |    2 +-
 net/mac80211/ieee80211_i.h    |    2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)
net/mac80211/debugfs.c +0 -1
index e81ef4e..ebd5b69 100644
@@ -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);
net/mac80211/debugfs_netdev.c +3 -0
index 20b2998..3e12430 100644
@@ -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);
 }
 
net/mac80211/debugfs_sta.c +1 -1
index 76839d4..6b7ff9f 100644
@@ -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;
net/mac80211/ieee80211_i.h +1 -1
index 9346a6b..3c7c230 100644
@@ -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
#2 lore raw
Quoted 9 lines · On Thursday 23 September 2010 10:36:58 Johannes Berg wrote:
Quoted 6 lines · On Wed, 2010-09-22 at 20:29 -0700, [email protected] wrote:

From: Ben Greear <[email protected]>

Create 'stations' sub-directory under each netdev:[vif-name] directory to hold all stations for that network device.

ieee80211_debugfs_key_add needs to be updated (debugfs_key.c). Either the "station" symlink has to go, or we need to loop up to which interface the sta belongs. currently it's hard-coded to "sprintf(buf, "../../stations/%pM", sta->sta.addr);" (something which no longer exists)

Quoted 24 lines
Quoted 24 lines

---
:100644 100644 e81ef4e... ebd5b69... M net/mac80211/debugfs.c
:100644 100644 20b2998... 3e12430... M net/mac80211/debugfs_netdev.c
:100644 100644 76839d4... 6b7ff9f... M net/mac80211/debugfs_sta.c
:100644 100644 9346a6b... 3c7c230... M net/mac80211/ieee80211_i.h

 net/mac80211/debugfs.c        |    1 -
 net/mac80211/debugfs_netdev.c |    3 +++
 net/mac80211/debugfs_sta.c    |    2 +-
 net/mac80211/ieee80211_i.h    |    2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)
net/mac80211/debugfs.c +0 -1
index e81ef4e..ebd5b69 100644
@@ -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);
#3 lore raw
Quoted 9 lines · Christian Lamparter
Quoted 8 lines · On Thursday 23 September 2010 10:36:58 Johannes Berg wrote:
Quoted 6 lines · On Wed, 2010-09-22 at 20:29 -0700, [email protected] wrote:

From: Ben Greear<[email protected]>

Create 'stations' sub-directory under each netdev:[vif-name] directory to hold all stations for that network device.

Quoted 7 lines
Quoted 1 line

ieee80211_debugfs_key_add needs to be updated (debugfs_key.c). Either the "station" symlink has to go, or we need to loop up to which interface the sta belongs. currently it's hard-coded to "sprintf(buf, "../../stations/%pM", sta->sta.addr);" (something which no longer exists)

I'm travelling for a few days, but will see what I can do to fix this when I'm back if no one beats me to it.

Thanks,
Ben

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 12 lines · On Wednesday 10 November 2010 20:24:50 Ben Greear wrote:
Quoted 11 lines · Christian Lamparter
Quoted 9 lines · On Thursday 23 September 2010 10:36:58 Johannes Berg wrote:
Quoted 6 lines · On Wed, 2010-09-22 at 20:29 -0700, [email protected] wrote:

From: Ben Greear<[email protected]>

Create 'stations' sub-directory under each netdev:[vif-name] directory to hold all stations for that network device.

Quoted 8 lines
Quoted 5 lines

ieee80211_debugfs_key_add needs to be updated (debugfs_key.c). Either the "station" symlink has to go, or we need to loop up to which interface the sta belongs. currently it's hard-coded to "sprintf(buf, "../../stations/%pM", sta->sta.addr);" (something which no longer exists)

To reproduce this problem, do I need to be using WEP, or should WPA do the trick? Or something else?

well, STAs are involved. So you want an encryption which needs/generates per-station keys. And the setup of choice would be to go with WPA/RSN.

Quoted 2 lines

Are the keys supposed to show up only in STA mode, or also when acting as an AP?

They will show up in STA and AP mode.

Regards,
Chr