* [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
@ 2010-09-23 3:29 greearb
2010-09-23 8:36 ` Johannes Berg
0 siblings, 1 reply; 23+ messages in thread
From: greearb @ 2010-09-23 3:29 UTC (permalink / raw)
To: linux-wireless; +Cc: Ben Greear
From: Ben Greear <greearb@candelatech.com>
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>
---
: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(-)
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index e81ef4e..ebd5b69 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -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);
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index 20b2998..3e12430 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -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);
}
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 76839d4..6b7ff9f 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -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;
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 9346a6b..3c7c230 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -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
--
1.7.2.3
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
2010-09-23 3:29 [mac80211] mac80211: Support multiple VIFS per AP in debugfs greearb
@ 2010-09-23 8:36 ` Johannes Berg
2010-10-16 19:00 ` Christian Lamparter
0 siblings, 1 reply; 23+ messages in thread
From: Johannes Berg @ 2010-09-23 8:36 UTC (permalink / raw)
To: greearb; +Cc: linux-wireless, Ben Greear
On Wed, 2010-09-22 at 20:29 -0700, greearb@gmail.com wrote:
> From: Ben Greear <greearb@candelatech.com>
>
> 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>
> ---
> :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(-)
>
> diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
> index e81ef4e..ebd5b69 100644
> --- a/net/mac80211/debugfs.c
> +++ b/net/mac80211/debugfs.c
> @@ -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);
> diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
> index 20b2998..3e12430 100644
> --- a/net/mac80211/debugfs_netdev.c
> +++ b/net/mac80211/debugfs_netdev.c
> @@ -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);
> }
>
> diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
> index 76839d4..6b7ff9f 100644
> --- a/net/mac80211/debugfs_sta.c
> +++ b/net/mac80211/debugfs_sta.c
> @@ -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;
> diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
> index 9346a6b..3c7c230 100644
> --- a/net/mac80211/ieee80211_i.h
> +++ b/net/mac80211/ieee80211_i.h
> @@ -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
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
2010-09-23 8:36 ` Johannes Berg
@ 2010-10-16 19:00 ` Christian Lamparter
2010-10-18 20:05 ` Ben Greear
[not found] ` <4CDAF182.4030409@candelatech.com>
0 siblings, 2 replies; 23+ messages in thread
From: Christian Lamparter @ 2010-10-16 19:00 UTC (permalink / raw)
To: Johannes Berg; +Cc: greearb, linux-wireless, Ben Greear
On Thursday 23 September 2010 10:36:58 Johannes Berg wrote:
> On Wed, 2010-09-22 at 20:29 -0700, greearb@gmail.com wrote:
> > From: Ben Greear <greearb@candelatech.com>
> >
> > 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>
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)
>
> > ---
> > :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(-)
> >
> > diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
> > index e81ef4e..ebd5b69 100644
> > --- a/net/mac80211/debugfs.c
> > +++ b/net/mac80211/debugfs.c
> > @@ -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);
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
2010-10-16 19:00 ` Christian Lamparter
@ 2010-10-18 20:05 ` Ben Greear
[not found] ` <4CDAF182.4030409@candelatech.com>
1 sibling, 0 replies; 23+ messages in thread
From: Ben Greear @ 2010-10-18 20:05 UTC (permalink / raw)
To: Christian Lamparter; +Cc: Johannes Berg, greearb, linux-wireless
On 10/16/2010 12:00 PM, Christian Lamparter wrote:
> On Thursday 23 September 2010 10:36:58 Johannes Berg wrote:
>> On Wed, 2010-09-22 at 20:29 -0700, greearb@gmail.com wrote:
>>> From: Ben Greear<greearb@candelatech.com>
>>>
>>> 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>
>
> 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
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 23+ messages in thread[parent not found: <4CDAF182.4030409@candelatech.com>]
* Re: [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
[not found] ` <4CDAF182.4030409@candelatech.com>
@ 2010-11-10 20:01 ` Christian Lamparter
0 siblings, 0 replies; 23+ messages in thread
From: Christian Lamparter @ 2010-11-10 20:01 UTC (permalink / raw)
To: Ben Greear; +Cc: linux-wireless
On Wednesday 10 November 2010 20:24:50 Ben Greear wrote:
> On 10/16/2010 12:00 PM, Christian Lamparter wrote:
> > On Thursday 23 September 2010 10:36:58 Johannes Berg wrote:
> >> On Wed, 2010-09-22 at 20:29 -0700, greearb@gmail.com wrote:
> >>> From: Ben Greear<greearb@candelatech.com>
> >>>
> >>> 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>
> >
> > 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.
> 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
^ permalink raw reply [flat|nested] 23+ messages in thread
* [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
@ 2010-09-21 12:15 greearb
2010-09-21 16:25 ` Ben Greear
0 siblings, 1 reply; 23+ messages in thread
From: greearb @ 2010-09-21 12:15 UTC (permalink / raw)
To: linux-wireless; +Cc: Ben Greear
From: Ben Greear <greearb@candelatech.com>
MAC address of AP isn't unique..need to add the device
name as well.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
:100644 100644 76839d4... e802fce... M net/mac80211/debugfs_sta.c
net/mac80211/debugfs_sta.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 76839d4..e802fce 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -301,14 +301,15 @@ 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);
+ snprintf(mac, sizeof(mac), "%pM-%s",
+ sta->sta.addr, sta->sdata->name);
/*
* This might fail due to a race condition:
--
1.7.2.2
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
2010-09-21 12:15 greearb
@ 2010-09-21 16:25 ` Ben Greear
2010-09-21 16:30 ` Johannes Berg
0 siblings, 1 reply; 23+ messages in thread
From: Ben Greear @ 2010-09-21 16:25 UTC (permalink / raw)
Cc: linux-wireless
On 09/21/2010 05:15 AM, greearb@gmail.com wrote:
> From: Ben Greear<greearb@candelatech.com>
>
> MAC address of AP isn't unique..need to add the device
> name as well.
>
> Signed-off-by: Ben Greear<greearb@candelatech.com>
> ---
> :100644 100644 76839d4... e802fce... M net/mac80211/debugfs_sta.c
> net/mac80211/debugfs_sta.c | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
> index 76839d4..e802fce 100644
> --- a/net/mac80211/debugfs_sta.c
> +++ b/net/mac80211/debugfs_sta.c
> @@ -301,14 +301,15 @@ 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);
> + snprintf(mac, sizeof(mac), "%pM-%s",
> + sta->sta.addr, sta->sdata->name);
>
> /*
> * This might fail due to a race condition:
I got to thinking: Is there any reason to put the sta.addr in there?
Maybe just use sta->sdata->name? Seems it might be easier for
scripts to deal with?
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
2010-09-21 16:25 ` Ben Greear
@ 2010-09-21 16:30 ` Johannes Berg
2010-09-21 16:42 ` Ben Greear
0 siblings, 1 reply; 23+ messages in thread
From: Johannes Berg @ 2010-09-21 16:30 UTC (permalink / raw)
To: Ben Greear; +Cc: linux-wireless
On Tue, 2010-09-21 at 09:25 -0700, Ben Greear wrote:
> > - snprintf(mac, sizeof(mac), "%pM", sta->sta.addr);
> > + snprintf(mac, sizeof(mac), "%pM-%s",
> > + sta->sta.addr, sta->sdata->name);
> >
> > /*
> > * This might fail due to a race condition:
>
> I got to thinking: Is there any reason to put the sta.addr in there?
>
> Maybe just use sta->sdata->name? Seems it might be easier for
> scripts to deal with?
APs have many STAs
johannes
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
2010-09-21 16:30 ` Johannes Berg
@ 2010-09-21 16:42 ` Ben Greear
2010-09-21 17:03 ` Johannes Berg
0 siblings, 1 reply; 23+ messages in thread
From: Ben Greear @ 2010-09-21 16:42 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
On 09/21/2010 09:30 AM, Johannes Berg wrote:
> On Tue, 2010-09-21 at 09:25 -0700, Ben Greear wrote:
>
>>> - snprintf(mac, sizeof(mac), "%pM", sta->sta.addr);
>>> + snprintf(mac, sizeof(mac), "%pM-%s",
>>> + sta->sta.addr, sta->sdata->name);
>>>
>>> /*
>>> * This might fail due to a race condition:
>>
>> I got to thinking: Is there any reason to put the sta.addr in there?
>>
>> Maybe just use sta->sdata->name? Seems it might be easier for
>> scripts to deal with?
>
> APs have many STAs
So, when in STA mode, sta_info are related to local VIFs, but
in AP mode, they represent the remote wireless devices, with sdata pointing
to the local AP interface?
Thanks,
Ben
>
> johannes
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
2010-09-21 16:42 ` Ben Greear
@ 2010-09-21 17:03 ` Johannes Berg
2010-09-21 17:49 ` Johannes Berg
0 siblings, 1 reply; 23+ messages in thread
From: Johannes Berg @ 2010-09-21 17:03 UTC (permalink / raw)
To: Ben Greear; +Cc: linux-wireless
On Tue, 2010-09-21 at 09:42 -0700, Ben Greear wrote:
> On 09/21/2010 09:30 AM, Johannes Berg wrote:
> > On Tue, 2010-09-21 at 09:25 -0700, Ben Greear wrote:
> >
> >>> - snprintf(mac, sizeof(mac), "%pM", sta->sta.addr);
> >>> + snprintf(mac, sizeof(mac), "%pM-%s",
> >>> + sta->sta.addr, sta->sdata->name);
> >>>
> >>> /*
> >>> * This might fail due to a race condition:
> >>
> >> I got to thinking: Is there any reason to put the sta.addr in there?
> >>
> >> Maybe just use sta->sdata->name? Seems it might be easier for
> >> scripts to deal with?
> >
> > APs have many STAs
>
> So, when in STA mode, sta_info are related to local VIFs, but
> in AP mode, they represent the remote wireless devices, with sdata pointing
> to the local AP interface?
No, there's a sta_info for each peer, which in STA mode is only the AP.
johannes
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
2010-09-21 17:03 ` Johannes Berg
@ 2010-09-21 17:49 ` Johannes Berg
2010-09-21 18:02 ` Ben Greear
2010-09-22 16:59 ` Ben Greear
0 siblings, 2 replies; 23+ messages in thread
From: Johannes Berg @ 2010-09-21 17:49 UTC (permalink / raw)
To: Ben Greear; +Cc: linux-wireless
On Tue, 2010-09-21 at 19:03 +0200, Johannes Berg wrote:
> > >>> - snprintf(mac, sizeof(mac), "%pM", sta->sta.addr);
> > >>> + snprintf(mac, sizeof(mac), "%pM-%s",
> > >>> + sta->sta.addr, sta->sdata->name);
> > >>>
> > >>> /*
> > >>> * This might fail due to a race condition:
> > >>
> > >> I got to thinking: Is there any reason to put the sta.addr in there?
> > >>
> > >> Maybe just use sta->sdata->name? Seems it might be easier for
> > >> scripts to deal with?
> > >
> > > APs have many STAs
> >
> > So, when in STA mode, sta_info are related to local VIFs, but
> > in AP mode, they represent the remote wireless devices, with sdata pointing
> > to the local AP interface?
>
> No, there's a sta_info for each peer, which in STA mode is only the AP.
maybe the stations should be moved from phy0/stations/ to
phy0/wlan0/stations/ instead?
johannes
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
2010-09-21 17:49 ` Johannes Berg
@ 2010-09-21 18:02 ` Ben Greear
2010-09-22 16:59 ` Ben Greear
1 sibling, 0 replies; 23+ messages in thread
From: Ben Greear @ 2010-09-21 18:02 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
On 09/21/2010 10:49 AM, Johannes Berg wrote:
> On Tue, 2010-09-21 at 19:03 +0200, Johannes Berg wrote:
>
>>>>>> - snprintf(mac, sizeof(mac), "%pM", sta->sta.addr);
>>>>>> + snprintf(mac, sizeof(mac), "%pM-%s",
>>>>>> + sta->sta.addr, sta->sdata->name);
>>>>>>
>>>>>> /*
>>>>>> * This might fail due to a race condition:
>>>>>
>>>>> I got to thinking: Is there any reason to put the sta.addr in there?
>>>>>
>>>>> Maybe just use sta->sdata->name? Seems it might be easier for
>>>>> scripts to deal with?
>>>>
>>>> APs have many STAs
>>>
>>> So, when in STA mode, sta_info are related to local VIFs, but
>>> in AP mode, they represent the remote wireless devices, with sdata pointing
>>> to the local AP interface?
>>
>> No, there's a sta_info for each peer, which in STA mode is only the AP.
>
> maybe the stations should be moved from phy0/stations/ to
> phy0/wlan0/stations/ instead?
That would be fine with me.
Thanks,
Ben
>
> johannes
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
2010-09-21 17:49 ` Johannes Berg
2010-09-21 18:02 ` Ben Greear
@ 2010-09-22 16:59 ` Ben Greear
2010-09-22 17:01 ` Johannes Berg
1 sibling, 1 reply; 23+ messages in thread
From: Ben Greear @ 2010-09-22 16:59 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
On 09/21/2010 10:49 AM, Johannes Berg wrote:
> On Tue, 2010-09-21 at 19:03 +0200, Johannes Berg wrote:
>
>>>>>> - snprintf(mac, sizeof(mac), "%pM", sta->sta.addr);
>>>>>> + snprintf(mac, sizeof(mac), "%pM-%s",
>>>>>> + sta->sta.addr, sta->sdata->name);
>>>>>>
>>>>>> /*
>>>>>> * This might fail due to a race condition:
>>>>>
>>>>> I got to thinking: Is there any reason to put the sta.addr in there?
>>>>>
>>>>> Maybe just use sta->sdata->name? Seems it might be easier for
>>>>> scripts to deal with?
>>>>
>>>> APs have many STAs
>>>
>>> So, when in STA mode, sta_info are related to local VIFs, but
>>> in AP mode, they represent the remote wireless devices, with sdata pointing
>>> to the local AP interface?
>>
>> No, there's a sta_info for each peer, which in STA mode is only the AP.
>
> maybe the stations should be moved from phy0/stations/ to
> phy0/wlan0/stations/ instead?
It doesn't matter either way to me, but I'd like to get one or another
patch upstream.
If you want me to change it to put stations under netdev:wlan0/ instead,
please just let me know.
Thanks,
Ben
>
> johannes
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
2010-09-22 16:59 ` Ben Greear
@ 2010-09-22 17:01 ` Johannes Berg
2010-09-22 17:34 ` Ben Greear
0 siblings, 1 reply; 23+ messages in thread
From: Johannes Berg @ 2010-09-22 17:01 UTC (permalink / raw)
To: Ben Greear; +Cc: linux-wireless
On Wed, 2010-09-22 at 09:59 -0700, Ben Greear wrote:
> > maybe the stations should be moved from phy0/stations/ to
> > phy0/wlan0/stations/ instead?
>
> It doesn't matter either way to me, but I'd like to get one or another
> patch upstream.
>
> If you want me to change it to put stations under netdev:wlan0/ instead,
> please just let me know.
I'd prefer that, if you want to do this.
johannes
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
2010-09-22 17:01 ` Johannes Berg
@ 2010-09-22 17:34 ` Ben Greear
2010-09-22 18:31 ` Johannes Berg
0 siblings, 1 reply; 23+ messages in thread
From: Ben Greear @ 2010-09-22 17:34 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
On 09/22/2010 10:01 AM, Johannes Berg wrote:
> On Wed, 2010-09-22 at 09:59 -0700, Ben Greear wrote:
>
>>> maybe the stations should be moved from phy0/stations/ to
>>> phy0/wlan0/stations/ instead?
>>
>> It doesn't matter either way to me, but I'd like to get one or another
>> patch upstream.
>>
>> If you want me to change it to put stations under netdev:wlan0/ instead,
>> please just let me know.
>
> I'd prefer that, if you want to do this.
>
> johannes
Something like this?
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index e81ef4e..ebd5b69 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -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);
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 76839d4..dea24e6 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -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.dir;
u8 mac[3*ETH_ALEN];
sta->debugfs.add_has_run = true;
@@ -308,7 +308,7 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta)
if (!stations_dir)
return;
- snprintf(mac, sizeof(mac), "%pM", sta->sta.addr);
+ snprintf(mac, sizeof(mac), "sta-%pM", sta->sta.addr);
/*
* This might fail due to a race condition:
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 9346a6b..d03191c 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -899,7 +899,6 @@ struct ieee80211_local {
#ifdef CONFIG_MAC80211_DEBUGFS
struct local_debugfsdentries {
struct dentry *rcdir;
- struct dentry *stations;
struct dentry *keys;
} debugfs;
#endif
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
2010-09-22 17:34 ` Ben Greear
@ 2010-09-22 18:31 ` Johannes Berg
2010-09-22 18:48 ` John W. Linville
0 siblings, 1 reply; 23+ messages in thread
From: Johannes Berg @ 2010-09-22 18:31 UTC (permalink / raw)
To: Ben Greear; +Cc: linux-wireless
On Wed, 2010-09-22 at 10:34 -0700, Ben Greear wrote:
> @@ -308,7 +308,7 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta)
> if (!stations_dir)
> return;
>
> - snprintf(mac, sizeof(mac), "%pM", sta->sta.addr);
> + snprintf(mac, sizeof(mac), "sta-%pM", sta->sta.addr);
Wouldn't a stations/ subdirectory in netdev:wlan0 be nicer? I don't
really care too much -- what do others think?
johannes
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
2010-09-22 18:31 ` Johannes Berg
@ 2010-09-22 18:48 ` John W. Linville
2010-09-22 19:45 ` Ben Greear
0 siblings, 1 reply; 23+ messages in thread
From: John W. Linville @ 2010-09-22 18:48 UTC (permalink / raw)
To: Johannes Berg; +Cc: Ben Greear, linux-wireless
On Wed, Sep 22, 2010 at 08:31:05PM +0200, Johannes Berg wrote:
> On Wed, 2010-09-22 at 10:34 -0700, Ben Greear wrote:
>
> > @@ -308,7 +308,7 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta)
> > if (!stations_dir)
> > return;
> >
> > - snprintf(mac, sizeof(mac), "%pM", sta->sta.addr);
> > + snprintf(mac, sizeof(mac), "sta-%pM", sta->sta.addr);
>
> Wouldn't a stations/ subdirectory in netdev:wlan0 be nicer? I don't
> really care too much -- what do others think?
Sounds better that way to me too...
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
2010-09-22 18:48 ` John W. Linville
@ 2010-09-22 19:45 ` Ben Greear
2010-09-23 8:30 ` Johannes Berg
0 siblings, 1 reply; 23+ messages in thread
From: Ben Greear @ 2010-09-22 19:45 UTC (permalink / raw)
To: John W. Linville; +Cc: Johannes Berg, linux-wireless
On 09/22/2010 11:48 AM, John W. Linville wrote:
> On Wed, Sep 22, 2010 at 08:31:05PM +0200, Johannes Berg wrote:
>> On Wed, 2010-09-22 at 10:34 -0700, Ben Greear wrote:
>>
>>> @@ -308,7 +308,7 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta)
>>> if (!stations_dir)
>>> return;
>>>
>>> - snprintf(mac, sizeof(mac), "%pM", sta->sta.addr);
>>> + snprintf(mac, sizeof(mac), "sta-%pM", sta->sta.addr);
>>
>> Wouldn't a stations/ subdirectory in netdev:wlan0 be nicer? I don't
>> really care too much -- what do others think?
>
> Sounds better that way to me too...
>
This look better?
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index e81ef4e..ebd5b69 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -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);
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c
index 20b2998..3e12430 100644
--- a/net/mac80211/debugfs_netdev.c
+++ b/net/mac80211/debugfs_netdev.c
@@ -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);
}
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 76839d4..6b7ff9f 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -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;
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 9346a6b..3c7c230 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -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
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
2010-09-22 19:45 ` Ben Greear
@ 2010-09-23 8:30 ` Johannes Berg
2010-09-23 13:12 ` Ben Greear
0 siblings, 1 reply; 23+ messages in thread
From: Johannes Berg @ 2010-09-23 8:30 UTC (permalink / raw)
To: Ben Greear; +Cc: John W. Linville, linux-wireless
On Wed, 2010-09-22 at 12:45 -0700, Ben Greear wrote:
> This look better?
>
> diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
> index e81ef4e..ebd5b69 100644
> --- a/net/mac80211/debugfs.c
> +++ b/net/mac80211/debugfs.c
> @@ -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);
Yeah, but completely whitespace damaged, you're going to have to work on
your submissions :)
Also, why do you do "[mac80211] mac80211" rather than "[PATCH]
mac80211"?
johannes
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
2010-09-23 8:30 ` Johannes Berg
@ 2010-09-23 13:12 ` Ben Greear
0 siblings, 0 replies; 23+ messages in thread
From: Ben Greear @ 2010-09-23 13:12 UTC (permalink / raw)
To: Johannes Berg; +Cc: John W. Linville, linux-wireless
On 09/23/2010 01:30 AM, Johannes Berg wrote:
> On Wed, 2010-09-22 at 12:45 -0700, Ben Greear wrote:
>
>> This look better?
>>
>> diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
>> index e81ef4e..ebd5b69 100644
>> --- a/net/mac80211/debugfs.c
>> +++ b/net/mac80211/debugfs.c
>> @@ -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);
>
> Yeah, but completely whitespace damaged, you're going to have to work on
> your submissions :)
>
> Also, why do you do "[mac80211] mac80211" rather than "[PATCH]
> mac80211"?
That was just pasted into email..I'll fix up your other suggestions and
re-submit using git. I'll see if I can get the email subject more correct
as well.
Thanks,
Ben
>
> johannes
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 23+ messages in thread
* [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
@ 2010-09-21 4:21 greearb
2010-09-21 6:48 ` Johannes Berg
0 siblings, 1 reply; 23+ messages in thread
From: greearb @ 2010-09-21 4:21 UTC (permalink / raw)
To: linux-wireless; +Cc: Ben Greear
From: Ben Greear <greearb@candelatech.com>
MAC address of AP isn't unique..need to add the device
name as well.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
:100644 100644 76839d4... 4cf451c... M net/mac80211/debugfs_sta.c
net/mac80211/debugfs_sta.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 76839d4..4cf451c 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -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:
--
1.7.2.2
^ permalink raw reply related [flat|nested] 23+ messages in thread* Re: [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
2010-09-21 4:21 greearb
@ 2010-09-21 6:48 ` Johannes Berg
2010-09-21 12:04 ` Ben Greear
0 siblings, 1 reply; 23+ messages in thread
From: Johannes Berg @ 2010-09-21 6:48 UTC (permalink / raw)
To: greearb; +Cc: linux-wireless, Ben Greear
On Mon, 2010-09-20 at 21:21 -0700, greearb@gmail.com wrote:
> From: Ben Greear <greearb@candelatech.com>
>
> MAC address of AP isn't unique..need to add the device
> name as well.
>
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
> :100644 100644 76839d4... 4cf451c... M net/mac80211/debugfs_sta.c
> net/mac80211/debugfs_sta.c | 8 ++++++--
> 1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
> index 76839d4..4cf451c 100644
> --- a/net/mac80211/debugfs_sta.c
> +++ b/net/mac80211/debugfs_sta.c
> @@ -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);
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
^ permalink raw reply [flat|nested] 23+ messages in thread* Re: [mac80211] mac80211: Support multiple VIFS per AP in debugfs.
2010-09-21 6:48 ` Johannes Berg
@ 2010-09-21 12:04 ` Ben Greear
0 siblings, 0 replies; 23+ messages in thread
From: Ben Greear @ 2010-09-21 12:04 UTC (permalink / raw)
To: Johannes Berg; +Cc: greearb, linux-wireless
On 09/20/2010 11:48 PM, Johannes Berg wrote:
> On Mon, 2010-09-20 at 21:21 -0700, greearb@gmail.com wrote:
>> From: Ben Greear<greearb@candelatech.com>
>>
>> MAC address of AP isn't unique..need to add the device
>> name as well.
>>
>> Signed-off-by: Ben Greear<greearb@candelatech.com>
>> ---
>> :100644 100644 76839d4... 4cf451c... M net/mac80211/debugfs_sta.c
>> net/mac80211/debugfs_sta.c | 8 ++++++--
>> 1 files changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
>> index 76839d4..4cf451c 100644
>> --- a/net/mac80211/debugfs_sta.c
>> +++ b/net/mac80211/debugfs_sta.c
>> @@ -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);
>
> 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
>
> johannes
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2010-11-10 20:01 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-23 3:29 [mac80211] mac80211: Support multiple VIFS per AP in debugfs greearb
2010-09-23 8:36 ` Johannes Berg
2010-10-16 19:00 ` Christian Lamparter
2010-10-18 20:05 ` Ben Greear
[not found] ` <4CDAF182.4030409@candelatech.com>
2010-11-10 20:01 ` Christian Lamparter
-- strict thread matches above, loose matches on Subject: below --
2010-09-21 12:15 greearb
2010-09-21 16:25 ` Ben Greear
2010-09-21 16:30 ` Johannes Berg
2010-09-21 16:42 ` Ben Greear
2010-09-21 17:03 ` Johannes Berg
2010-09-21 17:49 ` Johannes Berg
2010-09-21 18:02 ` Ben Greear
2010-09-22 16:59 ` Ben Greear
2010-09-22 17:01 ` Johannes Berg
2010-09-22 17:34 ` Ben Greear
2010-09-22 18:31 ` Johannes Berg
2010-09-22 18:48 ` John W. Linville
2010-09-22 19:45 ` Ben Greear
2010-09-23 8:30 ` Johannes Berg
2010-09-23 13:12 ` Ben Greear
2010-09-21 4:21 greearb
2010-09-21 6:48 ` Johannes Berg
2010-09-21 12:04 ` Ben Greear
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).