linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: Add num_stations connected in debugfs
@ 2011-04-24 11:55 Mohammed Shafi Shajakhan
  2011-04-24 13:36 ` Johannes Berg
  0 siblings, 1 reply; 12+ messages in thread
From: Mohammed Shafi Shajakhan @ 2011-04-24 11:55 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, johannes, L.Kriara, Mohammed Shafi Shajakhan

From: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>

this will be useful when the device is operating in AP/Ad-Hoc/Mesh
mode

Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
---
 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


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] mac80211: Add num_stations connected in debugfs
  2011-04-24 11:55 [PATCH] mac80211: Add num_stations connected in debugfs Mohammed Shafi Shajakhan
@ 2011-04-24 13:36 ` Johannes Berg
  2011-04-24 14:19   ` Mohammed Shafi
  0 siblings, 1 reply; 12+ messages in thread
From: Johannes Berg @ 2011-04-24 13:36 UTC (permalink / raw)
  To: Mohammed Shafi Shajakhan; +Cc: linville, linux-wireless, L.Kriara

On Sun, 2011-04-24 at 17:25 +0530, Mohammed Shafi Shajakhan wrote:
> From: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
> 
> 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



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] mac80211: Add num_stations connected in debugfs
  2011-04-24 13:36 ` Johannes Berg
@ 2011-04-24 14:19   ` Mohammed Shafi
  2011-04-24 14:59     ` Johannes Berg
  0 siblings, 1 reply; 12+ messages in thread
From: Mohammed Shafi @ 2011-04-24 14:19 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Mohammed Shajakhan, linville@tuxdriver.com,
	linux-wireless@vger.kernel.org, L.Kriara@sms.ed.ac.uk

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<mshajakhan@atheros.com>
>>
>> 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
>
>
>    

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] mac80211: Add num_stations connected in debugfs
  2011-04-24 14:19   ` Mohammed Shafi
@ 2011-04-24 14:59     ` Johannes Berg
  2011-04-24 15:27       ` Mohammed Shafi
  0 siblings, 1 reply; 12+ messages in thread
From: Johannes Berg @ 2011-04-24 14:59 UTC (permalink / raw)
  To: Mohammed Shafi
  Cc: Mohammed Shajakhan, linville@tuxdriver.com,
	linux-wireless@vger.kernel.org, L.Kriara@sms.ed.ac.uk

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<mshajakhan@atheros.com>
> >>
> >> 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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] mac80211: Add num_stations connected in debugfs
  2011-04-24 14:59     ` Johannes Berg
@ 2011-04-24 15:27       ` Mohammed Shafi
  2011-04-24 15:32         ` Johannes Berg
  0 siblings, 1 reply; 12+ messages in thread
From: Mohammed Shafi @ 2011-04-24 15:27 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Mohammed Shajakhan, linville@tuxdriver.com,
	linux-wireless@vger.kernel.org, L.Kriara@sms.ed.ac.uk

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 :)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] mac80211: Add num_stations connected in debugfs
  2011-04-24 15:27       ` Mohammed Shafi
@ 2011-04-24 15:32         ` Johannes Berg
  2011-04-25  4:30           ` Mohammed Shafi
  0 siblings, 1 reply; 12+ messages in thread
From: Johannes Berg @ 2011-04-24 15:32 UTC (permalink / raw)
  To: Mohammed Shafi
  Cc: Mohammed Shajakhan, linville@tuxdriver.com,
	linux-wireless@vger.kernel.org, L.Kriara@sms.ed.ac.uk

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] mac80211: Add num_stations connected in debugfs
  2011-04-24 15:32         ` Johannes Berg
@ 2011-04-25  4:30           ` Mohammed Shafi
  2011-04-26 11:58             ` Lito Kriara
  0 siblings, 1 reply; 12+ messages in thread
