History log of /linux-master/drivers/net/wireless/ath/ath9k/eeprom.c
Revision Date Author Comments
# 76d7b996 12-Jan-2022 Minghao Chi <chi.minghao@zte.com.cn>

ath9k: remove redundant status variable

Return value directly instead of taking this in another redundant
variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20220112080751.667316-1-chi.minghao@zte.com.cn


# eb3a97a6 13-Sep-2021 Christian Lamparter <chunkeey@gmail.com>

ath9k: fetch calibration data via nvmem subsystem

On most embedded ath9k devices (like range extenders,
routers, accesspoints, ...) the calibration data is
stored in a MTD partitions named "ART", or "caldata"/
"calibration".

Since commit 4b361cfa8624 ("mtd: core: add OTP nvmem provider support"):
All MTD partitions are all automatically available through
the nvmem subsystem.

This feature - together with an nvmem cell definition either
in the platform data or via device-tree allows drivers to get
the data necessary for initializing the WIFI, without having
to wait around for the filesystem and userspace to do
the extractions.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/f9b732b50a3453fadf3923cc75d365bae3505fe7.1630157099.git.chunkeey@gmail.com


# b037b107 20-Mar-2019 Sven Eckelmann <sven@narfation.org>

ath9k: Differentiate between max combined and per chain power

The ath9k driver uses as maximum allowed txpower the constant
MAX_RATE_POWER. It is used to set a maximum txpower limit for the PHY
(which is combined txpower) and also the maximum txpower for per chain
rates. Its value 63 is derived from the maximum number the registers can
store for the per chain txpower.

The max txpower a user can set because of this is 31 dBm (floor(63 / 2)).
This also means that a device with multiple tx chains is even limited
further:

* 1 chain: 31 dBm per chain
* 2 chains: 28 dBm per chain
* 3 chains: 26 dBm per chain

This combined txpower limit of 31 dBm becomes even more problematic when
some extra antenna gain is set in the EEPROM. A high power device is then
no longer able to reach its potential limits.

Instead the code dealing with the combined txpower must use a higher limit
than 63 and only the code dealing with the per chain txpower have to use
the limit of 63. Since the antenna gain can be quite large and 8 bit
variables are often used in ath9k for txpower, a large, divisible by two
number like 254 is a good choice for this new limit.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 641c1f4a 09-May-2017 Gustavo A. R. Silva <garsilva@embeddedor.com>

ath9k: remove unnecessary code

The array field eeprom_data in struct th9k_platform_data
is a fixed size array so it can never be NULL.

Addresses-Coverity-ID: 1364903
Cc: Arend Van Spriel <arend.vanspriel@broadcom.com>
Cc: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# b7dcf68f 05-Apr-2017 Dan Carpenter <dan.carpenter@oracle.com>

ath9k: off by one in ath9k_hw_nvram_read_array()

The > should be >= or we read one space beyond the end of the array.

Fixes: ab5c4f71d8c7 ("ath9k: allow to load EEPROM content via firmware API")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 4bca5303 05-Dec-2016 Martin Blumenstingl <martin.blumenstingl@googlemail.com>

ath9k: define all EEPROM fields in Little Endian format

The ar9300_eeprom logic is already using only 8-bit (endian neutral),
__le16 and __le32 fields to state explicitly how the values should be
interpreted.
All other EEPROM implementations (4k, 9287 and def) were using u16 and
u32 fields with additional logic to swap the values (read from the
original EEPROM) so they match the current CPUs endianness.

The EEPROM format defaults to "all values are Little Endian", indicated
by the absence of the AR5416_EEPMISC_BIG_ENDIAN in the u8 EEPMISC
register. If we detect that the EEPROM indicates Big Endian mode
(AR5416_EEPMISC_BIG_ENDIAN is set in the EEPMISC register) then we'll
swap the values to convert them into Little Endian. This is done by
activating the EEPMISC based logic in ath9k_hw_nvram_swap_data even if
AH_NO_EEP_SWAP is set (this makes ath9k behave like the FreeBSD driver,
which also does not have a flag to enable swapping based on the
AR5416_EEPMISC_BIG_ENDIAN bit). Before this logic was only used to
enable swapping when "current CPU endianness != EEPROM endianness".

