mac80211: Support multiple VIFS per AP in debugfs.
From: Ben Greear <[email protected]>
MAC address of AP isn't unique..need to add the device name as well.
---
:100644 100644 76839d4... 4cf451c... M net/mac80211/debugfs_sta.c
net/mac80211/debugfs_sta.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
net/mac80211/debugfs_sta.c +6 -2
@@ -301,14 +301,18 @@ STA_OPS(ht_capa);void ieee80211_sta_debugfs_add (struct sta_info *sta) {struct dentry *stations_dir = sta->local->debugfs.stations; -u8 mac[3 *ETH_ALEN ]; +u8 mac[3 *ETH_ALEN +IFNAMSIZ +2 ]; sta->debugfs.add_has_run = true;if (!stations_dir)return ; -snprintf (mac,sizeof (mac),"%pM" , sta->sta.addr); +if (sta->sdata) +snprintf (mac,sizeof (mac),"%pM-%s" , + sta->sta.addr, sta->sdata->name); +else +snprintf (mac,sizeof (mac),"%pM-NULL" , sta->sta.addr);/* * This might fail due to a race condition:
Signature · 1 line
1.7.2.2
Johannes Berg
maintainerQuoted 23 lines · On Mon, 2010-09-20 at 21:21 -0700, [email protected] wrote:
From: Ben Greear <[email protected]>
MAC address of AP isn't unique..need to add the device name as well.
Signed-off-by Ben Greear <[email protected]>---
:100644 100644 76839d4... 4cf451c... Mnet/mac80211/debugfs_sta.cnet/mac80211/debugfs_sta.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)net/mac80211/debugfs_sta.c +1
-1@@ -301,14 +301,18 @@ STA_OPS(ht_capa);void ieee80211_sta_debugfs_add (struct sta_info *sta) {struct dentry *stations_dir = sta->local->debugfs.stations; -u8 mac[3 *ETH_ALEN ]; +u8 mac[3 *ETH_ALEN +IFNAMSIZ +2 ]; sta->debugfs.add_has_run = true;
net/mac80211/debugfs_sta.c STA_OPS(ht_capa); · line 315
Quoted 10 lines
net/mac80211/debugfs_sta.c +5
-1if (!stations_dir)return ; -snprintf (mac,sizeof (mac),"%pM" , sta->sta.addr); +if (sta->sdata) +snprintf (mac,sizeof (mac),"%pM-%s" , + sta->sta.addr, sta->sdata->name); +else +snprintf (mac,sizeof (mac),"%pM-NULL" , sta->sta.addr);
Does that NULL case really happen? I don't think it can, because we shouldn't be adding this to debugfs before we assign it to an interface?
johannes
Quoted 28 lines · Johannes Berg
Quoted 27 lines · On Mon, 2010-09-20 at 21:21 -0700, [email protected] wrote:
From: Ben Greear<[email protected]>
MAC address of AP isn't unique..need to add the device name as well.
Signed-off-by Ben Greear<[email protected]>---
:100644 100644 76839d4... 4cf451c... Mnet/mac80211/debugfs_sta.cnet/mac80211/debugfs_sta.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)net/mac80211/debugfs_sta.c +1
-1@@ -301,14 +301,18 @@ STA_OPS(ht_capa);void ieee80211_sta_debugfs_add (struct sta_info *sta) {struct dentry *stations_dir = sta->local->debugfs.stations; -u8 mac[3 *ETH_ALEN ]; +u8 mac[3 *ETH_ALEN +IFNAMSIZ +2 ]; sta->debugfs.add_has_run = true;if (!stations_dir)return ;
Quoted 9 lines
net/mac80211/debugfs_sta.c STA_OPS(ht_capa); · line 315
Quoted 6 lines
net/mac80211/debugfs_sta.c +5
-1-snprintf (mac,sizeof (mac),"%pM" , sta->sta.addr); +if (sta->sdata) +snprintf (mac,sizeof (mac),"%pM-%s" , + sta->sta.addr, sta->sdata->name); +else +snprintf (mac,sizeof (mac),"%pM-NULL" , sta->sta.addr);Does that NULL case really happen? I don't think it can, because we shouldn't be adding this to debugfs before we assign it to an interface?
I haven't seen it be NULL...just was a bit paranoid. I'll re-spin w/out that NULL check.
Thanks,
Ben
Quoted 2 lines
johannes
Signature · 2 lines
Ben Greear <[email protected]> Candela Technologies Inc http://www.candelatech.com