History log of /drivers/net/wireless/ath/ath9k/ar9002_phy.c
Revision Date Author Comments
ae0c40314a86c5c942d32d9cbbc9f96d70839935 14-Dec-2013 Felix Fietkau <nbd@openwrt.org> ath9k_hw: simplify spur channel handling

Remove ah->config.spurmode and ah->config.spurchans, always use EEPROM
data.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
89f927af7f3389e20c8ad24abfb3d1369f3ffc10 15-Oct-2013 Luis R. Rodriguez <mcgrof@do-not-panic.com> ath9k: add TX99 support

TX99 support enables Specific Absorption Rate (SAR) testing.
SAR is the unit of measurement for the amount of radio frequency(RF)
absorbed by the body when using a wireless device. The RF
exposure limits used are expressed in the terms of SAR, which is a
measure of the electric and magnetic field strength and power density
for transmitters operating at frequencies from 300 kHz to 100 GHz.

Regulatory bodies around the world require that wireless device
be evaluated to meet the RF exposure limits set forth in the
governmental SAR regulations.

In the examples below, for more bit rate options see the iw TX bitrate
setting documentation:

http://wireless.kernel.org/en/users/Documentation/iw#Modifying_transmit_bitrates

Example usage:

iw phy phy0 interface add moni0 type monitor
ip link set dev moni0 up

iw dev moni0 set channel 36 HT40+
iw set bitrates mcs-5 4

echo 10 > /sys/kernel/debug/ieee80211/phy0/ath9k/tx99_power
echo 1 > /sys/kernel/debug/ieee80211/phy0/ath9k/tx99

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
8a5b7ab36b46615874da3764b99c9d26c1e6750d 16-Sep-2013 Sujith Manoharan <c_manoha@qca.qualcomm.com> ath9k: Fix NF calibration for single stream cards

Rather than using the chip ID to read only chain-0 CCA
registers and avoid reading chain-1, use the RX chainmask
instead. There are some 1-stream PCI devices based on AR9287
such as TL-WN751ND. Improper NF calibration might result in
DMA errors/timeouts.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
f96bd2ad2259dc5d94fddffe37c668017209712b 02-Sep-2013 Sujith Manoharan <c_manoha@qca.qualcomm.com> ath9k: Add support for AR9565 v1.0.1 LNA diversity

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
36e8825e65c0b1d9511feceb6c464d8925e7c791 05-Aug-2013 Sujith Manoharan <c_manoha@qca.qualcomm.com> ath9k: Fix build failure

Make sure that CONFIG_ATH9K_BTCOEX_SUPPORT is used for
the WLAN/BT RX diversity hooks.

Reported by the kernel build testing backend.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
d7150908248bc76eff48c16045802c7f0b1cfd74 04-Aug-2013 Sujith Manoharan <c_manoha@qca.qualcomm.com> ath9k: Program HW for WB195 diversity

The MC_GAIN_CTL/CCK_DETECT registers have to be programmed
with the correct configuration values if WLAN/BT RX diversity
is enabled. Add this and also take care of the BTCOEX mode
when fast diversity is enabled/disabled.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e2d4a24e03f9f7b255e86a2537dca0927f08af4a 12-Jan-2013 Fengguang Wu <fengguang.wu@intel.com> ath9k_hw: ar9002_hw_spectral_scan_config() can be static

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
aad12ede97d62b290ac03f0077d05b999bbddd05 10-Jan-2013 Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de> ath9k: fix spectral scan endless mode on AR9002

There was a copy+paste error in ar9002 for the endless spectral mode,
fix that.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
e93d083f42a126b5ad8137b5f0e8d6f900b332b8 08-Jan-2013 Simon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de> ath9k: add spectral scan feature

Adds the spectral scan feature for ath9k. AR92xx and AR93xx chips
are supported for now. The spectral scan is triggered by configuring
a mode through a debugfs control file. Samples can be gathered via
another relay debugfs file.

Essentially, to try it out:

echo chanscan > /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan_ctl
iw dev wlan0 scan
cat /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan0 > samples
echo disable > /sys/kernel/debug/ieee80211/phy0/ath9k/spectral_scan_ctl

This feature is still experimental.

The special "chanscan" mode is used to perform spectral scan while
mac80211 is scanning for channels. To allow this,
sw_scan_start/complete() ops have been added.

The patch contains code snippets and information from Zefir Kurtisi and
information provided by Adrian Chadd and Felix Fietkau.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
c1b976d2fcb3b308906be7c6bda1390251dec32d 12-Dec-2012 Felix Fietkau <nbd@openwrt.org> ath9k_hw: use the devres API for allocations

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
997002785e3f932fd26a0f9c3cd91d4b4861ed29 10-Apr-2012 Zefir Kurtisi <zefir.kurtisi@neratec.com> ath9k: remove dead code

