History log of /drivers/net/wireless/ath/ath5k/reset.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3db1cd5c05f35fb43eb134df6f321de4e63141f2 19-Dec-2011 Rusty Russell <rusty@rustcorp.com.au> net: fix assignment of 0/1 to bool variables.

DaveM said:
Please, this kind of stuff rots forever and not using bool properly
drives me crazy.

Joe Perches <joe@perches.com> gave me the spatch script:

@@
bool b;
@@
-b = 0
+b = false
@@
bool b;
@@
-b = 1
+b = true

I merely installed coccinelle, read the documentation and took credit.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/ath/ath5k/reset.c
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/reset.c
1846ac3dbec0894095520b2756b68c4fd81e3fbb 25-Nov-2011 Nick Kossifidis <mickflemm@gmail.com> ath5k: Use usleep_range where possible

Use usleep_range where possible to reduce busy waits

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.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/reset.c
32c254645f90a5a5486788c0deb30531fdb609c2 23-Jul-2011 Pavel Roskin <proski@gnu.org> ath5k: eliminate CHANNEL_* macros, use AR5K_MODE_* in channel->hw_value

When checking for the band, use channel->band.

Change ath5k_hw_nic_wakeup() and ath5k_channel_ok() to take
ieee80211_channel. Change ath5k_hw_radio_revision() to take
ieee80211_band.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
8d44a823c847c3d20e33c4c714ab48b700f41f14 23-Jul-2011 Pavel Roskin <proski@gnu.org> ath5k: remove most references to XR

XR is a proprietary feature of the chipset. It's not supported and
should not be supported.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.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/reset.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/reset.c
f00643888ca435ce6934482243733cc140281d10 12-Jul-2011 Felix Fietkau <nbd@openwrt.org> ath5k: fix reference clock usec duration setting restore

enabling the sleep clock alters the AR5K_USEC_32 field, but disabling
it didn't restore it.

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/reset.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/reset.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/reset.c
2753f87a574c4844dfa1709c7d0a474f0dc8d818 08-Jul-2011 Pavel Roskin <proski@gnu.org> ath5k: don't use volatile, it's not needed

Signed-off-by: Pavel Roskin <proski@gnu.org>

The reg variable is only used by __raw_writel() and __raw_readl(), which
should guarantee memory access in the right order.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
0a5d381348fcb12d27289b3a66824fb3481911ce 08-Jul-2011 Pavel Roskin <proski@gnu.org> ath5k: replace spaces with tabs as suggested 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/reset.c
d816ab26f6637282feb8a93c9def9925883ba0a7 16-Jun-2011 Pavel Roskin <proski@gnu.org> ath5k: annotate reg in ath5k_hw_nic_reset() as __iomem

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
a99168eece601d2a79ecfcb968ce226f2f30cf98 02-Jun-2011 Nick Kossifidis <mickflemm@gmail.com> ath5k: Disable fast channel switching by default

