openwrtv3/package/kernel
Martin Blumenstingl 3f889418a5 kernel: mac80211: add pending ath9k EEPROM swapping patches
There are two types of swapping the EEPROM data in the ath9k driver.
Before this series one type of swapping could not be used without the
other.

The first type of swapping looks at the "magic bytes" at the start of
the EEPROM data and performs swab16 on the EEPROM contents if needed.
The second type of swapping is EEPROM format specific and swaps
specific fields within the EEPROM itself (swab16, swab32 - depends on
the EEPROM format).

With this series the second part now looks at the EEPMISC register
inside the EEPROM, which uses a bit to indicate if the EEPROM data
is Big Endian (this is also done by the FreeBSD kernel).
This has a nice advantage: currently there are some out-of-tree hacks
(in OpenWrt and LEDE) where the EEPROM has a Big Endian header on a
Big Endian system (= no swab16 is performed) but the EEPROM itself
indicates that it's data is Little Endian. Until now the out-of-tree
code simply did a swab16 before passing the data to ath9k, so ath9k
first did the swab16 - this also enabled the format specific swapping.
These out-of-tree hacks are still working with the new logic, but it
is recommended to remove them. This implementation is based on a
discussion with Arnd Bergmann who raised concerns about the
robustness and portability of the swapping logic in the original OF
support patch review, see [0].

After a second round of patches (= v1 of this series) neither Arnd
Bergmann nor I were really happy with the complexity of the EEPROM
swapping logic. Based on a discussion (see [1] and [2]) we decided
that ath9k should use a defined format (specifying the endianness
of the data - I went with __le16 and __le32) when accessing the
EEPROM fields. A benefit of this is that we enable the EEPMISC based
swapping logic by default, just like the FreeBSD driver, see [3]. On
the devices which I have tested (see below) ath9k now works without
having to specify the "endian_check" field in ath9k_platform_data (or
a similar logic which could provide this via devicetree) as ath9k now
detects the endianness automatically. Only EEPROMs which are mangled
by some out-of-tree code still need the endian_check flag (or one can
simply remove that mangling from the out-of-tree code).

[0] http://www.spinics.net/lists/linux-wireless/msg152634.html
[1] https://marc.info/?l=linux-wireless&m=147250597503174&w=2
[2] https://marc.info/?l=linux-wireless&m=147254388611344&w=2
[3] 50719b56d9/sys/dev/ath/ath_hal/ah_eeprom_9287.c (L351)

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2016-11-29 21:40:16 +01:00
..
acx-mac80211 source: Switch to xz for packages and tools where possible 2016-10-06 12:16:56 +02:00
ar7-atm package: flag further target specific packages as nonshared 2016-04-26 23:26:43 +02:00
ath10k-ct ath10k-ct: Update to latest. 2016-11-22 10:50:51 +01:00
avila-wdt kernel/avila-wdt: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:52 +02:00
brcm2708-gpu-fw brcm2708-gpu-fw: update to latest version 2016-09-10 14:54:08 +02:00
broadcom-wl base-files, mac80211, broadcom-wl: wifi detection and configuration 2016-11-03 11:08:01 +01:00
button-hotplug kernel/button-hotplug: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:52 +02:00
ep80579-drivers packages: clean up the package folder 2013-06-21 16:54:37 +00:00
gpio-button-hotplug gpio-button-hotplug: add more buttons 2016-11-27 15:34:23 +01:00
i2c-gpio-custom kernel/i2c-gpio-custom: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:52 +02:00
kmod-sched-cake source: Switch to xz for packages and tools where possible 2016-10-06 12:16:56 +02:00
lantiq ltq-hcd: drop package 2016-11-27 15:34:23 +01:00
linux kernel: have kmod-ipsec depend on kmod-crypto-echainiv 2016-11-29 12:19:22 +01:00
mac80211 kernel: mac80211: add pending ath9k EEPROM swapping patches 2016-11-29 21:40:16 +01:00
mmc_over_gpio package: kernel: update dependencies for 4.4 2015-12-02 22:19:31 +00:00
mt76 Revert "mt76: update to the latest version, adds a tx queue configuration fix" 2016-11-05 10:16:53 +01:00
mwlwifi mwlwifi: upgrade to 10.3.2.0-20161013 2016-10-24 08:45:06 +02:00
om-watchdog package/om-watchdog: add OpenMesh MR1750v2 support 2016-05-23 12:19:25 +02:00
rotary-gpio-custom kernel/rotary-gpio-custom: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:53 +02:00
rtc-rv5c386a kernel/rtc-rv5c386a: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:53 +02:00
spi-gpio-custom kernel/spi-gpio-custom: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:53 +02:00
trelay kernel/trelay: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:53 +02:00
w1-gpio-custom kernel/w1-gpio-custom: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:53 +02:00
wrt55agv2-spidevs kernel/wrt55agv2-spidevs: drop Build/Prepare rule in favor of default one 2016-10-15 11:36:53 +02:00