History log of /drivers/net/wireless/ath/ath5k/debug.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
234e340582901211f40d8c732afc49f0630ecf05 05-Apr-2012 Stephen Boyd <sboyd@codeaurora.org> simple_open: automatically convert to simple_open()

Many users of debugfs copy the implementation of default_open() when
they want to support a custom read/write function op. This leads to a
proliferation of the default_open() implementation across the entire
tree.

Now that the common implementation has been consolidated into libfs we
can replace all the users of this function with simple_open().

This replacement was done with the following semantic patch:

<smpl>
@ open @
identifier open_f != simple_open;
identifier i, f;
@@
-int open_f(struct inode *i, struct file *f)
-{
(
-if (i->i_private)
-f->private_data = i->i_private;
|
-f->private_data = i->i_private;
)
-return 0;
-}

@ has_open depends on open @
identifier fops;
identifier open.open_f;
@@
struct file_operations fops = {
...
-.open = open_f,
+.open = simple_open,
...
};
</smpl>

[akpm@linux-foundation.org: checkpatch fixes]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/net/wireless/ath/ath5k/debug.c
d0e88ec90151c52ca9aa67adece8f2b8bd3c9f3b 29-Sep-2011 Paul Gortmaker <paul.gortmaker@windriver.com> drivers/net: wireless/ath/ath5k/debug.c does not need module.h

It only has module_param and EXPORT_SYMBOL, so now that export.h
is in scope at the same time as the recent ath5k update, we can
delete this module.h include.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
6eb07caf1ac5723720caea2ee93cd11b7058a0aa 16-Sep-2011 Paul Gortmaker <paul.gortmaker@windriver.com> drivers/net: Add moduleparam.h to drivers as required.

These files were using moduleparam infrastructure, but were not
including anything for it -- which is fine when module.h is being
implicitly included in all files, but that is going away.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
ee40fa0656a730491765545ff7550f3c1ceb0fbc 27-May-2011 Paul Gortmaker <paul.gortmaker@windriver.com> drivers/net: Add export.h to files using EXPORT_SYMBOL/THIS_MODULE

These were getting the macros from an implicit module.h
include via device.h, but we are planning to clean that up.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>

drivers/net: Add export.h to wireless/brcm80211/brcmfmac/bcmsdh.c

This relatively recently added file uses EXPORT_SYMBOL and hence
needs export.h included so that it is compatible with the module.h
split up work.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
931be260ed54843edac37cb3ff09a40b86114b31 27-Jul-2011 Pavel Roskin <proski@gnu.org> ath5k: clean up base.h and its use

Remove unnecessary includes from base.h. Add includes to other files as
necessary. Don't include base.h unless needed.

Move declarations for functions in base.c from ath5k.h to base.h.

Use a better named define to protect base.h against double inclusion.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
e0d687bd9df218ba3d97aac15919d30816d72dcb 15-Jul-2011 Pavel Roskin <proski@gnu.org> ath5k: merge ath5k_hw and ath5k_softc

Both ath5k_hw and ath5k_softc represent one instance of the hardware.
This duplication is historical and is not needed anymore.

Keep the name "ath5k_hw" for the merged structure and "ah" for the
variable pointing to it. "ath5k_hw" is shorter than "ath5k_softc", more
descriptive and more widely used.

Put the combined structure to ath5k.h where the old ath5k_softc used to
be. Move some code from base.h to ath5k.h as needed.

Remove memory allocation for struct ath5k_hw and the corresponding error
handling. Merge iobase and ah_iobase fields.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
6340211c5f4775a52c98052fb5661565f79249fd 12-Jul-2011 Felix Fietkau <nbd@openwrt.org> ath5k: disable 32KHz sleep clock operation by default

While 32 KHz sleep clock might provide some power saving benefits,
it is also a major source of stability issues, on OpenWrt it produced
some reproducible data bus errors on register accesses on several
different MIPS platforms.

All the Atheros drivers that I can find do not enable this feature,
so it makes sense to leave it disabled in ath5k as well.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
e4bbf2f541501dcde47ce687ffc6d238bd2f7813 08-Jul-2011 Pavel Roskin <proski@gnu.org> ath5k: fix formatting errors found by checkpatch.pl

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
5b7916ad8c29da9f30fbf03a8b61862acdba00ce 10-Apr-2011 Felix Fietkau <nbd@openwrt.org> ath5k: clean up debugfs code

The pointers to the debugfs entries do not need to be saved, because they
will be recursively removed when the wiphy is unregistered.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
53e3b6e29eeda568fbe6c1e32d35cb56eea94415 25-Jan-2011 Bob Copeland <me@bobcopeland.com> ath5k: remove debug_dump_skb() functions