After changing all relevant fields to __le16 and __le32 sparse was used
to check that all code which reads any of these fields uses
le{16,32}_to_cpu.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 68fbe792 05-Dec-2016 Martin Blumenstingl <martin.blumenstingl@googlemail.com>

ath9k: Make the EEPROM swapping check use the eepmisc register

There are two ways of swapping the EEPROM data in the ath9k driver:
1) swab16 based on the first two EEPROM "magic" bytes (same for all
EEPROM formats)
2) field and EEPROM format specific swab16/swab32 (different for
eeprom_def, eeprom_4k and eeprom_9287)

The result of the first check was used to also enable the second swap.
This behavior seems incorrect, since the data may only be byte-swapped
(afterwards the data could be in the correct endianness).
Thus we introduce a separate check based on the "eepmisc" register
(which is part of the EEPROM data). When bit 0 is set, then the EEPROM
format specific values are in "big endian". This is also done by the
FreeBSD kernel, see [0] for example.

This allows us to parse EEPROMs with the "correct" magic bytes but
swapped EEPROM format specific values. These EEPROMs (mostly found in
lantiq and broadcom based big endian MIPS based devices) only worked
due to platform specific "hacks" which swapped the EEPROM so the
magic was inverted, which also enabled the format specific swapping.
With this patch the old behavior is still supported, but neither
recommended nor needed anymore.

[0]
https://github.com/freebsd/freebsd/blob/50719b56d9ce8d7d4beb53b16e9edb2e9a4a7a18/sys/dev/ath/ath_hal/ah_eeprom_9287.c#L351

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 56398519 09-Jul-2016 Martin Blumenstingl <martin.blumenstingl@googlemail.com>

ath9k: simplify the code-paths when not using the built-in EEPROM

There were two paths in the code for "external" eeprom sources. The code
in eeprom.c only handled the cases where the eeprom data was loaded via
request_firmware. ahb.c and pci.c on the other hand had some duplicate
code which was only used when the eeprom data was passed via
ath9k_platform_data.
With this change all eeprom data handling is now unified in eeprom.c.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 83d6f1f1 14-Mar-2016 Arnd Bergmann <arnd@arndb.de>

ath9k: fix buffer overrun for ar9287

Code that was added back in 2.6.38 has an obvious overflow
when accessing a static array, and at the time it was added
only a code comment was put in front of it as a reminder
to have it reviewed properly.

This has not happened, but gcc-6 now points to the specific
overflow:

drivers/net/wireless/ath/ath9k/eeprom.c: In function 'ath9k_hw_get_gain_boundaries_pdadcs':
drivers/net/wireless/ath/ath9k/eeprom.c:483:44: error: array subscript is above array bounds [-Werror=array-bounds]
maxPwrT4[i] = data_9287[idxL].pwrPdg[i][4];
~~~~~~~~~~~~~~~~~~~~~~~~~^~~

It turns out that the correct array length exists in the local
'intercepts' variable of this function, so we can just use that
instead of hardcoding '4', so this patch changes all three
instances to use that variable. The other two instances were
already correct, but it's more consistent this way.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 940cd2c12ebf ("ath9k_hw: merge the ar9287 version of ath9k_hw_get_gain_boundaries_pdadcs")
Signed-off-by: David S. Miller <davem@davemloft.net>


# 65dc1a5d 21-Jan-2016 Felix Fietkau <nbd@openwrt.org>

ath9k_hw: ignore eeprom magic mismatch on flash based devices

Many AR913x based devices (maybe others too) do not have a valid EEPROM
magic in their calibration data partition.

Fixes: 6fa658fd5ab2 ("ath9k: Simplify and fix eeprom endianness swapping")
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 19f2ce3f 19-Dec-2015 Dan Carpenter <dan.carpenter@oracle.com>

ath9k: fix ath9k_hw_nvram_check_version()

There is a type bug so it always returns success.

Fixes: 6fa658fd5ab2 ('ath9k: Simplify and fix eeprom endianness swapping')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 6fa658fd 31-Oct-2015 Martin Blumenstingl <martin.blumenstingl@googlemail.com>