From: Mohammed Shafi @ 2011-04-25  4:30 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Mohammed Shajakhan, linville@tuxdriver.com,
	linux-wireless@vger.kernel.org, L.Kriara@sms.ed.ac.uk

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
>
>    

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] mac80211: Add num_stations connected in debugfs
  2011-04-25  4:30           ` Mohammed Shafi
@ 2011-04-26 11:58             ` Lito Kriara
  2011-04-26 12:03               ` Mohammed Shafi
  0 siblings, 1 reply; 12+ messages in thread
From: Lito Kriara @ 2011-04-26 11:58 UTC (permalink / raw)
  To: Mohammed Shafi
  Cc: Johannes Berg, Mohammed Shajakhan, linville@tuxdriver.com,
	linux-wireless@vger.kernel.org

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 <mshajakhan@Atheros.com> 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.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] mac80211: Add num_stations connected in debugfs
  2011-04-26 11:58             ` Lito Kriara
@ 2011-04-26 12:03               ` Mohammed Shafi
  2011-04-26 12:07                 ` Johannes Berg
  0 siblings, 1 reply; 12+ messages in thread
From: Mohammed Shafi @ 2011-04-26 12:03 UTC (permalink / raw)
  To: Lito Kriara
  Cc: Mohammed Shajakhan, Johannes Berg, linville@tuxdriver.com,
	linux-wireless@vger.kernel.org

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<mshajakhan@Atheros.com>  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
>>>
>>>
>>>        
>
>
>    

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] mac80211: Add num_stations connected in debugfs
  2011-04-26 12:03               ` Mohammed Shafi
@ 2011-04-26 12:07                 ` Johannes Berg
  2011-04-26 12:10                   ` Lito Kriara
  2011-04-26 12:14                   ` Mohammed Shafi
  0 siblings, 2 replies; 12+ messages in thread
From: Johannes Berg @ 2011-04-26 12:07 UTC (permalink / raw)
  To: Mohammed Shafi
  Cc: Lito Kriara, Mohammed Shajakhan, linville@tuxdriver.com,
	linux-wireless@vger.kernel.org

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] mac80211: Add num_stations connected in debugfs
  2011-04-26 12:07                 ` Johannes Berg
@ 2011-04-26 12:10                   ` Lito Kriara
  2011-04-26 12:14                   ` Mohammed Shafi
  1 sibling, 0 replies; 12+ messages in thread
From: Lito Kriara @ 2011-04-26 12:10 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Mohammed Shafi, Mohammed Shajakhan, linville@tuxdriver.com,
	linux-wireless@vger.kernel.org

Ok! Thank you all very much for your help!
I will try that very soon.
Lito :)



Quoting Johannes Berg <johannes@sipsolutions.net> 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.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] mac80211: Add num_stations connected in debugfs
  2011-04-26 12:07                 ` Johannes Berg
  2011-04-26 12:10                   ` Lito Kriara
@ 2011-04-26 12:14                   ` Mohammed Shafi
  1 sibling, 0 replies; 12+ messages in thread
From: Mohammed Shafi @ 2011-04-26 12:14 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Mohammed Shajakhan, Lito Kriara, linville@tuxdriver.com,
	linux-wireless@vger.kernel.org

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
>
>    

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-04-26 12:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-24 11:55 [PATCH] mac80211: Add num_stations connected in debugfs Mohammed Shafi Shajakhan
2011-04-24 13:36 ` Johannes Berg
2011-04-24 14:19   ` Mohammed Shafi
2011-04-24 14:59     ` Johannes Berg
2011-04-24 15:27       ` Mohammed Shafi
2011-04-24 15:32         ` Johannes Berg
2011-04-25  4:30           ` Mohammed Shafi
2011-04-26 11:58             ` Lito Kriara
2011-04-26 12:03               ` Mohammed Shafi
2011-04-26 12:07                 ` Johannes Berg
2011-04-26 12:10                   ` Lito Kriara
2011-04-26 12:14                   ` Mohammed Shafi

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).