History log of /drivers/net/wireless/ath/ath5k/desc.c
Revision Date Author Comments
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>
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>
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>
404ba3f029a53597928a20ce33351e77e3259840 10-Jul-2011 Joe Perches <joe@perches.com> ath5k: Add missing breaks in switch/case

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
3ffca4fc404f056ecd79e57515dd7c2670db1fbf 10-Jul-2011 Joe Perches <joe@perches.com> ath5k: Add missing breaks in switch/case

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
8962d87129ec0a820d17ac44cbf3f51010ad8db8 13-Apr-2011 John W. Linville <linville@tuxdriver.com> ath5k: improve comments for optimized tx descriptor setup

Comment the use of local variables to reduce the number of load/store
operations on uncached memory, in hopes of not losing this optimization
accidentally in the future.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ed8950857f728303a1463ac9267e72c278738bf6 10-Apr-2011 Felix Fietkau <nbd@openwrt.org> ath5k: remove ts_retry from ath5k_tx_status

Reusing the configured retry counts from the skb cb is more efficient than
reloading the data from uncached memory.
Replace ts_longretry (unused) with ts_final_retry which contains the retry
count for the final rate only

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b2fd97d0190a400b49a2f910109a4a492bfea319 10-Apr-2011 Felix Fietkau <nbd@openwrt.org> ath5k: optimize rx status processing

Use ACCESS_ONCE to reduce the number of redundant loads on uncached memory

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
b161b89fb97b30233526d31c5f94397ed94ffea6 10-Apr-2011 Felix Fietkau <nbd@openwrt.org> ath5k: optimize tx status processing

Use ACCESS_ONCE to reduce the number of variable reloads on uncached memory

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
fe12081cb664cd5d412dc56de0585a80484b1331 10-Apr-2011 Felix Fietkau <nbd@openwrt.org> ath5k: remove ts_rate from ath5k_tx_status

It is no longer necessary for preparing mac80211 tx status

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c5e0a88aa2e0f42cdb4c79c977c52f6bc38ec160 10-Apr-2011 Felix Fietkau <nbd@openwrt.org> ath5k: optimize tx descriptor setup

Use local variables to reduce the number of load/store operations on uncached
memory.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
25985edcedea6396277003854657b5f3cb31a628 31-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi> Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
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>
6a0076e02a884e86c762a7b63cb50c2e30067491 16-Jun-2010 Bruno Randolf <br1@einfach.org> ath5k: report PHY error frames only for chips which need it

Only report PHY error frames for ANI on chipsets which do not have PHY error
counters in hardware.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
8786123b51984c518436911048668f9673f30cdf 16-Jun-2010 Bruno Randolf <br1@einfach.org> ath5k: review RX descriptor functions

Reviewed RX descriptor functions against the HAL sources. Some minor changes:

- check size before making changes to the descriptor

- whitespace

- add comments about 5210 timestamps. this needs to be adressed later!

- FIFO overrun error only available on 5210

- rs_phyerr should not be OR'ed

- clear the whole ath5k_rx_status structure before using, instead of
zeroing specific fields.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
1884a3678c97c953dcfc2ee17bd43e354514d657 16-Jun-2010 Bruno Randolf <br1@einfach.org> ath5k: take descriptor differences between 5210 and 5211 into account

There are some differences between 5210 and 5211 descriptors which we did not
take into account before.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2237e928840c9a1d8bc5143daf28c419d9ca0bda 16-Jun-2010 Bruno Randolf <br1@einfach.org> ath5k: update 5210/5211 frame types

Update 5210 frame types to match the HAL. We have to apply the same bitshift to
the constants as we use later.

Add 5211 specific frame types.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
03417bc605ef03cd851f13e36581cf2e1304755d 16-Jun-2010 Bruno Randolf <br1@einfach.org> ath5k: review and add comments for descriptors

I carefully reviewed desh.h against the HAL sources. Added comments and made
differences between 5210, 5211 and 5212 more clear by adding _521x to the
defines which are specific to that chipset. Renamed some defines. No functional
changes.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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>
2847109f73ac1b1e2d7517f9eac7f00c4e60b917 16-Jun-2010 Bruno Randolf <br1@einfach.org> ath5k: cosmetic changes in ath5k_hw_proc_5212_rx_status()

Just whitespace and indentation.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
a66681935455bfbb95dfe42aa3182e3f5b1ff1b4 16-Jun-2010 Bruno Randolf <br1@einfach.org> ath5k: use direct function calls for descriptors when possible

Use direct function calls for ath5k_hw_setup_rx_desc() and
ath5k_hw_setup_mrr_tx_desc() instead of a function pointer which always pointed
to the same function in the case of ath5k_hw_setup_rx_desc() and which is
easily unified in the case of ath5k_hw_setup_mrr_tx_desc().

Also simplify the initialization function for the remaining function pointers.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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>
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>
e9f08381cb117d66ad14474228ce02a27d6f62ae 01-Mar-2010 Andrew Blaich <ablaich@gmail.com> ath5k: fixing retries in ath5k_hw_setup_4word_tx_desc

The rate control algorithm, default is Minstrel for ath5k, determines
the number of retries to use for each rate. However, there exists in
ath5k_hw_setup_4word_tx_desc (which is called for AR5212 like devices)
a set number of retries defined by AR5K_TUNE_HWTXTRIES. The set
number of tries is added to the tx_tries0 variable setup by the rate
control algorithm. This changes the number of retries the rate
control algorithm considers necessary. By removing the
AR5K_TUNE_HWTXTRIES from the retry calculation the rate control
algorithm is given control over the number of retries.

Signed-off-by: Andrew Blaich <ablaich@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ff5d96ce622271df430c715ebe3e0b7400059dc1 09-Mar-2010 Bruno Randolf <br1@einfach.org> ath5k: remove ah_magic

it's never used. probably a leftover from the old OpenHAL days...

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
8127fbdc417b5916b82e91400a4be1d9555feee7 27-Feb-2010 Benoit Papillault <benoit.papillault@free.fr> ath5k: Fix TX/RX padding for all frames

Currently, the padding position is based on
ieee80211_get_hdrlen_from_skb(). This is not correct since the HW does
padding on RX (and expect the same padding to be present on TX) at the
following position :

- management : 24 + 6 if 4-addr format
- control : 24 + 6 if 4-addr format
- data : 24 + 6 if 4-addr format + 2 if QoS
- invalid : 24 + 6 if 4-addr format

whereas ieee80211_get_hdrlen_from_skb() is :

- management : 24
- control : 16 except for ACK/CTS where it is 10
- data : 24 + 6 if 4-addr format + 2 if QoS + 2 if QoS & order
- invalid : 24

So, correct frames are not affected : management frames do not use
4-addr format, control frames have no body and invalid frames are ...
not valid by definition. However, in order to use monitor interface for
debugging purpose, one must be able to send/receive any frames, be it
correct or not. Such frames are affected by incorrect padding.

Moreover, since padding is added on TX, we need to remove it before
calling ieee80211_tx_status. This affect TX packets received by monitor
interfaces.

It has been tested between an ath5k based card (AR5212) and an ar9170usb
based card (netgear WNDA3100) using a frame generator and a monitor
interface for each card.

v2: Added ath5k_add_padding / ath5k_remove_padding

Signed-off-by: Benoit Papillault <benoit.papillault@free.fr>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
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>