Now that rx and tx dumps go through the tracing infrastructure,
we no longer need to keep these routines around.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
226afe68fdbd1aa3680158aca0a3631cbd019626 03-Dec-2010 Joe Perches <joe@perches.com> ath: Convert ath_print to ath_dbg

Remove ath/debug.h and the includes of these files.
Coalesce long formats.
Correct a few misspellings and missing "\n"s from these logging messages.
Remove unnecessary trailing space before a newline.
Remove ARRAY_SIZE casts, use printf type %zu

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
b3a28e68d5c8d788a4e538a119a5d326545add8a 23-Nov-2010 Nick Kossifidis <mickflemm@gmail.com> ath5k: Debug DMA timeouts

* Increase timeouts on ath5k_hw_stop_tx_dma and also wait for
tx queue to stop before checking for pending frames

* Add a new debug level to debug dma start/stop

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
eef39befaae2a1559efe197d795c376a317af2af 16-Nov-2010 Bruno Randolf <br1@einfach.org> ath5k: Use generic EWMA library

Remove ath5k's private moving average implementation in favour of the generic
library version.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
5d882c97e2c958df9f8b78832fa1ecbecef6ea1d 08-Nov-2010 Ben Greear <greearb@candelatech.com> ath5k: Print stats as unsigned ints.

The debugfs code for ath5k was printing some unsigned int
stats with %d instead of %u. This meant that you could see
negative numbers instead of a clean wrap.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
5f05647dd81c11a6a165ccc8f0c1370b16f3bcb0 23-Oct-2010 Linus Torvalds <torvalds@linux-foundation.org> Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1699 commits)
bnx2/bnx2x: Unsupported Ethtool operations should return -EINVAL.
vlan: Calling vlan_hwaccel_do_receive() is always valid.
tproxy: use the interface primary IP address as a default value for --on-ip
tproxy: added IPv6 support to the socket match
cxgb3: function namespace cleanup
tproxy: added IPv6 support to the TPROXY target
tproxy: added IPv6 socket lookup function to nf_tproxy_core
be2net: Changes to use only priority codes allowed by f/w
tproxy: allow non-local binds of IPv6 sockets if IP_TRANSPARENT is enabled
tproxy: added tproxy sockopt interface in the IPV6 layer
tproxy: added udp6_lib_lookup function
tproxy: added const specifiers to udp lookup functions
tproxy: split off ipv6 defragmentation to a separate module
l2tp: small cleanup
nf_nat: restrict ICMP translation for embedded header
can: mcp251x: fix generation of error frames
can: mcp251x: fix endless loop in interrupt handler if CANINTF_MERRF is set
can-raw: add msg_flags to distinguish local traffic
9p: client code cleanup
rds: make local functions/variables static
...

Fix up conflicts in net/core/dev.c, drivers/net/pcmcia/smc91c92_cs.c and
drivers/net/wireless/ath/ath9k/debug.c as per David
6038f373a3dc1f1c26496e60b6c40b164716f07e 15-Aug-2010 Arnd Bergmann <arnd@arndb.de> llseek: automatically add .llseek fop

All file_operations should get a .llseek operation so we can make
nonseekable_open the default for future file operations without a
.llseek pointer.

The three cases that we can automatically detect are no_llseek, seq_lseek
and default_llseek. For cases where we can we can automatically prove that
the file offset is always ignored, we use noop_llseek, which maintains
the current behavior of not returning an error from a seek.

New drivers should normally not use noop_llseek but instead use no_llseek
and call nonseekable_open at open time. Existing drivers can be converted
to do the same when the maintainer knows for certain that no user code
relies on calling seek on the device file.

The generated code is often incorrectly indented and right now contains
comments that clarify for each added line why a specific variant was
chosen. In the version that gets submitted upstream, the comments will
be gone and I will manually fix the indentation, because there does not
seem to be a way to do that using coccinelle.

Some amount of new code is currently sitting in linux-next that should get
the same modifications, which I will do at the end of the merge window.

Many thanks to Julia Lawall for helping me learn to write a semantic
patch that does all this.

===== begin semantic patch =====
// This adds an llseek= method to all file operations,
// as a preparation for making no_llseek the default.
//
// The rules are
// - use no_llseek explicitly if we do nonseekable_open
// - use seq_lseek for sequential files
// - use default_llseek if we know we access f_pos
// - use noop_llseek if we know we don't access f_pos,
// but we still want to allow users to call lseek
//
@ open1 exists @
identifier nested_open;
@@
nested_open(...)
{
<+...
nonseekable_open(...)
...+>
}

