From: Mohammed Shafi Shajakhan <[email protected]>
this will be useful when the device is operating in AP/Ad-Hoc/Mesh
mode
Signed-off-by: Mohammed Shafi Shajakhan <[email protected]>
---
net/mac80211/debugfs.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index 0a602db..c16b81c 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -65,6 +65,8 @@ static const struct file_operations name## _ops = { \
debugfs_create_file(#name, mode, phyd, local, &name## _ops);
+DEBUGFS_READONLY_FILE(num_stations , "%lu",
+ local->num_sta);
DEBUGFS_READONLY_FILE(user_power, "%d",
local->user_power_level);
DEBUGFS_READONLY_FILE(power, "%d",
@@ -460,6 +462,7 @@ void debugfs_hw_add(struct ieee80211_local *local)
DEBUGFS_ADD(hwflags);
DEBUGFS_ADD(user_power);
DEBUGFS_ADD(power);
+ DEBUGFS_ADD(num_stations);
statsd = debugfs_create_dir("statistics", phyd);
--
1.7.0.4
On Sun, 2011-04-24 at 17:25 +0530, Mohammed Shafi Shajakhan wrote:
> From: Mohammed Shafi Shajakhan <[email protected]>
>
> this will be useful when the device is operating in AP/Ad-Hoc/Mesh
> mode
Fine with me, but this counts for all virtual interfaces.
johannes
On Tuesday 26 April 2011 05:37 PM, Johannes Berg wrote:
> On Tue, 2011-04-26 at 17:33 +0530, Mohammed Shafi wrote:
>
>> On Tuesday 26 April 2011 05:28 PM, Lito Kriara wrote:
>>
>>> Hello,
>>> I was away the last couple of days and just saw these e-mails. It
>>> seems really interesting and helpful, but what if we need to know at
>>> runtime the number of stations connected to the AP?
>>> Is the first patch sent good to use? Should I do some modification to it?
>>>
>>>
>> Yes this will be fine.
>>
> Or you can use what I wrote without patching:
>
Ok.
>
>>>>> iw wlan0 station dump | grep '^Station ' | wc -l
>>>>>
> FWIW, I wouldn't mind adding the num_sta to debugfs, but as we discussed
> in this thread it's a different number.
>
sure, thanks.
> johannes
>
>
On Sun, 2011-04-24 at 19:49 +0530, Mohammed Shafi wrote:
> On Sunday 24 April 2011 07:06 PM, Johannes Berg wrote:
> > On Sun, 2011-04-24 at 17:25 +0530, Mohammed Shafi Shajakhan wrote:
> >
> >> From: Mohammed Shafi Shajakhan<[email protected]>
> >>
> >> this will be useful when the device is operating in AP/Ad-Hoc/Mesh
> >> mode
> >>
> > Fine with me, but this counts for all virtual interfaces.
> >
> thanks, I had not thought about that. let me also if we can separately
> have the number of stations connected to each virtual interfaces.
Probably not worth it? You can always get it with iw easily anyway, no?
Just do something like "iw wlan0 station dump | grep ... | wc -l"? :-)
johannes
On Tuesday 26 April 2011 05:28 PM, Lito Kriara wrote:
> Hello,
> I was away the last couple of days and just saw these e-mails. It
> seems really interesting and helpful, but what if we need to know at
> runtime the number of stations connected to the AP?
> Is the first patch sent good to use? Should I do some modification to it?
>
Yes this will be fine.
> Thank you all very much,
> Lito
>
>
> Quoting Mohammed Shafi<[email protected]> on Mon, 25 Apr 2011
> 10:00:13 +0530:
>
>
>> On Sunday 24 April 2011 09:02 PM, Johannes Berg wrote:
>>
>>> On Sun, 2011-04-24 at 20:57 +0530, Mohammed Shafi wrote:
>>>
>>>
>>>> On Sunday 24 April 2011 08:29 PM, Johannes Berg wrote:
>>>>
>>>>
>>>>> iw wlan0 station dump | grep ... | wc -l
>>>>>
>>>>>
>>>> thanks, that works! I need to divide by 11 :)
>>>>
>>>>
>>> Heh, yes, but that might change and/or be HW dependent, hence grep. So
>>> if you do
>>>
>>> iw wlan0 station dump | grep '^Station ' | wc -l
>>>
>>> you won't need to divide and won't be HW dependent.
>>>
>>>
>> Oh ok, thanks!
>> regards,
>> shafi
>>
>>
>>> johannes
>>>
>>>
>>>
>
>
>
On Sun, 2011-04-24 at 20:57 +0530, Mohammed Shafi wrote:
> On Sunday 24 April 2011 08:29 PM, Johannes Berg wrote:
> > iw wlan0 station dump | grep ... | wc -l
> thanks, that works! I need to divide by 11 :)
Heh, yes, but that might change and/or be HW dependent, hence grep. So
if you do
iw wlan0 station dump | grep '^Station ' | wc -l
you won't need to divide and won't be HW dependent.
johannes
On Sunday 24 April 2011 07:06 PM, Johannes Berg wrote:
> On Sun, 2011-04-24 at 17:25 +0530, Mohammed Shafi Shajakhan wrote:
>
>> From: Mohammed Shafi Shajakhan<[email protected]>
>>
>> this will be useful when the device is operating in AP/Ad-Hoc/Mesh
>> mode
>>
> Fine with me, but this counts for all virtual interfaces.
>
thanks, I had not thought about that. let me also if we can separately
have the number of stations connected to each virtual interfaces.
> johannes
>
>
>
On Sunday 24 April 2011 08:29 PM, Johannes Berg wrote:
> iw wlan0 station dump | grep ... | wc -l
thanks, that works! I need to divide by 11 :)
Hello,
I was away the last couple of days and just saw these e-mails. It
seems really interesting and helpful, but what if we need to know at
runtime the number of stations connected to the AP?
Is the first patch sent good to use? Should I do some modification to it?
Thank you all very much,
Lito
Quoting Mohammed Shafi <[email protected]> on Mon, 25 Apr 2011
10:00:13 +0530:
> On Sunday 24 April 2011 09:02 PM, Johannes Berg wrote:
>> On Sun, 2011-04-24 at 20:57 +0530, Mohammed Shafi wrote:
>>
>>> On Sunday 24 April 2011 08:29 PM, Johannes Berg wrote:
>>>
>>>> iw wlan0 station dump | grep ... | wc -l
>>>>
>>> thanks, that works! I need to divide by 11 :)
>>>
>> Heh, yes, but that might change and/or be HW dependent, hence grep. So
>> if you do
>>
>> iw wlan0 station dump | grep '^Station ' | wc -l
>>
>> you won't need to divide and won't be HW dependent.
>>
> Oh ok, thanks!
> regards,
> shafi
>
>> johannes
>>
>>
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
Ok! Thank you all very much for your help!
I will try that very soon.
Lito :)
Quoting Johannes Berg <[email protected]> on Tue, 26 Apr 2011
14:07:02 +0200:
> On Tue, 2011-04-26 at 17:33 +0530, Mohammed Shafi wrote:
>> On Tuesday 26 April 2011 05:28 PM, Lito Kriara wrote:
>> > Hello,
>> > I was away the last couple of days and just saw these e-mails. It
>> > seems really interesting and helpful, but what if we need to know at
>> > runtime the number of stations connected to the AP?
>> > Is the first patch sent good to use? Should I do some modification to it?
>> >
>> Yes this will be fine.
>
> Or you can use what I wrote without patching:
>
>> >>> iw wlan0 station dump | grep '^Station ' | wc -l
>
> FWIW, I wouldn't mind adding the num_sta to debugfs, but as we discussed
> in this thread it's a different number.
>
> johannes
>
>
>
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
On Tue, 2011-04-26 at 17:33 +0530, Mohammed Shafi wrote:
> On Tuesday 26 April 2011 05:28 PM, Lito Kriara wrote:
> > Hello,
> > I was away the last couple of days and just saw these e-mails. It
> > seems really interesting and helpful, but what if we need to know at
> > runtime the number of stations connected to the AP?
> > Is the first patch sent good to use? Should I do some modification to it?
> >
> Yes this will be fine.
Or you can use what I wrote without patching:
> >>> iw wlan0 station dump | grep '^Station ' | wc -l
FWIW, I wouldn't mind adding the num_sta to debugfs, but as we discussed
in this thread it's a different number.
johannes
On Sunday 24 April 2011 09:02 PM, Johannes Berg wrote:
> On Sun, 2011-04-24 at 20:57 +0530, Mohammed Shafi wrote:
>
>> On Sunday 24 April 2011 08:29 PM, Johannes Berg wrote:
>>
>>> iw wlan0 station dump | grep ... | wc -l
>>>
>> thanks, that works! I need to divide by 11 :)
>>
> Heh, yes, but that might change and/or be HW dependent, hence grep. So
> if you do
>
> iw wlan0 station dump | grep '^Station ' | wc -l
>
> you won't need to divide and won't be HW dependent.
>
Oh ok, thanks!
regards,
shafi
> johannes
>
>