From: Jiri Slaby <jirislaby@gmail.com>
To: Bruno Randolf <bruno@thinktube.com>
Cc: ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org,
linville@tuxdriver.com, mcgrof@gmail.com, mickflemm@gmail.com
Subject: Re: [PATCH] ath5k: add debugfs entries for registers, tsf, beacon, reset
Date: Mon, 10 Dec 2007 10:03:19 +0100 [thread overview]
Message-ID: <475D00D7.10309@gmail.com> (raw)
In-Reply-To: <1197274926-14334-1-git-send-email-bruno@thinktube.com>
On 12/10/2007 09:22 AM, Bruno Randolf wrote:
> i resend this patch to address jiris comments and with some small improvements.
>
> 'registers' prints the name and value of some registers. this should be adapted
> to what we actually need later and is supposed to replace the hwdump facility i
> removed in my earlier debugging changes.
>
> 'tsf' prints the current HW TSF. writing "reset" into the file will reset the
> TSF.
>
> 'beacon' shows beacon relevant registers. it is good for watching the beacon
> timers with something like "watch -n0 cat /dbg/ath5k/phy0/beacon". writing
> "enable" into the file will try to enable beacons by setting the flag
> AR5K_BEACON_ENABLE, "disable" will disable that bit.
>
> 'reset' can be used to trigger a HW reset, by writing "reset" into it.
>
> Changes-licensed-under: GPL
>
> Signed-off-by: Bruno Randolf <bruno@thinktube.com>
> Acked-by: Luis R. Rodriguez <mgrof@winlab.rutgers.edu>
> ---
> drivers/net/wireless/ath5k/debug.c | 267 ++++++++++++++++++++++++++++++++++++
> drivers/net/wireless/ath5k/debug.h | 4 +
> 2 files changed, 271 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/net/wireless/ath5k/debug.c b/drivers/net/wireless/ath5k/debug.c
> index 7427506..7e34684 100644
> --- a/drivers/net/wireless/ath5k/debug.c
> +++ b/drivers/net/wireless/ath5k/debug.c
[...]
> +static int open_file_registers(struct inode *inode, struct file *file)
> +{
> + struct seq_file *s;
> + int res;
> + res = seq_open(file, ®ister_seq_ops);
> + s = file->private_data;
> + s->private = inode->i_private;
Sorry for not noticing this earlier, if res is nonzero, you are dereferencing
NULL (s) here.
> + return res;
> +}
regards,
--
Jiri Slaby (jirislaby@gmail.com)
Faculty of Informatics, Masaryk University
next prev parent reply other threads:[~2007-12-10 9:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-10 8:22 [PATCH] ath5k: add debugfs entries for registers, tsf, beacon, reset Bruno Randolf
2007-12-10 9:03 ` Jiri Slaby [this message]
2007-12-10 9:22 ` bruno randolf
2007-12-10 9:27 ` Bruno Randolf
2007-12-10 9:30 ` Jiri Slaby
2007-12-10 10:21 ` [PATCH 1/1] " Bruno Randolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=475D00D7.10309@gmail.com \
--to=jirislaby@gmail.com \
--cc=ath5k-devel@lists.ath5k.org \
--cc=bruno@thinktube.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mcgrof@gmail.com \
--cc=mickflemm@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).