Clean up some orphaned code lines containing
* unused variables (not referenced / write-only)
* non-implemented function prototypes

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
21394754bcca59aeb4a0b74c95c0220bb727808f 09-Jul-2011 Felix Fietkau <nbd@openwrt.org> ath9k_hw: add a missing delay for an analog register

AR_AN_SYNTH9 is in the analog shift register range and thus needs to be
written using the ath9k_hw_analog_shift_rmw function.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
0407cf1c7f0fdbecab7efbd8214ac2d1196a67f9 09-Jul-2011 Felix Fietkau <nbd@openwrt.org> ath9k_hw: set 5 GHz half/quarter channels on AR9002 using fractional mode

The radio seems to perform better that way

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
804f6acb7cea1ea5b3e0ded1bf037f9bf02f1124 09-Jul-2011 Felix Fietkau <nbd@openwrt.org> ath9k_hw: remove hardcoded PLL overrides for AR9280

Use the proper masks for the register instead.
Fixes adding the (still unused) half/quarter PLL flags.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
5b68138e5659cbfd5df2879d17f9ba0b66477fec 17-May-2011 Sujith Manoharan <Sujith.Manoharan@atheros.com> ath9k: Drag the driver to the year 2011

The Times They Are a-Changin'.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
8afbcc8bfb549a522298fa4a31ee5155c2b5f7a0 13-May-2011 Mohammed Shafi Shajakhan <mshajakhan@atheros.com> ath9k_hw: define antenna diversity group

AR9285 belongs to diversity group 0 and AR9485 belongs to diversity
group 2. Based on the diversity group we configure certain antenna
diversity paramaters such as lna1_lna2_delta and fast diversity
bias values. For AR9485 we have some gain table parameter which
selects the gain table 0/1 for main and alternate antenna

Cc: Gabriel Tseng <Gabriel.Tseng@Atheros.com>
Cc: Senthilkumar Balasubramanian <Senthilkumar.Balasubramanian@Atheros.com>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
69de3721750ea4fae504be9e67f140cafe1c7a89 13-May-2011 Mohammed Shafi Shajakhan <mshajakhan@atheros.com> ath9k_hw: make antenna diversity modules chip specific

this is necessary to support Antenna diversity and combining in new chip
sets such as AR9485, previously Antenna diversity support is available
only in AR9285

Cc: Gabriel Tseng <Gabriel.Tseng@Atheros.com>
Cc: Senthilkumar Balasubramanian <Senthilkumar.Balasubramanian@Atheros.com>
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
44cefead807daf96d0f43eb494b1eb5edb5454bf 25-Dec-2010 Brian Prodoehl <bprodoehl@gmail.com> ath9k: fix spur mitigation no-spur case for AR9002

For the AR9002, the spur frequency read from the EEPROM is mangled
before being compared against AR_NO_SPUR. This results in the driver
trying to set up the spur mitigation for bogus spurs, rather than
cleanly breaking out.

Signed-off-by: Brian Prodoehl <bprodoehl@nomadio.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
07b2fa5a2368accf0fe6cb16e7eca6d1150554ed 21-Nov-2010 Joe Perches <joe@perches.com> ath9k: Use static const

Using static const generally increases object text and decreases data size.
It also generally decreases overall object size.

text data bss dec hex filename
11161 56 2136 13353 3429 drivers/net/wireless/ath/ath9k/ar9003_paprd.o.new
11167 56 2136 13359 342f drivers/net/wireless/ath/ath9k/ar9003_paprd.o.old
15428 56 3056 18540 486c drivers/net/wireless/ath/ath9k/eeprom_4k.o.old
15451 56 3056 18563 4883 drivers/net/wireless/ath/ath9k/eeprom_4k.o.new
14087 56 2560 16703 413f drivers/net/wireless/ath/ath9k/eeprom_9287.o.old
14036 56 2560 16652 410c drivers/net/wireless/ath/ath9k/eeprom_9287.o.new
10041 56 2384 12481 30c1 drivers/net/wireless/ath/ath9k/ani.o.new
10088 56 2384 12528 30f0 drivers/net/wireless/ath/ath9k/ani.o.old
9316 1580 2304 13200 3390 drivers/net/wireless/ath/ath9k/htc_drv_init.o.new
9316 1580 2304 13200 3390 drivers/net/wireless/ath/ath9k/htc_drv_init.o.old
16483 56 3432 19971 4e03 drivers/net/wireless/ath/ath9k/ar9003_phy.o.new
16517 56 3432 20005 4e25 drivers/net/wireless/ath/ath9k/ar9003_phy.o.old
18221 104 2960 21285 5325 drivers/net/wireless/ath/ath9k/rc.o.old
18203 104 2960 21267 5313 drivers/net/wireless/ath/ath9k/rc.o.new
19985 56 4288 24329 5f09 drivers/net/wireless/ath/ath9k/eeprom_def.o.new
20040 56 4288 24384 5f40 drivers/net/wireless/ath/ath9k/eeprom_def.o.old
23997 56 4984 29037 716d drivers/net/wireless/ath/ath9k/ar5008_phy.o.old
23846 56 4984 28886 70d6 drivers/net/wireless/ath/ath9k/ar5008_phy.o.new
24285 56 3184 27525 6b85 drivers/net/wireless/ath/ath9k/ar9003_eeprom.o.old
24101 56 3184 27341 6acd drivers/net/wireless/ath/ath9k/ar9003_eeprom.o.new
6834 56 1032 7922 1ef2 drivers/net/wireless/ath/ath9k/ar9002_phy.o.old
6780 56 1032 7868 1ebc drivers/net/wireless/ath/ath9k/ar9002_phy.o.new
36211 64 8624 44899 af63 drivers/net/wireless/ath/ath9k/hw.o.new
36401 64 8624 45089 b021 drivers/net/wireless/ath/ath9k/hw.o.old
9281 56 1496 10833 2a51 drivers/net/wireless/ath/ath9k/ar9003_calib.o.old
9150 56 1496 10702 29ce drivers/net/wireless/ath/ath9k/ar9003_calib.o.new

