History log of /drivers/net/wireless/ath/ath5k/dma.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c47faa364cfb249d5d7670fb7293a6f9acd8aa9e 25-Nov-2011 Nick Kossifidis <mickflemm@gmail.com> ath5k: Cleanups v2 + add kerneldoc on all hw functions

No functional changes

Add kernel doc for all ath5k_hw_* functions and strcucts. Also do some cleanup,
rename ath5k_hw_init_beacon to ath5k_hw_init_beacon_timers, remove an unused
variable from ath5k_hw_pcu_init and a few obsolete macros, mostly related to XR.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/dma.c
34ce644aa8342f95eb1e187178f83febade4af37 25-Nov-2011 Nick Kossifidis <mickflemm@gmail.com> ath5k: Cleanups v1

No functional changes, just a few comments/documentation/cleanup

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/dma.c
7ff7c82ee4339af277cface9071f81c5c10a9283 25-Nov-2011 Nick Kossifidis <mickflemm@gmail.com> ath5k: Switch from read-and-clear to write-to-clear method when handling PISR/SISR registers

Since card has 12 tx queues and we want to keep track of the interrupts
per queue we can't fit all these interrupt bits on a single register.
So we have 5 registers, the primary interrupt status register (PISR) and
the 4 secondary interupt status registers (SISRs).

In order to be able to read them all at once (atomic operation) Atheros
introduced the Read-And-Clear registers to make things easier. So when
reading RAC_PISR register, hw does a read on PISR and all SISRs, returns
the value of PISR, copies all SISR values to their shadow copies (RAC_SISRx)
and clears PISR and SISRs. This saves us from reading PISR/SISRs in a sequence.

So far we 've used this approach and MadWiFi/Windows driver etc also used it
for years.

It turns out this operation is not atomic after all (at least not on all cards)
That means it's possible to loose some interrupts because they came after the
copy step and hw cleared them on the clean step !

That's probably the reason we got missed beacons, got stuck queues etc and
couldn't figure out what was going on.

With this patch we switch from RaC operation to an alternative method (that
makes more sense IMHO anyway, I just chose to be on the safe side so far).
Instead of reading RAC registers, we read the normal PISR/SISR registers and
clear any bits we got by writing them back on the register. This will clear only
the bits we got on our read step and leave any new bits unaffected (at least
that's what docs say). So if any new interrupts come up we won't miss it.

I've tested this with an AR5213 and an AR2425 and it seems O.K.

Many thanks to Adrian Chadd for debuging this and reviewing the patch !

v2: Make sure we don't clear PISR bits that map to SISR generated interrupts
(added a comment on the code for this)

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/dma.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/dma.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/dma.c
6a2a0e738225fc9ec063f84b79f0adf5c0ed176c 09-Jul-2011 Pavel Roskin <proski@gnu.org> ath5k: fix typos, bad comment formatting and GHz in place of MHz

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/dma.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/dma.c
15411c27d203e363592d30ab00803254ebe77b90 25-Jan-2011 Bob Copeland <me@bobcopeland.com> ath5k: fix error handling in ath5k_hw_dma_stop

Review spotted a problem with the error handling in ath5k_hw_dma_stop:
a successful return from ath5k_hw_stop_tx_dma will be treated as
an error, so we always bail out of the loop after processing a single
active queue. As a result, we may not actually stop some queues during
reset.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/dma.c
f0e134a53ad95ba7a393b299ae56c9bdcaed8aec 03-Dec-2010 Nick Kossifidis <mickflemm@gmail.com> ath5k: Fix reporting of RX dma stop failure

* Correctly report failure to stop RX DMA

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/dma.c
14fae2d4b61b890cea58d63091406b86ec9bafcd 23-Nov-2010 Nick Kossifidis <mickflemm@gmail.com> ath5k: Use new function to stop beacon queue

* Since we only use ath5k_hw_stop_tx_dma to stop the beacon
queue, introduce a new function ath5k_hw_stop_beacon_queue so
that we can use that instead and have better control. In the future
we can add more beacon queue specific stuff there (maybe tweak
beacon timers or something), for now just call ath5k_hw_stop_tx_dma.

* Also since we don't call ath5k_hw_stop_rx/tx_dma from outside
dma.c, make them static.

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

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/dma.c
e8325ed87457e07b9ceeb1e7a31df787dd7ee106 23-Nov-2010 Nick Kossifidis <mickflemm@gmail.com> ath5k: Check RXE when setting RXDP

* Make sure we are not trying to set RXDP while RX is active,
for now ignore the return value.

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

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/dma.c
f7317ba2d669c1b54fb31ed7834361a700a79217 23-Nov-2010 Nick Kossifidis <mickflemm@gmail.com> ath5k: Use DCU early termination correctly

* DCU early termination should be used to quickly flush QCU
according to docs so don't enable it for all queues, enable
it only when stopping each queue and disable it when we are
done.

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

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/dma.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/dma.c
d41174fabdae348c6583cf05aeb329da232c342c 23-Nov-2010 Nick Kossifidis <mickflemm@gmail.com> ath5k: Add new function to stop rx/tx DMA

* Add a new function to stop rx/tx dma and use in when reset starts

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

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/dma.c
9320b5c4a7260d9593102f378201d17e3f030739 23-Nov-2010 Nick Kossifidis <mickflemm@gmail.com> ath5k: Reset cleanup and generic cleanup

* No functional changes

* Clean up reset:
Introduce init functions for each unit and call them instead
of having everything inside ath5k_hw_reset (it's just c/p for
now so nothing changes except calling order -I tested it with
various cards and it's ok-)

* Further cleanups:
ofdm_timings belongs to phy.c
rate_duration belongs to pcu.c
clock functions are general and belong to reset.c (more to follow)

* Reorder functions for better organization:
We start with helpers and other functions follow in categories,
init functions are last

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

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/dma.c
eada7cad6005006b457f10a4c3e1881ff99d03a4 27-Sep-2010 Bruno Randolf <br1@einfach.org> ath5k: Fix bitmasks and typos for PCU Diagnostic register

As reported by Ryan Niemi, some bitmasks in the register definition for the PCU
Diagnostic register (DIAG_SW) were missing a zero at the end. While at it fix
some typos and add more comments.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/dma.c
a180a13081708b78d42232c6d922ce3de63f12e0 15-Aug-2010 Bob Copeland <me@bobcopeland.com> ath5k: clean up some comments

This fixes a few misspellings, word repetitions, and some grammar
nits in ath5k comments. No code changes.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/dma.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/dma.c
c57ca81576e7ca0369ea52c9ac5f35d0f6ca1270 15-Apr-2009 Bob Copeland <me@bobcopeland.com> ath5k: use rx hw descriptor pointer for self-linked check

This patch simplifies the code used to detect when the
self-linked DMA buffer is still in use by hardware, by
checking the hardware's rxdp register instead of looking
at the software buffer list.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/dma.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/dma.c