linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] mac80211: Read the TSF via debugfs
@ 2009-01-23  4:33 Alina Friedrichsen
  2009-01-23 13:47 ` Luis R. Rodriguez
  0 siblings, 1 reply; 4+ messages in thread
From: Alina Friedrichsen @ 2009-01-23  4:33 UTC (permalink / raw)
  To: linux-wireless, linville, johannes

This patch adds an low-level driver independent entry to read the TSF v=
alue into the debugfs of mac80211. This makes debugging the IBSS handli=
ng of wifi drivers easier.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
---
diff -urN compat-wireless-2009-01-22.orig/net/mac80211/debugfs.c compat=
-wireless-2009-01-22/net/mac80211/debugfs.c
--- compat-wireless-2009-01-22.orig/net/mac80211/debugfs.c	2009-01-22 2=
0:51:46.000000000 +0100
+++ compat-wireless-2009-01-22/net/mac80211/debugfs.c	2009-01-23 03:49:=
45.000000000 +0100
@@ -61,6 +61,8 @@
 		      local->wep_iv & 0xffffff);
 DEBUGFS_READONLY_FILE(rate_ctrl_alg, 100, "%s",
 		      local->rate_ctrl ? local->rate_ctrl->ops->name : "<unset>");
+DEBUGFS_READONLY_FILE(tsf, 20, "%#018llx",
+                      (unsigned long long) (local->ops->get_tsf ? loca=
l->ops->get_tsf(local_to_hw(local)) : 0));
=20
 /* statistics stuff */
=20
@@ -202,6 +204,7 @@
 	DEBUGFS_ADD(long_retry_limit);
 	DEBUGFS_ADD(total_ps_buffered);
 	DEBUGFS_ADD(wep_iv);
+	DEBUGFS_ADD(tsf);
=20
 	statsd =3D debugfs_create_dir("statistics", phyd);
 	local->debugfs.statistics =3D statsd;
@@ -255,6 +258,7 @@
 	DEBUGFS_DEL(long_retry_limit);
 	DEBUGFS_DEL(total_ps_buffered);
 	DEBUGFS_DEL(wep_iv);
+	DEBUGFS_DEL(tsf);
=20
 	DEBUGFS_STATS_DEL(transmitted_fragment_count);
 	DEBUGFS_STATS_DEL(multicast_transmitted_frame_count);
diff -urN compat-wireless-2009-01-22.orig/net/mac80211/ieee80211_i.h co=
mpat-wireless-2009-01-22/net/mac80211/ieee80211_i.h
--- compat-wireless-2009-01-22.orig/net/mac80211/ieee80211_i.h	2009-01-=
22 20:51:46.000000000 +0100
+++ compat-wireless-2009-01-22/net/mac80211/ieee80211_i.h	2009-01-23 03=
:55:44.000000000 +0100
@@ -744,6 +744,7 @@
 		struct dentry *long_retry_limit;
 		struct dentry *total_ps_buffered;
 		struct dentry *wep_iv;
+		struct dentry *tsf;
 		struct dentry *statistics;
 		struct local_debugfsdentries_statsdentries {
 			struct dentry *transmitted_fragment_count;

--=20
Psssst! Schon vom neuen GMX MultiMessenger geh=F6rt? Der kann`s mit all=
en: http://www.gmx.net/de/go/multimessenger
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH v2] mac80211: Read the TSF via debugfs
  2009-01-23  4:33 [PATCH v2] mac80211: Read the TSF via debugfs Alina Friedrichsen
@ 2009-01-23 13:47 ` Luis R. Rodriguez
  2009-01-23 16:37   ` Johannes Berg
  2009-01-23 22:43   ` Alina Friedrichsen
  0 siblings, 2 replies; 4+ messages in thread
From: Luis R. Rodriguez @ 2009-01-23 13:47 UTC (permalink / raw)
  To: Alina Friedrichsen; +Cc: linux-wireless, linville, johannes

On Thu, Jan 22, 2009 at 8:33 PM, Alina Friedrichsen <x-alina@gmx.net> wrote:
> This patch adds an low-level driver independent entry to read the TSF value into the debugfs of mac80211. This makes debugging the IBSS handling of wifi drivers easier.
>
> Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>

Alina, a few notes on this series. I see you have used the mac80211
ops get_tsf via debugfs, and then added one for ath5k and ath9k. It
would seem a driver-specific get tsf from debugfs is not needed then.
The set_tsf is the only one that seems to be driver specific and could
probably go into their own debugfs.  Anyway how about instead of all
this just adding a new mac80211 ops for set_tsf for mac80211 as well
and then just add nl80211 commands to be able to get/set/reset them?
This way if the driver implements them it'll be through a generic
interface and also we can start using it via iw.

  Luis

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

* Re: [PATCH v2] mac80211: Read the TSF via debugfs
  2009-01-23 13:47 ` Luis R. Rodriguez
@ 2009-01-23 16:37   ` Johannes Berg
  2009-01-23 22:43   ` Alina Friedrichsen
  1 sibling, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2009-01-23 16:37 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: Alina Friedrichsen, linux-wireless, linville

[-- Attachment #1: Type: text/plain, Size: 806 bytes --]

On Fri, 2009-01-23 at 05:47 -0800, Luis R. Rodriguez wrote:

> Alina, a few notes on this series. I see you have used the mac80211
> ops get_tsf via debugfs, and then added one for ath5k and ath9k. It
> would seem a driver-specific get tsf from debugfs is not needed then.
> The set_tsf is the only one that seems to be driver specific and could
> probably go into their own debugfs. 

agree

>  Anyway how about instead of all
> this just adding a new mac80211 ops for set_tsf for mac80211 as well
> and then just add nl80211 commands to be able to get/set/reset them?
> This way if the driver implements them it'll be through a generic
> interface and also we can start using it via iw.

disagree. who the hell needs that, except for debugging? Why allow
setting it anyway?

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH v2] mac80211: Read the TSF via debugfs
  2009-01-23 13:47 ` Luis R. Rodriguez
  2009-01-23 16:37   ` Johannes Berg
@ 2009-01-23 22:43   ` Alina Friedrichsen
  1 sibling, 0 replies; 4+ messages in thread
From: Alina Friedrichsen @ 2009-01-23 22:43 UTC (permalink / raw)
  To: johannes, linville, linux-wireless

Hello Luis!

> Alina, a few notes on this series. I see you have used the mac80211
> ops get_tsf via debugfs, and then added one for ath5k and ath9k. It
> would seem a driver-specific get tsf from debugfs is not needed then.
> The set_tsf is the only one that seems to be driver specific and coul=
d
> probably go into their own debugfs.  Anyway how about instead of all
> this just adding a new mac80211 ops for set_tsf for mac80211 as well
> and then just add nl80211 commands to be able to get/set/reset them?
> This way if the driver implements them it'll be through a generic
> interface and also we can start using it via iw.

If the others agree I would very happy to implement it. :)

I only don't want to change to much in the infrastructure, but this wou=
ld be the nicest way to implement it.

Regards
Alina

--=20
NUR NOCH BIS 31.01.! GMX FreeDSL - Telefonanschluss + DSL=20
f=FCr nur 16,37 EURO/mtl.!* http://dsl.gmx.de/?ac=3DOM.AD.PD003K11308T4=
569a
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2009-01-23 22:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-23  4:33 [PATCH v2] mac80211: Read the TSF via debugfs Alina Friedrichsen
2009-01-23 13:47 ` Luis R. Rodriguez
2009-01-23 16:37   ` Johannes Berg
2009-01-23 22:43   ` Alina Friedrichsen

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