Use ARRAY_SIZE instead of a magic number.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7919a57bc608140aa8614c19eac40c6916fb61d2 30-Aug-2010 Andreas Herrmann <andreas.herrmann3@amd.com> bitops: Provide generic sign_extend32 function

This patch moves code out from wireless drivers where two different
functions are defined in three code locations for the same purpose and
provides a common function to sign extend a 32-bit value.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
435c1610f46dc4d86a6633adb037b18109e6ffdc 05-Oct-2010 Felix Fietkau <nbd@openwrt.org> ath9k_hw: clean up register write buffering

Throughout the code, DISABLE_REGWRITE_BUFFER is always called right after
REGWRITE_BUFFER_FLUSH. Since that's unlikely to change any time soon, that
makes keeping those ops separate rather pointless, as it only increases
code size and line number counts.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
21cc630f47d8589a42d563e89be4c631edbe8716 02-Sep-2010 Vasanthakumar Thiagarajan <vasanth@atheros.com> ath9k_hw: Add functions to get/set antenna diversity configuration

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
866b7780fce95989dfc85f3e372635f5147e0d90 23-Jul-2010 Felix Fietkau <nbd@openwrt.org> ath9k_hw: fix invalid extension channel noisefloor readings in HT20

When the hardware is configured in HT20 mode, noise floor readings for
the extension channel often return invalid values, which keep the
values in the NF history buffer at the hardware-specific maximum limit.
Fix this by discarding the extension channel values when in HT20 mode.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
54bd5006b03ee980f6067b4d61c3605b5a5e1d4a 02-Jul-2010 Felix Fietkau <nbd@openwrt.org> ath9k_hw: clean up the noise floor calibration code to reduce code duplication

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
f2552e28375cb34073a2f940ee9a8439c37d9ec2 02-Jul-2010 Felix Fietkau <nbd@openwrt.org> ath9k_hw: sanitize noise floor values properly on all chips

This refactors the noise floor range checks to make them generic,
and adds proper ranges for each supported chip type.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
6b42e8d03bef975085c0397806d00fbd1df67eb8 26-Apr-2010 Felix Fietkau <nbd@openwrt.org> ath9k_hw: fix fast clock handling for 5GHz channels

Combine multiple checks that were supposed to check for the same
conditions, but didn't. Always enable fast PLL clock on AR9280 2.0

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7d0d0df0eca695c83a08dc386824a9d1d7c526a4 16-Apr-2010 Sujith <Sujith.Manoharan@atheros.com> ath9k_hw: Use buffered register writes

This patch adds macros at certain places
which could be optimized for multiple register writes.

The performance of ath9k_htc improves considerably,
especially reducing the latency involved in a scan run.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
641d99217f507024720d21f0a76a8075824fcc46 15-Apr-2010 Felix Fietkau <nbd@openwrt.org> ath9k_hw: Split out the function for reading the noise floor

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
7152451aa12558ab032f319a119ceb928396b905 15-Apr-2010 Luis R. Rodriguez <lrodriguez@atheros.com> ath9k_hw: add common channel select helpers for ar900[23]

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
647739645bea4a5628f9e4eaf8022dcc5875c535 15-Apr-2010 Luis R. Rodriguez <lrodriguez@atheros.com> ath9k_hw: add a private callback for PLL control computation

The PLL control computation used to program the AR_RTC_PLL_CONTROL
register varies between our harware so just add a private callback for it.
AR9003 will use its own callback.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
8fe6536850ae49609704a263cbc7542133536922 15-Apr-2010 Luis R. Rodriguez <lrodriguez@atheros.com> ath9k_hw: Move some RF ops to the private callbacks

The PHY split is easier done in a few steps. First move
the RF ops to the private ops and rename them accordingly.
We split PHY stuff up first for the AR5008 and AR9002
families. There are some callbacks that AR9002 share
with the AR5008 familiy so we set those first, if AR9002
has some different callbacks it will override them upon
hardware init.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>