Disable fast channel change by default on AR2413/AR5413 due to
some bug reports (it still works for me but it's better to be safe).
Add a module parameter "fastchanswitch" in case anyone wants to enable
it and play with it.

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/reset.c
e245292e0a98bfbf2b54c5c0f079033f4d06dd32 29-Apr-2011 John W. Linville <linville@tuxdriver.com> ath5k: fix uninitialized var warning for txf2txs

CC [M] drivers/net/wireless/ath/ath5k/reset.o
drivers/net/wireless/ath/ath5k/reset.c: In function ‘ath5k_hw_init_core_clock’:
drivers/net/wireless/ath/ath5k/reset.c:100:51: warning: ‘txf2txs’ may be used uninitialized in this function

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
0207c0c51a37659a92232e665f2a7fadec170556 21-Dec-2010 Bruno Randolf <br1@einfach.org> ath5k: Use helper function to get eeprom mode from channel

Introduce a helper function to get the EEPROM mode from channel and remove
multiple similar switch statements. Also since it's now easy to get the EEPROM
mode from the channel, use them inside the functions which need it, instead of
passing a redundant ee_mode parameter.

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/reset.c
26a51ad7f285236ca593c57cffcaadd40514084a 21-Dec-2010 Bruno Randolf <br1@einfach.org> ath5k: Remove ATH5K_INI_RFGAIN defines, use band instead

Remove redundant defines.

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/reset.c
e98b06b09be0fc459806aa4d2c301cfaf268c570 21-Dec-2010 Hauke Mehrtens <hauke@hauke-m.de> ath5k: Use pci_is_pcie()

Use function pci_is_pcie() instead of accessing struct member directly.

CC: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
4cebb34caa5122216a1e2451eae9e0fc47ec2589 02-Dec-2010 Felix Fietkau <nbd@openwrt.org> ath5k: Fix reset and interrupts for AHB type of devices.

On WiSoc we cannot access mac register before it is resetted.
It will crash hardware otherwise.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
8efa5d7d6ad307ae2d220def37ca89594062c40d 02-Dec-2010 Felix Fietkau <nbd@openwrt.org> ath5k: Check if pci pdev struct is initialized in common functions.

To be able to support other busses than PCI check if pci device
structure is initialized.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
acb091d67c5c9649cf5d25055ef6fd64239a6762 23-Nov-2010 Nick Kossifidis <mickflemm@gmail.com> ath5k: Cleanup turbo channel flags

* Clean up CHANNEL_T(URBO), use AR5K_BWMODE_40MHZ instead

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

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
c2b0ebef262e0a9b64f7ea8ec837cfc29605bef7 23-Nov-2010 Nick Kossifidis <mickflemm@gmail.com> ath5k: No need to save/restore staid flags on reset

* Since we set antenna flags on phy init and ack bitrate
mode on pcu init, there is no need to save/restore sta_id
flags on ath5k_hw_reset. Also we don't need to re-set our
mac address because it's not affected by resets.

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

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
8aec7af99b1e4594c4bb9e1c48005e6111f97e8e 23-Nov-2010 Nick Kossifidis <mickflemm@gmail.com> ath5k: Support synth-only channel change for AR2413/AR5413

* Add synth-only channel change for AR2413/5413. When we call
ath5k_reset with a channel ath5k_hw_reset will first try to
set channel on PHY while PHY is running instead of doing a normal
full reset. To do this phy_init has to change to implement this
functionality.

* Clean up change_channel flag, what it really did was skip PCU
registers when setting initvals. This is done because on reset
PCU registers are not affected (except the registers we set
in pcu init and -due to hw problems- TSF). Use a new skip_pcu
flag that's not misleading instead. In the future we might use
that to also skip PCU reset and save us the TSF etc problems
(needs testing because standard practice is to reset everything).

* Use fast channel change only when setting channel, and set skip_pcu
to false only on init. When we reset the card due to DMA or PHY
problems skip pcu but never do a fast channel change.

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

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
f08fbf6cf4a31c8df52b21440c7a7e6fbe474b28 23-Nov-2010 Nick Kossifidis <mickflemm@gmail.com> ath5k: Update PLL programming for turbo/half/quarter

* Set correct PLL settings for each bwmode

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

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
b405086ba47678a5b8f6e7cd835a3d27ebb6f744 23-Nov-2010 Nick Kossifidis <mickflemm@gmail.com> ath5k: Increase PHY settling parameters for turo mode

* On turbo mode increase PHY settling times, note that
we only increase switch settling time on AR5212 as indicated
by initvals.

* A few cleanups: Move frame control settings for AR5210 from
reset_tx_queue to tweak_initvals and remove phy_scal settings
from tweak_initvals (we tweak them alread on set_sleep_clock).

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

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
325089ab5847f5c1e43f42bb90d32f981867c4c1 23-Nov-2010 Nick Kossifidis <mickflemm@gmail.com> ath5k: Small cleanup on tweak_initvals

* Now that we properly set rx/tx latencies for AR5311 remove
that old buggy part of code left inside ath5k_hw_tweak_initval_settings
that was never executed (you can't have an RF5112 radio on a mac older
than AR5212). Also use a magic value for 5311 PHY_SCAL value.

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

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
c297560206adf0cda8ce38ef9b20b0a025754c4d 23-Nov-2010 Nick Kossifidis <mickflemm@gmail.com> ath5k: Put core clock initialization on a new function

* Handle all usec parameters in one function. It's much cleaner
this way.

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

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
e088f23be166635b3938571c00c686094efa7cc4 23-Nov-2010 Nick Kossifidis <mickflemm@gmail.com> ath5k: Stop PCU on reset

* Stop PCU receive logic (DRU) durring reset
We need to be sure pcu is not active when trying to stop rx dma
right now this is done on ath5k_reset (base.c) but later we are
going to clean it up.

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

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.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/reset.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/reset.c
b1ae1edf9e9872d3aa657cc34ae40c9aadfbc72f 30-Sep-2010 Ben Greear <greearb@candelatech.com> ath5k: Allow ath5k to support virtual STA and AP interfaces.

Support up to 4 virtual APs and as many virtual STA interfaces
as desired.

This patch is ported forward from a patch that Patrick McHardy
did for me against 2.6.31.

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/reset.c
8801df86d79b1ffda94e3b937bc19bbe9a66557d 21-Aug-2010 Bob Copeland <me@bobcopeland.com> ath5k: trivial spelling fixes

Fix some comments:
s/transmition/transmission/
s/puting/putting/

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.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/reset.c
418de6d955fa1da0cb4332661a31d21f57e954ab 15-Aug-2010 Nick Kossifidis <mickflemm@gmail.com> ath5k: rename ath5k_hw_set_associd to _set_bssid

Although the named function also sets the aid, its main
purpose is configuring the bssid and we use that
everywhere else.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
20fbed21e934355ee00850f6dead22be3147893f 07-Jun-2010 Bruno Randolf <br1@einfach.org> ath5k: no need to save/restore the default antenna

Since ath5k_hw_set_antenna_mode() always writes the default antenna register
and is called at the end of reset, there is no need to separately save and
restore the default antenna.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.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/reset.c
40ca22eafeb61ee1419dd7c4c2698459183c582c 19-May-2010 Bruno Randolf <br1@einfach.org> ath5k: add sysfs files for ANI parameters

/sys/class/ieee80211/phy0/device/ani/ani_mode
/sys/class/ieee80211/phy0/device/ani/noise_immunity_level
/sys/class/ieee80211/phy0/device/ani/spur_level
/sys/class/ieee80211/phy0/device/ani/firstep_level
/sys/class/ieee80211/phy0/device/ani/ofdm_weak_signal_detection
/sys/class/ieee80211/phy0/device/ani/cck_weak_signal_detection
/sys/class/ieee80211/phy0/device/ani/noise_immunity_level_max
/sys/class/ieee80211/phy0/device/ani/spur_level_max
/sys/class/ieee80211/phy0/device/ani/firstep_level_max

sysfs has a lot of symlinks, so you can find the files also in other locations,
like (by PCI ID) /sys/devices/pci0000:00/0000:00:11.0/ani and others.

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/reset.c
30bd3a3092c17dbfa18f042ca0815758e8d34e65 19-May-2010 Bruno Randolf <br1@einfach.org> ath5k: clarify logic when to enable spur mitigation filter

The old code logically did not make sense and seems to have been confused by
the fact that we could have newer EEPROMs on older hardware. In any case the
spur mitigation filter was set if the srev was >= AR5K_SREV_AR5424.

Spur info is available only from EEPROM versions bigger than 5.3 but but the
EEPOM routines will use static values for older versions, so that should be
o.k.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.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/reset.c
a4b770972b8f819e408d7cc3ae9637e15bff62f6 14-May-2010 Joe Perches <joe@perches.com> drivers/net: Remove unnecessary returns from void function()s

This patch removes from drivers/net/ all the unnecessary
return; statements that precede the last closing brace of
void functions.

It does not remove the returns that are immediately
preceded by a label as gcc doesn't like that.

It also does not remove null void functions with return.

Done via:
$ grep -rP --include=*.[ch] -l "return;\n}" net/ | \
xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }'