ath9k: Simplify and fix eeprom endianness swapping

The three eeprom implementations had quite some duplicate code when it
came to endianness swapping.
Additionally there was a bug in eeprom_4k and eeprom_9287 which
prevented the endianness swapping from working correctly, because the
swapping code was guarded within an "if (!ath9k_hw_use_flash(ah))". In
eeprom_def this check did not exist, so it seems that eeprom_def was the
only implementation where endianness swapping worked.

This patch takes the duplicate code and moves it from eeprom_* to
eeprom.c. The new code is derived from eeprom_def, while taking into
account the specifics from the other implementations.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>


# 2028523b 22-Mar-2015 Oleksij Rempel <linux@rempel-privat.de>

ath9k: ath9k_hw_analog_shift_rmw: use REG_RMW

use REG_RMW in ath9k_hw_analog_shift_rmw.
It will double execution speed on usb bus.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# ab5c4f71 10-Dec-2012 Gabor Juhos <juhosg@openwrt.org>

ath9k: allow to load EEPROM content via firmware API

The calibration data for devices w/o a separate
EEPROM chip can be specified via the 'eeprom_data'
field of 'ath9k_platform_data'. The 'eeprom_data'
is usually filled from board specific setup
functions. It is easy if the EEPROM data is mapped
to the memory, but it can be complicated if it is
stored elsewhere.

The patch adds support for loading of the EEPROM
data via the firmware API to avoid this limitation.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 0e4b9f2f 10-Dec-2012 Gabor Juhos <juhosg@openwrt.org>

ath9k: use 'struct ath_hw *' as the first argument for 'ath9k_hw_nvram_read'

The 'ath9k_hw_nvram_read' function takes a
'struct ath_common *' as its first argument.
Almost each of its caller has a 'struct ath_hw *'
parameter in their argument list, and that is
dereferenced in order to get the 'struct ath_common'
pointer.

Change the first argument of 'ath9k_hw_nvram_read'
to be a 'struct ath_hw *', and remove the dereference
calls from the callers.

Also change the type of the first argument of the
ar9300_eeprom_read_{byte,word} functions.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 7177d8f9 10-Dec-2012 Gabor Juhos <juhosg@openwrt.org>

ath9k: add EEPROM offset to debug message

Show the EEPROM offset of the failed read operation
in 'ath9k_hw_nvram_read'. The debug message is more
informative this way.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 2fd2cdfb 10-Dec-2012 Gabor Juhos <juhosg@openwrt.org>

ath9k: move duplicated debug message to 'ath9k_hw_nvram_read'

The fill_eeprom functions are printing the same
debug message in case the 'ath9k_hw_nvram_read'
function fails. Remove the duplicated code from
fill_eeprom functions and add the ath_dbg call
directly into 'ath9k_hw_nvram_read'.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 23bd7ced 16-Apr-2012 Gabor Juhos <juhosg@openwrt.org>

ath9k: move ath9k_hw_fbin2freq function to eeprom.h

Both eeprom.c and ar9003_eeprom.c has an indentical
'ath9k_hw_fbin2freq' function. Move the function to
a common place and remove the duplicates.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 6010e72c 16-Apr-2012 Gabor Juhos <juhosg@openwrt.org>

ath9k: merge power correction constants

The existing constants are used for reduction/increase
tx power level on devices with 2x2 and 3x3 chainmask.

Both reduction and increase must use the same value, so
it makes no sense to use separate constants for them.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 8f942b9b 14-Apr-2012 Gabor Juhos <juhosg@openwrt.org>

ath9k: simplify ath9k_hw_get_scaled_power function

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# ea6f792b 14-Apr-2012 Gabor Juhos <juhosg@openwrt.org>

ath9k: introduce ath9k_hw_get_scaled_power helper

The computation of the scaled power value in
various eeprom files uses identical code. Move
that code into a helper function and use that
instead of code duplication.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# d2182b69 15-Dec-2011 Joe Perches <joe@perches.com>