@ open exists@
identifier open_f;
identifier i, f;
identifier open1.nested_open;
@@
int open_f(struct inode *i, struct file *f)
{
<+...
(
nonseekable_open(...)
|
nested_open(...)
)
...+>
}

@ read disable optional_qualifier exists @
identifier read_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
expression E;
identifier func;
@@
ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
{
<+...
(
*off = E
|
*off += E
|
func(..., off, ...)
|
E = *off
)
...+>
}

@ read_no_fpos disable optional_qualifier exists @
identifier read_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
@@
ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
{
... when != off
}

@ write @
identifier write_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
expression E;
identifier func;
@@
ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
{
<+...
(
*off = E
|
*off += E
|
func(..., off, ...)
|
E = *off
)
...+>
}

@ write_no_fpos @
identifier write_f;
identifier f, p, s, off;
type ssize_t, size_t, loff_t;
@@
ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
{
... when != off
}

@ fops0 @
identifier fops;
@@
struct file_operations fops = {
...
};

@ has_llseek depends on fops0 @
identifier fops0.fops;
identifier llseek_f;
@@
struct file_operations fops = {
...
.llseek = llseek_f,
...
};

@ has_read depends on fops0 @
identifier fops0.fops;
identifier read_f;
@@
struct file_operations fops = {
...
.read = read_f,
...
};

@ has_write depends on fops0 @
identifier fops0.fops;
identifier write_f;
@@
struct file_operations fops = {
...
.write = write_f,
...
};

@ has_open depends on fops0 @
identifier fops0.fops;
identifier open_f;
@@
struct file_operations fops = {
...
.open = open_f,
...
};

// use no_llseek if we call nonseekable_open
////////////////////////////////////////////
@ nonseekable1 depends on !has_llseek && has_open @
identifier fops0.fops;
identifier nso ~= "nonseekable_open";
@@
struct file_operations fops = {
... .open = nso, ...
+.llseek = no_llseek, /* nonseekable */
};

@ nonseekable2 depends on !has_llseek @
identifier fops0.fops;
identifier open.open_f;
@@
struct file_operations fops = {
... .open = open_f, ...
+.llseek = no_llseek, /* open uses nonseekable */
};

// use seq_lseek for sequential files
/////////////////////////////////////
@ seq depends on !has_llseek @
identifier fops0.fops;
identifier sr ~= "seq_read";
@@
struct file_operations fops = {
... .read = sr, ...
+.llseek = seq_lseek, /* we have seq_read */
};

// use default_llseek if there is a readdir
///////////////////////////////////////////
@ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier readdir_e;
@@
// any other fop is used that changes pos
struct file_operations fops = {
... .readdir = readdir_e, ...
+.llseek = default_llseek, /* readdir is present */
};

// use default_llseek if at least one of read/write touches f_pos
/////////////////////////////////////////////////////////////////
@ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read.read_f;
@@
// read fops use offset
struct file_operations fops = {
... .read = read_f, ...
+.llseek = default_llseek, /* read accesses f_pos */
};

@ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier write.write_f;
@@
// write fops use offset
struct file_operations fops = {
... .write = write_f, ...
+ .llseek = default_llseek, /* write accesses f_pos */
};

// Use noop_llseek if neither read nor write accesses f_pos
///////////////////////////////////////////////////////////

@ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read_no_fpos.read_f;
identifier write_no_fpos.write_f;
@@
// write fops use offset
struct file_operations fops = {
...
.write = write_f,
.read = read_f,
...
+.llseek = noop_llseek, /* read and write both use no f_pos */
};

@ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier write_no_fpos.write_f;
@@
struct file_operations fops = {
... .write = write_f, ...
+.llseek = noop_llseek, /* write uses no f_pos */
};

@ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
identifier read_no_fpos.read_f;
@@
struct file_operations fops = {
... .read = read_f, ...
+.llseek = noop_llseek, /* read uses no f_pos */
};

@ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
identifier fops0.fops;
@@
struct file_operations fops = {
...
+.llseek = noop_llseek, /* no read or write fn */
};
===== End semantic patch =====

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Julia Lawall <julia@diku.dk>
Cc: Christoph Hellwig <hch@infradead.org>
/drivers/net/wireless/ath/ath5k/debug.c
d84a35d1323bc62f9b26a707072767a60da75015 12-Oct-2010 Ben Greear <greearb@candelatech.com> ath5k: Move debugfs under ieee80211/[wiphy-name]

This automatically keeps things proper when wiphy
is renamed.

Based on patch by Johannes Berg <johannes@sipsolutions.net>

