Openwrt/target/linux
Martin Blumenstingl afa3709266 lantiq: fix ath9k EEPROM data swapping for some devices
The EEPROM data in the flash of the ARV7518PW, ARV8539PW22,
BTHOMEHUBV2B and BTHOMEHUBV3A is stored byte-swapped (swab16), meaning
that for example the ath9k base_eep_header fields "version" (high and
low byte), "opCapFlags" and "eepMisc" are swapped (the latter ones are
just 1 byte wide, thus their position is swapped).

The old "ath,eep-endian" property enabled the corresponding swapping
logic in the ath9k driver (swab16 in ath9k_hw_nvram_swap_data, which is
based on the magic bytes in the EEPROM data which have nothing to do
with the calibration data - thus this logic should not be used
anymore).
Since we have switched to the upstream ath9k devicetree bindings there
is no binding anymore which enables swab16 in ath9k (as this logic is
not recommended anymore as explained above), leading to ath9k
initialization errors:
ath: phy0: Bad EEPROM VER 0x0001 or REV 0x00e0
(this shows that the version field is swapped, expected values are VER
0x000E and REV 0x0001)

Swapping the ath9k calibration data when extracting it from the flash
fixes the devices listed above (all other devices do not require
additional swapping, since the position of the fields is already as
expected by ath9k). This allows ath9k to read the version correctly
again, as well as the more important "eepmisc" field (which is used for
determining whether the data inside the EEPROM is Big or Little Endian
which is required to parse the EEPROM contents correctly).

Fixes: a20616863d ("lantiq: use ath9k device tree bindings
binding/owl-loader")

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2016-12-08 19:36:22 +01:00
..
adm5120
adm8668
apm821xx
ar7
ar71xx ar71xx: fix LEDs and sysupgrade support for TL-WA801ND v3 2016-12-06 19:08:35 +01:00
arc770
archs38
arm64
at91
ath25
au1000
bcm53xx bcm53xx: update patch adding fake USB doorbell 2016-12-07 09:22:39 +01:00
brcm47xx kernel: bump to 4.4.36 2016-12-04 12:31:30 +01:00
brcm63xx
brcm2708 brcm2708: update linux 4.4 patches to latest version 2016-12-04 12:32:04 +01:00
cns3xxx
gemini
generic kernel: backport LED patch which will allow better DT integration 2016-12-06 19:50:20 +01:00
imx6
ipq806x ipq806x: add thermal sensor driver 2016-12-01 15:47:43 +01:00
ixp4xx
kirkwood
lantiq lantiq: fix ath9k EEPROM data swapping for some devices 2016-12-08 19:36:22 +01:00
layerscape
malta
mcs814x
mediatek
mpc85xx
mvebu mvebu: fix sysupgrade for Linksys WRT3200ACM 2016-12-04 07:03:17 +01:00
mxs
octeon
omap
omap24xx
orion orion: make image size errors non-fatal 2016-12-04 11:41:53 +01:00
oxnas
ppc40x
ppc44x
ramips ramips: Fix led init script for Lenovo Y1/Y1s 2016-12-04 15:51:18 +01:00
rb532
realview
sunxi
uml
x86
xburst
zynq
Makefile