ath: Convert ath_dbg(bar, ATH_DBG_<FOO>, to ath_dbg(bar, FOO

Add ATH_DBG_ to macros to shorten the uses and
reduce the line count.

Coalesce ath_dbg formats.
Add missing spaces to coalesced formats.
Add missing newline terminations to ath_dbg formats.
Align ath_dbg arguments where appropriate.
Standardize ath_dbg formats without periods.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 1b8714f7 15-Sep-2011 Felix Fietkau <nbd@openwrt.org>

ath9k_hw: clean up hardware revision checks

- AR_SREV_5416_20_OR_LATER is always true, remove it
- AR_SREV_9280_20_OR_LATER is always true within eeprom_4k.c and eeprom_9287.c
- (AR_SREV_9271 || AR_SREV_9285) is always true in eeprom_4k.c

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


# 5b68138e 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>


# 04cf53f4 04-Jan-2011 Sujith Manoharan <Sujith.Manoharan@atheros.com>

ath9k_hw: Offload USB eeprom reading to target

For USB devices, reading the EEPROM data can be offloaded
to the target. Use multiple register reads to take advantage
of this feature to reduce initialization time.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 940cd2c1 11-Dec-2010 Felix Fietkau <nbd@openwrt.org>

ath9k_hw: merge the ar9287 version of ath9k_hw_get_gain_boundaries_pdadcs

Also add a comment about a potential array overrun that needs to
be reviewed.

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


# 115277a3 11-Dec-2010 Felix Fietkau <nbd@openwrt.org>

ath9k_hw: merge ath9k_hw_get_gain_boundaries_pdadcs between eeprom_def.c and eeprom_4k.c

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


# 4ddfcd7d 11-Dec-2010 Felix Fietkau <nbd@openwrt.org>

ath9k_hw: clean up duplicate and unnused eeprom related defines

AR*_MAX_RATE_POWER => MAX_RATE_POWER
AR*_EEPROM_MODAL_SPURS => AR_EEPROM_MODAL_SPURS
AR*_OPFLAGS_* => AR5416_OPFLAGS_*
...

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


# 226afe68 02-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>


# e702ba18 01-Dec-2010 Felix Fietkau <nbd@openwrt.org>

ath9k_hw: fix endian issues with CTLs on AR9003

Parsing data using bitfields is messy, because it makes endian handling
much harder. AR9002 and earlier got it right, AR9003 got it wrong.
This might lead to either using too high or too low tx power values,
depending on frequency and eeprom settings.
Fix it by getting rid of the CTL related bitfields entirely and use
masks instead.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# a55f8588 01-Jun-2010 Sujith <Sujith.Manoharan@atheros.com>

ath9k_hw: Cleanup TX power calculation for AR9287

* Add a few comments, and move the updation of max_power_level
to a helper routine. This is also done by non-4K based chipsets,
this will be fixed in a separate patch.

* Remove two WARs which are required for old AR5416 chipsets,
and are not needed for AR9287.

* Fix indentation and make things readable.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 79d7f4bc 01-Jun-2010 Sujith <Sujith.Manoharan@atheros.com>

ath9k_hw: Optimize ath9k_hw_ar9287_set_board_values

Rather than doing a series of RMWs, calculate the
value to be written to the register in question and
do a single REGWRITE. This improves bringup time.

This depends on the analog_shiftreg configuration option,
which is currently buggy. For AP mode, a delay of 100us
has to be the default. For station mode, this knob has to
be enabled on a per-case basis, though it is a little
unclear on when to enable a delay. This can be fixed later though.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# a4b77097 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>


# 15c9ee7a 15-Apr-2010 Senthil Balasubramanian <senthilkumar@atheros.com>

ath9k_hw: Implement AR9003 eeprom callbacks

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 0b8f6f2b1 15-Apr-2010 Luis R. Rodriguez <lrodriguez@atheros.com>

ath9k_hw: rename eep_AR9287_ops to eep_ar9287_ops

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 939ad86d 15-Apr-2010 Senthil Balasubramanian <senthilkumar@atheros.com>

ath9k_hw: the eep_map is used only for AR9280 PCI card ini fixup

We can reorganize the code in such a way that eep_map can be removed,
which makes the code more clearer.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 5bb12791 14-Sep-2009 Luis R. Rodriguez <lrodriguez@atheros.com>

atheros: move bus ops to ath_common

This is the last part to make ath9k hw code core driver agnostic.
I believe ath9k_htc can now use use the hw code unmodified.

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


# 73f57f83 07-Aug-2009 Roel Kluin <roel.kluin@gmail.com>

ath9k: Fix read buffer overflow

Prevent a read of powInfo[-1] in the first iteration.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# b5aec950 06-Aug-2009 Sujith <Sujith.Manoharan@atheros.com>

ath9k: Split eeprom.c into manageable pieces

Add eeprom_def.c, eeprom_4k.c and eeprom_9287.c
This improves maintainability.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 6780ccf5 06-Aug-2009 Sujith <Sujith.Manoharan@atheros.com>

ath9k: Remove a few DEBUG mesages

We have never used these at all.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# c16c9d06 06-Aug-2009 Sujith <Sujith.Manoharan@atheros.com>

ath9k: Try to fix whitespace damage

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 54e4cec6 06-Aug-2009 Sujith <Sujith.Manoharan@atheros.com>

ath9k: Cleanup function return types

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 6b4f645a 03-Aug-2009 Luis R. Rodriguez <lrodriguez@atheros.com>

ath9k: fix compile warning on ath9k_hw_AR9287_check_eeprom()

CC [M] drivers/net/wireless/ath/ath9k/eeprom.o
drivers/net/wireless/ath/ath9k/eeprom.c: In function ‘ath9k_hw_AR9287_check_eeprom’:
drivers/net/wireless/ath/ath9k/eeprom.c:2866: warning: comparison of distinct pointer types lacks a cast

Cc: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# d7e7d229 03-Aug-2009 Luis R. Rodriguez <lrodriguez@atheros.com>

ath9k: add initial hardware support for ar9271

We will finalize this after some driver core changes, for now
we leave this unsupported.

Cc: Stephen Chen <stephen.chen@atheros.com>
Cc: Zhifeng Cai <zhifeng.cai@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 475f5989 03-Aug-2009 Luis R. Rodriguez <lrodriguez@atheros.com>

ath9k: Remove _t postfix for ar9287_eeprom structure

We don't use typdefs on ath9k, remove that _t.

Cc: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# f637cfd6 03-Aug-2009 Luis R. Rodriguez <lrodriguez@atheros.com>

ath9k: describe hw initialization better

During initialization ath9k tends to use "attach" to when we
initialize hardware due to the fact we used to attach a "HAL".
The notion of a HAL is long gone, so lets just be clear on what
we are doing.

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


# ac88b6ec 22-Jul-2009 Vivek Natarajan <vivek.natraj@gmail.com>

ath9k: Add support for AR9287 based chipsets.

Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 008749fc 25-Jul-2009 Roel Kluin <roel.kluin@gmail.com>

ath9k: Read outside array bounds

Incorrect limits leads to reads outside array bounds.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# dd8b15b0 14-Jul-2009 Senthil Balasubramanian <senthilkumar@atheros.com>

ath9k: RX stucks during heavy traffic in HT40 mode.

Running iperf along with p2p traffic on both TX and RX side then
stop one side, then stop the other side, then start it up again,
eventually the STA gets into a mode that it can not pass data at
all.

A hardware workaround for invalid RSSI can make FIFO write pointer
to jump over read pointer, causing RX data corruption and repeated
DMA. Both TX and RX works fine when the workaround is disabled.

To replace the original hardware work around, software looks for
frames with post delimiter CRC error and mark the RSSI invalid so
that the upperlayer will not use the RSSI associated with this
frame. So disable the hardware workaround by updating the appropriate
registers.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 6badaaf7 28-Jun-2009 Joe Perches <joe@perches.com>

drivers/net/wireless/ath/ath9k: Remove unnecessary semicolons

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 8fbff4b8 08-May-2009 Vasanthakumar Thiagarajan <vasanth@atheros.com>

ath9k: Cleanup ineffective return values

This patch makes the return type of some of the functions
void as those functions always return true

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 203c4805 30-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>