Signed-off-by: Ben Greear <greearb@candelatech.com>
Acked-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
908ebfb95d16bdf7f5f37ad911ccd9b7350ba780 12-Oct-2010 Joe Perches <joe@perches.com> ath5k: fix build break from "ath5k: Print out opmode in debugfs"

Also improve ath_opmode_to_string usage by having it return UNKNOWN
rather than NULL in the event of failure to map the opmode value to a
representative string.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
7109ca5c80a0bb94378ebd7f8bb6d00edb5e6fba 08-Oct-2010 Felix Fietkau <nbd@openwrt.org> ath5k: use the common cycle counter / listen time implementation

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
92c68a66a8f73c51f062ae8cae958c86a21fea78 08-Oct-2010 Ben Greear <greearb@candelatech.com> ath5k: Print out opmode in debugfs.

Helps debug multi-VIF scenarios.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
b72acddbbe521d1372e7e9106e9d72e1cbab3010 01-Oct-2010 Ben Greear <greearb@candelatech.com> ath5k: Print rx/tx bytes in debugfs

This adds counters for tx and rx bytes, including any
errored packets as well as all wireless headers.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Acked-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
87fd2e6c90acb45a5741207fc953190596f93841 22-Sep-2010 Ben Greear <greearb@candelatech.com> ath5k: Add bssid mask and rxfilter to debugfs.

Helps with debugging virtual interfaces.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
923e5b3d3d773b9956b943ac64f782d5a127bdea 17-Sep-2010 Bruno Randolf <br1@einfach.org> ath5k: Count how many times a queue got stuck

Add a counter to show how many times a queue got stuck in the debugfs queue
file.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
cfddc11c429a655e418ffc111372cc69dee6a1a5 17-Sep-2010 Bruno Randolf <br1@einfach.org> ath5k: Fix queue debug file

Take txq lock in debug file and fix reporting of used buffers.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
b4c52612069c2756ad7506754765bfee57315efe 21-Aug-2010 Bob Copeland <me@bobcopeland.com> ath5k: log descriptor chains at a new debug level

Descriptors are currently logged with ATH5K_DEBUG_RESET,
which isn't really apt, and also means we can't see just
the descriptor setup or just the resets. Add a new
debug level just for that.

Acked-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
2189d13f6cfc58627a01d6a91591e59a2fa62902 22-Jul-2010 Dan Carpenter <error27@gmail.com> ath5k: snprintf() returns largish values

snprintf() returns the number of characters that would have been written
(not counting the NUL character). So we can't use it as the limiter to
simple_read_from_buffer() without capping it first at sizeof(buf).

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
5faaff747710dfb79d5aa72b9faface94ad4b3f3 13-Jul-2010 Bob Copeland <me@bobcopeland.com> ath5k: move reset to mac80211 workqueue

We currently trigger a reset via a tasklet when certain error
conditions are detected so that the card will (eventually)
restart. Unfortunately this makes locking complicated since
reset can also be called in process context (e.g. for channel
change). Currently nothing protects against concurrent resets,
which can be the source of corruption bugs.

Reset takes too long to spinlock the whole thing, so this
patch moves deferred resets into the mac80211 workqueue to
enable use of sc->lock mutex.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
62412a8f0ded6e5741c67c24f9e7c5b2bc33e042 16-Jun-2010 Bruno Randolf <br1@einfach.org> ath5k: remove pointless rx error overlay struct

ath5k_hw_rx_error was only used once, where we could easily just use
ath5k_hw_rx_status as well, so remove it.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
265faadd6a01b9462bbc3ead26a3e32a717525c5 16-Jun-2010 Bruno Randolf <br1@einfach.org> ath5k: fix rx descriptor debugging

In the debug ouptut rx_status_0 was printed twice instead of rx_status_1. Also
make the debug message more clear.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
8d67a0310f7cba4796e5d5df99ed59408ac0b767 16-Jun-2010 Bruno Randolf <br1@einfach.org> ath5k: more debug prints for resets

Add a debug print for every case of reset.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
3cfd43f484c8d4bcb38db83f7be19fbd4ac8440c 07-Jun-2010 Bruno Randolf <br1@einfach.org> ath5k: add debugfs file for queue debugging

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
0ca74027ac709f99aae1805e593c95843dd18234 07-Jun-2010 Bruno Randolf <br1@einfach.org> ath5k: new function for setting the antenna switch table

Collect all pieces concering the antenna switch table into one function.
Previously it was split up between ath5k_hw_reset() and
ath5k_hw_commit_eeprom_settings().

Also we need to set the antenna switch table when ath5k_hw_set_antenna_mode()
is called manually (by "iw phy0 antenna set", for example).