with some cleanups by hand.

Compile tested x86 allmodconfig only.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/net/wireless/ath/ath5k/reset.c
33e2bf6aa16061bae1253514e7c32af27d2b4b31 23-Mar-2010 David S. Miller <davem@davemloft.net> Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6

Conflicts:
Documentation/feature-removal-schedule.txt
drivers/net/wireless/ath/ath5k/phy.c
ccfe5552aeb18c87a4d0ecb8cb7512280435bfdd 09-Mar-2010 Bruno Randolf <br1@einfach.org> ath5k: remove double opmode definition

opmode (operating mode) was defined in struct ath5k_hw and struct ath5k_softc.
remove it from ath5k_hw and use only from ath5k_softc (sc->opmode).

(btw: what's the meaning of opmode when we have multiple interfaces?)

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/reset.c
5f13bfac0718ce6f83ecba3755f224c3790e8d66 09-Mar-2010 Bruno Randolf <br1@einfach.org> ath5k: read eeprom IQ calibration values correctly for G mode

we read the IQ correction values (i_cal and q_cal) for G mode from a wrong
location (the same shifts as for A mode is applied which is incorrect). use
correct locations, matching the docs and HAL sources.

also we should write IQ correction only when we have that information in the
EEPROM, starting from version 4. also write it in the same way as we do in the
periodic recalibration (enable last), just to be sure.

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/reset.c
a3b980fd1391e75068ae25f3817728b27bfdb04c 09-Mar-2010 Bruno Randolf <br1@einfach.org> ath5k: fix TSF reset

to reset the TSF, AR5K_BEACON_RESET_TSF has to be 1, not 0. also we have a
function for that so use it.

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/reset.c
ec182d976345b5eb671fe879ad73b90fe29a34e9 19-Feb-2010 Pavel Roskin <proski@gnu.org> ath5k: move ath5k_hw_register_timeout() into reset.c

ath5k_hw_register_timeout() was duplicated between phy.c and reset.c.
Since it is too big and too much used to be an inline function, move it
away from the ath5k.h header into reset.c. Remove _ATH5K_RESET and
_ATH5K_PHY defines.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
626ede6b1aafb3a8cadfdd04b512fd1d3dc2113e 19-Feb-2010 Pavel Roskin <proski@gnu.org> ath5k: remove stale function declarations, make some functions static

Remove all unnecessary function declarations from ath5k.h. Comment out
unused functions. Remove ath5k_hw_get_tsf32(), which is too trivial to
be commented out. Make functions static if suggested by sparse. Make
ath5k_pm_ops static.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
5d6ce628f986d1a3c523cbb0a5a52095c48cc332 21-Jan-2010 Bob Copeland <me@bobcopeland.com> ath5k: dont use external sleep clock in AP mode

When using the external sleep clock in AP mode, the
TSF increments too quickly, causing beacon interval
to be much lower than it is supposed to be, resulting
in lots of beacon-not-ready interrupts.

This fixes http://bugzilla.kernel.org/show_bug.cgi?id=14802.

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/reset.c
6e08d228b6d8e93d7b25b3573c6da7da179c2ae1 21-Dec-2009 Lukáš Turek <8an@praha12.net> ath5k: Implement mac80211 callback set_coverage_class

The callback sets slot time as specified in IEEE 802.11-2007 section
17.3.8.6 (for 20MHz channels only for now) and raises ACK and CTS
timeouts accordingly. The values are persistent, they are restored after
device reset.

Signed-off-by: Lukas Turek <8an@praha12.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
3578e6ebb305e6bf7519f6e86741772892f4d51a 21-Dec-2009 Lukáš Turek <8an@praha12.net> ath5k: Reimplement clock rate to usec conversion

The original code was correct in 802.11a mode only, 802.11b/g uses
different clock rates. The new code uses values taken from FreeBSD HAL
and should be correct for all modes including turbo modes.

The former rate calculation was used by slope coefficient calculation
function ath5k_hw_write_ofdm_timings. However, this function requires
the 802.11a values even in 802.11g mode. Thus the use of
ath5k_hw_htoclock was replaced by hardcoded values. Possibly the slope
coefficient calculation is not related to clock rate at all.

Signed-off-by: Lukas Turek <8an@praha12.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
e5e2647fd6ceef2cdc479954b84517535eb7febd 14-Oct-2009 Bob Copeland <me@bobcopeland.com> ath5k: use noise calibration from madwifi hal

This updates ath5k to calibrate the noise floor similar to the
way it is done in the madwifi hal and ath9k. Of note:

- we start NF measurement at the same time as AGC calibration,
but do not actually read the value until the periodic (long)
calibration
- we keep a history of the last few values read and write the
median back to the hardware for CCA
- we do not complain if NF calibration isn't complete, instead
we keep the last read value.

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/reset.c
8ce54c5a5f5d2f4f03993395d60f3110670002ca 07-Oct-2009 Luis R. Rodriguez <lrodriguez@atheros.com> ath5k: enable Power-Save Polls by setting the association ID

mac80211 has long provided us the association ID. This isn't useful except
for Power-Save polling which now gets enabled. We can now poll for our
pending frames on the AP during power save.

You can review the details of Power-Save on the wireless wiki:

http://wireless.kernel.org/en/developers/Documentation/ieee80211/power-savings

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
be5d6b75e0fb3f7e23ea5325109ef4195f2b282a 07-Oct-2009 Luis R. Rodriguez <lrodriguez@atheros.com> ath5k: simplify passed params to ath5k_hw_set_associd()

We have access to common->curbssid and common->curaid so just
use those. Note that common->curaid is always 0 so this keeps
our current behaviour of always using 0 for now. Once we fix
storing the association ID passed by mac80211 this will
require no changes here.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
91b9eb8261acfe473c369750036df24ad071e5c1 07-Oct-2009 Luis R. Rodriguez <lrodriguez@atheros.com> ath5k: fix regression introduced upon the removal of AR5K_HIGH_ID()

The trick was to add four bytes whenever this was used. There
are two places where this was missed.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
954fecea5d1df4d1dc7bf9a822a2fad308e8588e 10-Sep-2009 Luis R. Rodriguez <lrodriguez@atheros.com> ath5k: use common curbssid, bssidmask and macaddr

The ah_sta_id was really being used as the macaddr.
ath5k still does not use the association ID now passed
up by mac80211, that can be fixed later.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
bcd8f54a84ce99ade91c250a9bc850a9fd3389c1 10-Sep-2009 Luis R. Rodriguez <lrodriguez@atheros.com> atheros: use get_unaligned_le*() for bssid mask setting

Historically some macro helpers have been users for this,
AR5K_LOW_ID() and AR5K_HIGH_ID(), use upstream unaligned
helpers instead. This applid to ath5k and ar9170. ath9k
already uses this.

Worth noting is ath5k uses an ah_sta_id but that is already
the MAC address combined with the associaiton ID, ah_sta_id
is really ETH_ALEN in size.

Cc: Bob Copeland <me@bobcopeland.com>
Cc: Nick Kossifidis <mick@madwifi-project.org>
Cc: Christian Lamparter <chunkeey@web.de>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
edd7fc7003f31da48d06e215a93ea966a22c2a03 10-Aug-2009 Nick Kossifidis <mick@madwifi-project.org> ath5k: Wakeup fixes

* Don't put chip to full sleep because there are problems during
wakeup. Instead hold MAC/Baseband on warm reset state via a new
function ath5k_hw_on_hold.

* Minor cleanups

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Tested-by: Ben Greear <greearb@candelatech.com>
Tested-by: Johannes Stezenbach <js@sig21.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
46026e8f487c075f9ec4d671348e351eb5e46d3e 11-Jun-2009 Bob Copeland <me@bobcopeland.com> ath5k: cleanup ath5k_hw struct

ah_gpios array isn't used, and ah_current_channel can be a pointer
instead of an embedded struct. Removing these and some other
write-only variables, and moving some things around for better
packing and cache utilization saves 116 bytes.

text data bss dec hex filename
121762 472 64 122298 1ddba ath5k_before.ko
121646 472 64 122182 1dd46 ath5k.ko

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
e6a3b61681dcb963e6465ffbc4330b44824f35e3 09-Jun-2009 Tobias Doerffel <tobias.doerffel@gmail.com> ath5k: added cfg80211 based rfkill support

This patch introduces initial rfkill support for the ath5k driver
based on rfkill support in the cfg80211 framework.
All rfkill related code is separated into newly created rfkill.c.

Changes to existing code are minimal:

* added a new data structure ath5k_rfkill to the ath5k_softc structure
* inserted calls to HW rfkill init/deinit routines
* ath5k_intr() has been extended to handle AR5K_INT_GPIO interrupts

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
c649c0e31d5736a4b7c5c3454182091dda4bbe62 25-May-2009 David S. Miller <davem@davemloft.net> Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/wireless/ath/ath5k/phy.c
drivers/net/wireless/iwlwifi/iwl-agn.c
drivers/net/wireless/iwlwifi/iwl3945-base.c
57e6c56dbb52d680f61dd629759fe2974840ed93 30-Apr-2009 Nick Kossifidis <mick@madwifi-project.org> ath5k: Add Spur filter support on newer chips

* Add spur filter support for RF5413 and later chips

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
2bed03ebf62f9d013a455209bf30d7e086120443 30-Apr-2009 Nick Kossifidis <mick@madwifi-project.org> ath5k: Implement antenna control

* Add code to support the various antenna scenarios supported by hw

* For now hardcode the default scenario (single or dual omnis with
tx/rx diversity working and tx antenna handled by session -hw keeps
track on which antenna it got ack from each ap/station and maps each
ap/station to one of the antennas-).

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
1889ba0a48688b639c2b2e9e1b0fd8f84e2c37d1 30-Apr-2009 Nick Kossifidis <mick@madwifi-project.org> ath5k: Put remaining EEPROM data on ee struct

* Put remaining EEPROM information on ee struct and remove is_hb63
function.

Now we also have rfkill stuff available.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.c
a082381044ce026e83dbd17f8837722b028fc07d 30-Apr-2009 Nick Kossifidis <mick@madwifi-project.org> ath5k: Allow user/driver to set txpower

* Now that we have regulatory control enable the driver to set
txpower on hw

* Also use txpower table offset so that we can match
power range set by user/driver with indices on power table.

Tested 2 different cards (a CM9 and an RF5112-based ubnt) and got
the same output using a remote machine to measure per-packet rssi
(conected the cards using attenuators). I also switched between
various tx power levels and i saw an equal power change on the remote
machine (so txpower changes as expected) and verified that we have
the same output on each rate.

Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>

Signed-off-by: John W. Linville <linville@tuxdriver.com>
/drivers/net/wireless/ath/ath5k/reset.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/reset.c