I'm not sure if we need to set the switchtable at the same place in
ath5k_hw_reset() as it was before - it is set later thru
ath5k_hw_set_antenna_mode() anyways - but i leave it there to avoid
problems(?).

Plus print switchtable registers in the debugfs file.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
230fc4f3b2fa72980787a5f86c850f02bb193187 19-May-2010 Bruno Randolf <br1@einfach.org> ath5k: remove ATH_TRACE macro

Now that we have ftrace, it is not needed any more.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
2111ac0d888767999c7dd6d1309dcc1fb8012022 02-Apr-2010 Bruno Randolf <br1@einfach.org> ath5k: Adaptive Noise Immunity (ANI) Implementation

This is an Adaptive Noise Imunity (ANI) implementation for ath5k. I have looked
at both ath9k and HAL sources (they are nearly the same), and even though i
have implemented some things differently, the basic algorithm is practically
the same, for now. I hope that this can serve as a clean start to improve the
algorithm later.

This also adds a possibility to manually control ANI settings, right now only
thru a debugfs file:
* set lowest sensitivity (=highest noise immunity):
echo sens-low > /sys/kernel/debug/ath5k/phy0/ani
* set highest sensitivity (=lowest noise immunity):
echo sens-high > /sys/kernel/debug/ath5k/phy0/ani
* automatically control immunity (default):
echo ani-on > /sys/kernel/debug/ath5k/phy0/ani
* to see the parameters in use and watch them change:
cat /sys/kernel/debug/ath5k/phy0/ani

Manually setting sensitivity will turn the automatic control off. You can also
control each of the five immunity parameters (noise immunity, spur immunity,
firstep, ofdm weak signal detection, cck weak signal detection) manually thru
the debugfs file.

This is tested on AR5414 and nearly doubles the thruput in a noisy 2GHz band.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
da35111ad970081bdf6e848d1861c7d16e71079b 25-Mar-2010 Bruno Randolf <br1@einfach.org> ath5k: update phy errors codes

Update PHY error codes from the HAL, and keep them in statistics for debugging
via the 'frameerrors' file. This will also be used by ANI.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
7644395f8df9aa5b42af268a485b83e44bba2784 09-Mar-2010 Bruno Randolf <br1@einfach.org> ath5k: add debugfs file frameerrors

add a debugfs file to see different RX and TX errors as reported in our status
descriptors. this can help to diagnose driver problems.

statistics can be cleared by writing 'clear' into the frameerrors file.

example:

# cat /sys/kernel/debug/ath5k/phy0/frameerrors
RX
---------------------
CRC 27 (11%)
PHY 3 (1%)
FIFO 0 (0%)
decrypt 0 (0%)
MIC 0 (0%)
process 0 (0%)
jumbo 0 (0%)
[RX all 245]

TX
---------------------
retry 2 (9%)
FIFO 0 (0%)
filter 0 (0%)
[TX all 21]

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
604eeadd1880bddfb155369491cc13fb8d3f9df6 09-Mar-2010 Bruno Randolf <br1@einfach.org> ath5k: add antenna statistics and debugfs file for antenna settings

keep statistics about which antenna was used for TX and RX. this is used only
for debugging right now, but might have other applications later.

add a new file 'antenna' in debugfs (/sys/kernel/debug/ath5k/phy0/antenna) to show
antenna use statistics and antenna diversity related register values. it can
also be used to set the antenna mode until we have proper support for that in
iw:
- echo diversity > antenna: use default antenna mode (RX and TX diversity)
- echo fixed-a > antenna: use fixed antenna A for RX and TX
- echo fixed-b > antenna: use fixed antenna B for RX and TX
- echo clear > antenna: reset antenna statistics

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
31670070ffe18f8e8743109b19297a0efac0a72c 28-Jun-2009 Jiri Slaby <jirislaby@gmail.com> ath5k: remove permissions from debugfs files

Don't allow users to open debugfs files, because it can cause oopses.

When a user opens some file, driver unlinks it and frees the
corresponding structure, we will dereference freed memory.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c
aba7453037c3a90714caae77a622dceaf1173786 30-Apr-2009 David S. Miller <davem@davemloft.net> Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:
Documentation/isdn/00-INDEX
drivers/net/wireless/iwlwifi/iwl-scan.c
drivers/net/wireless/rndis_wlan.c
net/mac80211/main.c
203c4805e91786f9a010bc7945a0fde70c9da28e 31-Mar-2009 Luis R. Rodriguez <lrodriguez@atheros.com> atheros: put atheros wireless drivers into ath/

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/debug.c